/* The application ships the font it declares (task 374).
 *
 * Every stylesheet below asks for `Inter`. Until this face existed nothing in
 * the repository carried an Inter file and no `@font-face` was declared, so the
 * metrics a reader saw were whatever their own computer had installed — which
 * is not a design decision anybody made.
 *
 * VARIABLE, not static: the stylesheets ask for 550, 650, 750, 850 and 880, and
 * no static Inter file carries those. `font-weight: 100 900` exposes the `wght`
 * axis so each is rendered rather than snapped to the nearest hundred.
 *
 * `swap`: text is painted immediately in the fallback and reflowed when the
 * face arrives, so a slow or failed font never leaves a blank page. The fallback
 * list on every `font-family` below is the face that is then used, and it is
 * deliberately not empty.
 *
 * Same origin, always: the served policy declares `font-src 'self'` and this URL
 * is relative to the stylesheet, which is served from `/assets/`. No third-party
 * font host, no preconnect, nothing that could carry a request off this origin.
 *
 * Provenance, licence and how to refresh it: public/fonts/PROVENANCE.md.
 */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/InterVariable.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #f3f6f5;
  --bg-soft: #f6faf9;
  --surface: #ffffff;
  --surface-2: #f8fbfa;
  --surface-3: #edf5f2;
  --ink: #112321;
  --ink-2: #3b514d;
  --muted: #526862;
  --line: #dce8e5;
  --line-strong: #c8d9d5;
  --control-line: #748b84;
  --sidebar: #062c31;
  --sidebar-2: #0a3a3f;
  --sidebar-3: #10464a;
  --brand: #087557;
  --brand-strong: #087158;
  --brand-pale: #e3f5ef;
  --brand-softer: #f0faf7;
  --brand-ink: #065e46;
  --brief: #0e3a33;
  --brief-ink-2: #bcc8c6;
  --mint: #86dcb8;
  --ai: #684a8d;
  --ai-pale: #efe9f6;
  --blue: #4268d5;
  --blue-pale: #eef2ff;
  --orange: #965607;
  --orange-pale: #fff4e4;
  --red: #b02d35;
  --red-pale: #fff0ef;
  --amber: #855300;
  --amber-pale: #fff7dc;
  --purple: #7a5acb;
  --purple-pale: #f4efff;
  --slate: #687a8f;
  --slate-pale: #eff3f7;
  --shadow-xs: 0 1px 2px rgba(13, 46, 42, 0.05);
  --shadow-sm: 0 8px 24px rgba(11, 47, 43, 0.08);
  --shadow-md: 0 18px 50px rgba(8, 35, 32, 0.12);
  --shadow-lg: 0 32px 80px rgba(2, 27, 29, 0.22);
  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --sidebar-width: 244px;
  --header-height: 68px;
  --content-max: 1700px;
  /* Shared rhythm for the approved simulation and authenticated workspace. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --page-gutter: var(--space-8);
  --panel-inset: var(--space-5);
  --section-gap: var(--space-5);
  --text-caption: .8125rem;
  --text-small: .875rem;
  --text-body: 1rem;
  --text-section: 1.125rem;
  --focus: 0 0 0 3px rgba(10, 140, 106, 0.22);
  --transition: 160ms ease;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size:1rem;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a, [role="button"] { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
svg { flex: 0 0 auto; }
::selection { background: #b9eadb; color: #052f29; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 9999;
  transform: translateY(-150%);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  transition: transform var(--transition);
}
.skip-link:focus { transform: translateY(0); }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: rgba(255,255,255,.9);
  background:
    radial-gradient(circle at 16% 6%, rgba(32, 180, 137, .18), transparent 29%),
    linear-gradient(180deg, var(--sidebar) 0%, #05282d 50%, #04252a 100%);
  border-right: 1px solid rgba(255,255,255,.07);
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: auto -80px -140px 0;
  height: 420px;
  opacity: .38;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 30%, rgba(53, 217, 168, .35) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(53, 217, 168, .25) 0 1px, transparent 2px);
  background-size: 34px 34px, 46px 46px;
  mask-image: linear-gradient(to top, #000, transparent 90%);
}
.sidebar-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-height);
  padding: 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-lockup { display:block; width:140px; height:32px; max-width:100%; object-fit:contain; object-position:left center; }
.sidebar-close {
  display: none;
  margin-left: auto;
}
.sidebar-scroll {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 10px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
.nav-section-label {
  margin: 17px 10px 7px;
  color: rgba(255,255,255,.42);
  font-size:0.8125rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav-item,
.nav-subitem {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  padding: 9px 10px;
  background: transparent;
  color: rgba(255,255,255,.78);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.nav-item:hover,
.nav-subitem:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active,
.nav-subitem.active {
  background: linear-gradient(90deg, rgba(91,214,175,.19), rgba(91,214,175,.08));
  color: #fff;
  box-shadow: inset 3px 0 0 #5bd6af;
}
.nav-item:active { transform: translateY(1px); }
.nav-icon {
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,.78);
}
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { color: #7be2c0; }
.nav-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size:.9375rem;
  font-weight: 550;
}
.nav-item.active .nav-label { font-weight:650; }
.nav-badge {
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 20px;
  background: rgba(97, 188, 255, .22);
  color: #bfe5ff;
  font-size:0.75rem;
  font-weight: 800;
  text-align: center;
}
.nav-chevron { opacity: .5; transition: transform var(--transition); }
.nav-item.expanded .nav-chevron { transform: rotate(180deg); }
.nav-children {
  display: grid;
  gap: 2px;
  margin: 3px 0 7px 29px;
}
.nav-subitem {
  min-height: 34px;
  padding: 7px 9px;
  font-size:0.875rem;
}
.sidebar-foot {
  position: relative;
  z-index: 1;
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.app-release-version { margin:8px 0 0; font-size:.75rem; line-height:1.4; }
.user-card {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-radius: 12px;
  background: rgba(255,255,255,.055);
  cursor: pointer;
}
.user-card:hover { background: rgba(255,255,255,.08); }
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #78d9bd, #2c8d79);
  color: #052f2a;
  font-weight: 800;
  font-size:0.875rem;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}
.avatar.sm { width: 27px; height: 27px; font-size:0.8125rem; }
.avatar.lg { width: 44px; height: 44px; font-size:1rem; }
.avatar.blue { background: linear-gradient(135deg, #c8dcff, #7196ed); color: #19356f; }
.avatar.orange { background: linear-gradient(135deg, #ffe3ae, #dda045); color: #70420b; }
.avatar.purple { background: linear-gradient(135deg, #eadfff, #a58ae7); color: #4c337f; }
.user-card strong,
.user-card > span:not(.avatar) > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card strong { color: #fff; font-size:0.875rem; }
.user-card > span:not(.avatar) > span { color: rgba(255,255,255,.8); font-size:0.8125rem; }

.app-main {
  grid-column: 2;
  min-width: 0;
  min-height: 100vh;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  height: var(--header-height);
  display: grid;
  grid-template-columns: minmax(240px, 480px) minmax(0,1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 0 var(--page-gutter);
  background: rgba(255,255,255,.91);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.mobile-menu { display: none; }
.global-search {
  position: relative;
  min-width: 0;
}
.global-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.global-search input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 0 76px 0 37px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.global-search input:hover { border-color: var(--line-strong); }
.global-search input:focus { background: #fff; border-color: rgba(10,140,106,.55); box-shadow: var(--focus); }
.search-hint {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: #fff;
  font-size:0.8125rem;
  pointer-events: none;
}
.topbar-center {
  min-width: 0;
  color: var(--muted);
  font-size:0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  /* Visibility must change immediately when an inert region is revealed. */
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); border-color: var(--line); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size:0.75rem;
  font-weight: 800;
  box-shadow: 0 0 0 2px #fff;
}
.profile-button {
  display: grid;
  grid-template-columns: 31px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 166px;
  padding: 4px 6px 4px 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.profile-button:hover { background: var(--surface-3); border-color: var(--line); }
.profile-button strong,
.profile-button > div > span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.profile-button strong { font-size:0.875rem; }
.profile-button > div > span { font-size:0.75rem; color: var(--muted); }

.page-wrap {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-8) var(--page-gutter) 48px;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}
.page-title { min-width: 0; }
.page-title h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 2vw, 2rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.03em;
}
.page-title p { margin: var(--space-2) 0 0; color: var(--muted); max-width: 760px; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink-2);
  font-size:0.875rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
}
.btn:hover { background: var(--surface-3); border-color: #b7ccc7; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }
.btn.primary {
  background: var(--sidebar);
  color: #fff;
  border-color: var(--sidebar);
  box-shadow: 0 6px 14px rgba(6,44,49,.13);
}
.btn.primary:hover { background: #0a3e43; border-color: #0a3e43; }
.btn.brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.brand:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn.danger { background: #fff; border-color: #e8bbbb; color: #ae2b2b; }
.btn.danger:hover { background: var(--red-pale); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); border-color: var(--line); }
.btn.small { min-height: 30px; padding: 5px 9px; font-size:0.875rem; }
.btn.large { min-height: 42px; padding: 10px 16px; font-size:1rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.panel.soft { background: var(--surface-2); }
.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: var(--space-4) var(--panel-inset);
  border-bottom: 1px solid var(--line);
}
.panel-title { min-width: 0; flex: 1 1 200px; }
.panel-title h2,
.panel-title h3 { margin: 0; color: var(--ink); font-size:var(--text-section); font-weight:650; line-height:1.35; letter-spacing: -.015em; }
.panel-title p { margin: var(--space-1) 0 0; color: var(--muted); font-size:0.875rem; }
.panel-body { padding: var(--panel-inset); }
.panel-body > :is(h2,h3,h4,p,ul,ol,dl):first-child { margin-top:0; }
.panel-body > :is(h2,h3,h4,p,ul,ol,dl):last-child { margin-bottom:0; }
.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: var(--space-4) var(--panel-inset);
  border-top: 1px solid var(--line);
}
.panel.flush .panel-body { padding: 0; }

.grid { display: grid; gap: var(--section-gap); min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: var(--space-4);
  margin-bottom: var(--section-gap);
}
.stat-card {
  min-width: 0;
  padding: var(--panel-inset);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: #bed6d0; }
.stat-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.stat-value { font-size:1.875rem; line-height:1.1; font-weight:650; letter-spacing:-.035em; font-variant-numeric:tabular-nums; }
.stat-label { margin-top:var(--space-2); color:var(--ink-2); font-size:var(--text-small); font-weight:600; }
.stat-change { margin-top: 5px; color: var(--muted); font-size:0.75rem; }
.stat-change.up { color: var(--brand-strong); }
.stat-change.down { color: var(--red); }
.stat-icon {
  width: 30px;
  height: 30px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 8px;
  background: var(--brand-pale);
  color: var(--brand-strong);
}
.stat-icon svg { width: 16px; height: 16px; }

.badge,
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 7px;
  font-size:0.75rem;
  font-weight: 750;
  line-height: 1.3;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge.no-dot::before { display:none; }
.status.green, .badge.green { color: #0b765c; background: #e7f7f1; }
.status.blue, .badge.blue { color: #3d5fba; background: #eef2ff; }
.status.orange, .badge.orange { color: #855300; background: #fff2dd; }
.status.red, .badge.red { color: #bd3636; background: #fff0ef; }
.status.purple, .badge.purple { color: #684ab7; background: #f2edff; }
.status.slate, .badge.slate { color: #58697c; background: #eef2f5; }
.status.amber, .badge.amber { color: #946400; background: #fff6d8; }
.status.outline, .badge.outline { color: var(--muted); background: #fff; border:1px solid var(--line); }

.link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border:0;
  padding:0;
  background:transparent;
  color: var(--brand-strong);
  font-size:0.875rem;
  font-weight: 750;
  cursor:pointer;
}
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link.blue { color: var(--blue); }
.link.red { color: var(--red); }

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.toolbar .spacer { flex:1; }
input.field,
.select-field {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  outline: none;
}
input.field:focus,
.select-field:focus { border-color: rgba(10,140,106,.55); box-shadow: var(--focus); }
input.field.search { min-width: 240px; padding-left: 32px; }
.field-wrap { position:relative; }
.field-wrap > svg { position:absolute; left:10px; top:50%; transform:translateY(-50%); color:var(--muted); width:14px; height:14px; pointer-events:none; }

.segmented {
  display:inline-flex;
  align-items:center;
  gap:2px;
  padding:3px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--surface-3);
}
.segmented button {
  min-height:27px;
  border:0;
  border-radius:6px;
  padding:5px 9px;
  background:transparent;
  color:var(--muted);
  font-size:0.8125rem;
  font-weight:700;
  cursor:pointer;
}
.segmented button.active { background:#fff; color:var(--ink); box-shadow:var(--shadow-xs); }

.chip-row {
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.filter-chip {
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:28px;
  border:1px solid var(--line);
  border-radius:8px;
  padding:5px 9px;
  background:#fff;
  color:var(--muted);
  font-size:0.8125rem;
  font-weight:700;
  cursor:pointer;
}
.filter-chip:hover { border-color:var(--line-strong); color:var(--ink); }
.filter-chip.active { background:var(--brand-pale); border-color:#bde5d8; color:var(--brand-strong); }
.filter-chip .count { color:inherit; opacity:.7; }

.table-wrap {
  width:100%;
  min-width:0;
  overflow:auto;
  border-radius:inherit;
}
table { width:100%; border-collapse:separate; border-spacing:0; }
th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7faf9;
  color: var(--muted);
  font-size:0.75rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
th, td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); vertical-align: middle; }
td { color: var(--ink-2); font-size:0.875rem; }
tbody tr { transition:background var(--transition); }
tbody tr:hover { background:#f7fbfa; }
tbody tr.selected { background:#edf8f4; }
tbody tr:last-child td { border-bottom:0; }
.table-case { color:var(--brand-strong); font-weight:650; }
.table-person { display:flex; align-items:center; gap:8px; min-width:150px; }
.cell-main { color:var(--ink); font-weight:600; }
.cell-sub { color:var(--muted); font-size:var(--text-caption); line-height:1.45; margin-top:var(--space-1); }
.numeric { font-variant-numeric: tabular-nums; text-align:right; }
.row-actions { display:flex; align-items:center; justify-content:flex-end; gap:4px; }
.table-empty { padding:48px 20px; text-align:center; color:var(--muted); }

.home-grid {
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,1.05fr) minmax(260px,.9fr);
  gap:var(--section-gap);
}
.home-grid .wide { grid-column:span 2; }
.list-rows { display:grid; gap:2px; }
.list-row {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:8px 4px;
  border-bottom:1px solid var(--line);
}
.list-row:last-child { border-bottom:0; }
.list-icon {
  width:28px;
  height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  background:var(--surface-3);
  color:var(--brand-strong);
}
.list-icon svg { width:15px; height:15px; }
.list-main { min-width:0; }
.list-main strong,
.list-main span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.list-main strong { color:var(--ink); font-size:var(--text-small); font-weight:600; line-height:1.45; }
.list-main span { margin-top:var(--space-1); color:var(--muted); font-size:var(--text-caption); line-height:1.45; }
.list-meta { color:var(--muted); font-size:0.75rem; text-align:right; white-space:nowrap; }
.list-meta.urgent { color:var(--red); font-weight:750; }

/* Home workload: a readable chart with its exact values in an accessible legend. */
.workload-panel > .panel-body { padding:var(--panel-inset); }
.workload-chart { display:grid; justify-items:center; gap:20px; margin:0; }
.workload-ring { position:relative; width:184px; max-width:100%; aspect-ratio:1; }
.workload-ring > svg { width:100%; height:100%; }
.workload-total { position:absolute; inset:0; display:grid; align-content:center; justify-items:center; gap:6px; }
.workload-total strong { color:var(--ink); font-size:2.25rem; font-weight:750; line-height:1; letter-spacing:-.045em; font-variant-numeric:tabular-nums; }
.workload-total span { color:var(--muted); font-size:.8125rem; line-height:1.3; }
.workload-legend { width:100%; min-width:0; border-collapse:collapse; table-layout:auto; }
.workload-legend thead { background:transparent; }
.workload-legend th,.workload-legend td { padding:9px 0; border:0; border-bottom:1px solid var(--line); white-space:nowrap; font-size:.875rem; }
.workload-legend th { position:static; background:transparent; letter-spacing:normal; text-transform:none; line-height:1.4; }
.workload-legend thead th { padding-top:0; padding-bottom:8px; color:var(--muted); font-size:.75rem; font-weight:500; letter-spacing:0; text-transform:none; }
.workload-legend tbody th { color:var(--ink-2); font-weight:500; text-align:left; }
.workload-legend tbody tr:last-child > * { padding-bottom:0; border-bottom:0; }
.workload-legend tr:hover { background:transparent; }
.workload-legend th:first-child { text-align:left; }
.workload-legend th:not(:first-child),.workload-legend td { text-align:right; padding-left:12px; font-variant-numeric:tabular-nums; }
.workload-legend td:last-child { color:var(--muted); font-size:.8125rem; }
.workload-legend td strong { color:var(--ink); font-weight:700; }
.workload-stage { display:flex; align-items:center; gap:10px; }
.workload-swatch { display:block; flex:0 0 10px; width:10px; height:10px; border-radius:3px; }

.progress-line { height:7px; border-radius:999px; overflow:hidden; background:#e9f0ee; }
.progress-line > span { display:block; height:100%; border-radius:inherit; background:var(--brand); }

.intelligence-card {
  position:relative;
  overflow:hidden;
  background:linear-gradient(135deg,#f2faf7,#fff 62%);
}
.intelligence-card::after {
  content:"";
  position:absolute;
  inset:auto -50px -55px auto;
  width:150px;
  height:150px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(53,192,148,.15),transparent 70%);
  pointer-events:none;
}
.intelligence-chip {
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-bottom:10px;
  padding:4px 8px;
  border-radius:6px;
  background:#def4ec;
  color:#087158;
  font-size:0.75rem;
  font-weight:800;
}
.intelligence-card h3 { margin:0 0 8px; font-size:0.9375rem; line-height:1.35; letter-spacing:-.02em; }
.intelligence-card p { margin:0 0 12px; color:var(--ink-2); font-size:0.875rem; }
.key-list { display:grid; gap:7px; }
.key-item { display:flex; align-items:flex-start; gap:7px; color:var(--ink-2); font-size:0.8125rem; }
.key-item svg { width:14px; height:14px; margin-top:1px; color:var(--brand); }
.key-item.warn svg { color:var(--orange); }
.key-item.red svg { color:var(--red); }

.radar-list { display:grid; gap:10px; }
.radar-row { display:grid; grid-template-columns:30px minmax(0,1fr) auto; align-items:center; gap:9px; }
.radar-number { width:30px; height:30px; display:flex; align-items:center; justify-content:center; border-radius:8px; background:var(--red-pale); color:var(--red); font-size:0.875rem; font-weight:850; }
.radar-number.orange { background:var(--orange-pale); color:var(--orange); }
.radar-number.amber { background:var(--amber-pale); color:var(--amber); }
.radar-row strong { display:block; font-size:0.875rem; }
.radar-row > span:not(.radar-number) > span { display:block; margin-top:2px; color:var(--muted); font-size:0.75rem; }

.case-context {
  position:sticky;
  top:var(--header-height);
  z-index:35;
  display:grid;
  grid-template-columns:minmax(220px,1.1fr) repeat(4,minmax(100px,.45fr)) auto;
  align-items:center;
  gap:10px;
  /* Notices and page headings precede this bar; preserve their vertical spacing. */
  margin:0 calc(-1 * var(--page-gutter)) var(--space-5);
  padding:var(--space-3) var(--page-gutter);
  background:#f7faf9;
  border-bottom:1px solid var(--line);
}
.case-context .person { display:flex; align-items:center; gap:10px; min-width:0; }
/* Keep review-page descriptions clear of the sticky patient context bar,
   including when the heading actions wrap at tablet widths or larger text. */
.page-head:has(+ .case-context) { flex-wrap:wrap; margin-bottom:24px; }
.page-head:has(+ .case-context) .page-title { flex:1 1 340px; }
.page-head + .case-context { margin-top:0; padding-block:16px; border-top:1px solid var(--line); }
.case-context strong,.case-context .person > div > span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.case-context strong { font-size:0.875rem; }
.case-context .person > div > span { color:var(--muted); font-size:0.75rem; }
.context-label { color:var(--muted); font-size:0.75rem; text-transform:uppercase; letter-spacing:.05em; }
.context-value { margin-top:2px; color:var(--ink); font-size:0.8125rem; font-weight:700; }
.case-subnav {
  display:flex;
  gap:2px;
  overflow-x:auto;
  margin:-6px 0 15px;
  padding-bottom:3px;
  scrollbar-width:none;
}
.case-subnav::-webkit-scrollbar { display:none; }
.case-tab {
  flex:0 0 auto;
  min-height:34px;
  border:0;
  border-bottom:2px solid transparent;
  padding:7px 10px;
  background:transparent;
  color:var(--muted);
  font-size:0.875rem;
  font-weight:700;
  cursor:pointer;
}
.case-tab:hover { color:var(--ink); }
.case-tab.active { color:var(--brand-strong); border-bottom-color:var(--brand); }

.case-hero {
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(260px,.8fr);
  gap:14px;
  margin-bottom:14px;
}
.case-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.case-summary-item { padding:12px; border-right:1px solid var(--line); background:#fff; }
.case-summary-item:last-child { border-right:0; }
.case-summary-item span { display:block; color:var(--muted); font-size:0.75rem; text-transform:uppercase; letter-spacing:.04em; }
.case-summary-item strong { display:block; margin-top:6px; color:var(--ink); font-size:0.875rem; }
.case-summary-item strong.brand { color:var(--brand-strong); }

.readiness { display:grid; grid-template-columns:7rem minmax(0,1fr); align-items:center; gap:16px; }
.readiness-ring { position:relative; width:7rem; padding-bottom:1.5rem; }
.readiness-ring svg { width:7rem; height:7rem; }
.readiness-ring > strong { position:absolute; inset:0 0 1.5rem; display:grid; place-items:center; font-size:1.5rem; line-height:1; font-variant-numeric:tabular-nums; }
.readiness-caption { display:block; position:absolute; bottom:0; inset-inline:0; text-align:center; color:var(--muted); font-size:.875rem; line-height:1.4; }
.delay-panel > .panel-body { padding:var(--panel-inset); }
.delay-chart .workload-legend th { white-space:normal; }
.delay-chart .workload-stage { align-items:center; }
.delay-chart .workload-legend td { white-space:nowrap; font-size:.875rem; }

.finding-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.finding-block { padding:11px; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); }
.finding-block h4 { margin:0 0 8px; font-size:0.8125rem; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
.finding-block p { margin:0; color:var(--ink-2); font-size:0.875rem; }

.evidence-list { display:grid; gap:7px; }
.evidence-row {
  display:grid;
  grid-template-columns:28px minmax(0,1fr) auto;
  align-items:center;
  gap:9px;
  min-height:51px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  cursor:pointer;
}
.evidence-row:hover { border-color:#b9d2cc; background:#fbfdfc; }
.evidence-type { width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:7px;background:var(--blue-pale);color:var(--blue); }
.evidence-type svg { width:14px;height:14px; }
.evidence-row strong,.evidence-row > span:not(.evidence-type):not(.status) > span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.evidence-row strong { font-size:0.8125rem; }
.evidence-row > span:not(.evidence-type):not(.status) > span { color:var(--muted); font-size:0.75rem; margin-top:2px; }

.callout {
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:11px 12px;
  border:1px solid #bfe4d8;
  border-radius:9px;
  background:var(--brand-softer);
  color:var(--ink-2);
  font-size:0.875rem;
}
.callout svg { width:17px;height:17px;color:var(--brand-strong);margin-top:1px; }
.callout.warning { border-color:#efd7a5;background:#fff9e9; }
.callout.warning svg { color:var(--orange); }
.callout.danger { border-color:#ecc5c5;background:#fff5f4; }
.callout.danger svg { color:var(--red); }
.callout.info { border-color:#c9d7f9;background:#f4f7ff; }
.callout.info svg { color:var(--blue); }
.callout strong { color:var(--ink); }

.stage-track {
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:0;
  margin:6px 0 14px;
}
.stage {
  position:relative;
  min-width:0;
  padding:0 8px;
  text-align:center;
}
.stage::before {
  content:"";
  position:absolute;
  top:13px;
  left:0;
  right:0;
  height:2px;
  background:var(--line-strong);
}
.stage:first-child::before { left:50%; }
.stage:last-child::before { right:50%; }
.stage-dot {
  position:relative;
  z-index:1;
  width:28px;
  height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 7px;
  border:2px solid var(--line-strong);
  border-radius:50%;
  background:#fff;
  color:var(--muted);
  font-size:0.8125rem;
  font-weight:800;
}
.stage.complete .stage-dot { border-color:#80ceb6;background:#e9f8f3;color:var(--brand-strong); }
.stage.current .stage-dot { border-color:var(--brand);background:var(--brand);color:#fff;box-shadow:0 0 0 5px rgba(10,140,106,.12); }
.stage.complete::before,.stage.current::before { background:#8bd0ba; }
.stage strong { display:block; font-size:0.75rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.stage > span:not(.stage-dot) { display:block; margin-top:2px;color:var(--muted);font-size:0.75rem; }

.workspace {
  min-height: calc(100vh - var(--header-height) - 155px);
  display:grid;
  grid-template-columns:240px minmax(360px,1.2fr) minmax(280px,.78fr);
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}
.workspace-pane { min-width:0; min-height:0; overflow:auto; }
.workspace-pane + .workspace-pane { border-left:1px solid var(--line); }
.workspace-toolbar {
  position:sticky;
  top:0;
  z-index:4;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:48px;
  padding:8px 10px;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
}
.doc-list { padding:8px; display:grid; gap:6px; }
.doc-item {
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  padding:8px;
  border:1px solid transparent;
  border-radius:8px;
  cursor:pointer;
}
.doc-item:hover { background:var(--surface-3); }
.doc-item.active { border-color:#b9dcd1;background:#eef8f5; }
.doc-thumb { width:34px;height:42px;border:1px solid var(--line);border-radius:4px;background:linear-gradient(#fff,#f2f5f4);position:relative;overflow:hidden; }
.doc-thumb::before { content:"";position:absolute;left:6px;right:6px;top:9px;height:2px;background:#cad6d3;box-shadow:0 6px #d5dedc,0 12px #d5dedc,0 18px #e1e7e5; }
.doc-item strong,.doc-item > span:not(.doc-thumb):not(.status) > span { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.doc-item strong { font-size:0.8125rem; }
.doc-item > span:not(.doc-thumb):not(.status) > span { margin-top:2px;color:var(--muted);font-size:0.75rem; }
.document-canvas {
  min-height:680px;
  padding:18px;
  background:#eef2f1;
}
.paper {
  position:relative;
  width:min(640px,100%);
  min-height:820px;
  margin:0 auto;
  padding:38px 42px;
  background:#fff;
  border:1px solid #d2ddda;
  box-shadow:0 16px 35px rgba(26,59,54,.12);
}
.paper-brand { font-size:1.3125rem;font-weight:900;letter-spacing:-.04em;color:#163f7a; }
.paper-line { height:7px;border-radius:2px;background:#dde4e2;margin:10px 0; }
.paper-line.dark { background:#b9c6c2; }
.paper-line.short { width:55%; }
.paper-line.tiny { width:30%; }
.paper-grid { display:grid;grid-template-columns:repeat(2,1fr);gap:18px;margin-top:25px; }
.paper-table { margin-top:28px;border-top:2px solid #9bb0ab; }
.paper-row { display:grid;grid-template-columns:1.2fr .8fr .55fr;gap:12px;padding:9px 2px;border-bottom:1px solid #e1e8e6;font-size:0.8125rem; }
.paper-deadline { margin:24px 0 0;font-size:0.8125rem;color:#26332f; }
.paper-deadline-date { margin:30px 0 0;font-size:0.8125rem; }
.source-highlight {
  position:relative;
  display:inline-block;
  padding:1px 5px;
  border:2px solid #1bb184;
  border-radius:5px;
  background:rgba(71,212,167,.15);
  color:inherit;
  font-weight:700;
}
.source-label {
  position:absolute;
  left:-2px;
  bottom:calc(100% + 2px);
  padding:2px 7px;
  border-radius:5px 5px 5px 0;
  background:#087557;
  color:#fff;
  font-size:0.75rem;
  font-weight:700;
  white-space:nowrap;
}
.review-sidebar { padding:12px; display:grid; gap:10px; }
.review-card { padding:11px;border:1px solid var(--line);border-radius:9px;background:#fff; }
.review-card h4 { margin:0 0 8px;font-size:0.8125rem; }
.review-field { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:7px 0;border-bottom:1px solid var(--line); }
.review-field:last-child { border-bottom:0; }
.review-field span { color:var(--muted);font-size:0.75rem; }
.review-field strong { color:var(--ink);font-size:0.8125rem;text-align:right; }
.review-actions { display:flex;gap:6px;flex-wrap:wrap;margin-top:10px; }

.matrix-wrap { overflow:auto; }
.matrix { min-width:880px; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:#fff; }
.matrix-row { display:grid;grid-template-columns:220px repeat(8,minmax(74px,1fr)); }
.matrix-row > div { min-height:48px;padding:9px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);font-size:0.75rem; }
.matrix-row > div:last-child { border-right:0; }
.matrix-row:last-child > div { border-bottom:0; }
.matrix-head > div { min-height:38px;background:#f6f9f8;color:var(--muted);font-size:0.75rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em; }
.matrix-account strong,.matrix-account span { display:block; }
.matrix-account strong { font-size:0.8125rem; }
.matrix-account span { margin-top:2px;color:var(--muted);font-size:0.75rem; }
.period-cell { display:flex;align-items:center;justify-content:center;gap:5px;text-align:center; }
.period-marker { width:22px;height:22px;display:flex;align-items:center;justify-content:center;border-radius:6px;background:var(--brand-pale);color:var(--brand-strong);font-weight:800; }
.period-marker.missing { background:var(--red-pale);color:var(--red); }
.period-marker.partial { background:var(--orange-pale);color:var(--orange); }
.period-marker.requested { background:var(--blue-pale);color:var(--blue); }

.approval-layout {
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(330px,.7fr);
  gap:14px;
}
.proposal-box { padding:16px;border:1px solid #bfded4;border-radius:10px;background:linear-gradient(135deg,#effaf6,#fff); }
.proposal-box h2 { margin:0 0 6px;font-size:1.0625rem;letter-spacing:-.025em; }
.proposal-box p { margin:0;color:var(--ink-2);font-size:0.875rem; }
.compare-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px; }
.compare-card { padding:12px;border:1px solid var(--line);border-radius:9px;background:#fff; }
.compare-card :is(h3,h4) { margin:0 0 8px;color:var(--muted);font-size:0.75rem;text-transform:uppercase;letter-spacing:.05em; }
.compare-card .value { color:var(--ink);font-size:1rem;font-weight:800; }
.compare-card.proposed { border-color:#b6ddd1;background:#f4fbf8; }
.decision-dock {
  position:sticky;
  bottom:14px;
  z-index:12;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:14px;
  padding:12px;
  border:1px solid var(--line-strong);
  border-radius:12px;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(18px);
  box-shadow:var(--shadow-md);
}
.decision-dock .actions { display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end; }

.checklist { display:grid;gap:5px; }
.check-item {
  display:grid;
  grid-template-columns:23px minmax(0,1fr) auto;
  align-items:start;
  gap:9px;
  padding:9px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
}
.check-box { width:21px;height:21px;display:flex;align-items:center;justify-content:center;border:1px solid var(--line-strong);border-radius:6px;background:#fff;color:transparent;cursor:pointer; }
.check-item.complete .check-box { background:var(--brand);border-color:var(--brand);color:#fff; }
.check-item.fail { border-color:#ecc1c1;background:#fff7f6; }
.check-item.fail .check-box { background:var(--red);border-color:var(--red);color:#fff; }
.check-item strong { display:block;font-size:0.875rem; }
.check-item > span:not(.check-box):not(.status) > span { display:block;margin-top:3px;color:var(--muted);font-size:0.75rem; }

.timeline { position:relative;display:grid;gap:0; }
.timeline::before { content:"";position:absolute;left:17px;top:8px;bottom:8px;width:1px;background:var(--line-strong); }
.timeline-event { position:relative;display:grid;grid-template-columns:35px minmax(0,1fr) auto;gap:10px;padding:9px 0; }
.timeline-icon { position:relative;z-index:1;width:35px;height:35px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#fff;border:1px solid var(--line);color:var(--brand-strong); }
.timeline-icon svg { width:15px;height:15px; }
.timeline-main { min-width:0;padding:3px 0 12px; }
.timeline-main strong { display:block;font-size:0.875rem; }
.timeline-main p { margin:3px 0 0;color:var(--ink-2);font-size:0.8125rem; }
.timeline-main .attachments { display:flex;flex-wrap:wrap;gap:6px;margin-top:8px; }
.timeline-time { color:var(--muted);font-size:0.75rem;white-space:nowrap;padding-top:5px; }

.chart {
  --plot-left:46px;
  --plot-right:20px;
  --plot-top:16px;
  --plot-bottom:42px;
  position:relative;
  height:260px;
  margin-inline:16px;
}
.chart-grid,.chart svg { position:absolute; inset:var(--plot-top) var(--plot-right) var(--plot-bottom) var(--plot-left); width:calc(100% - var(--plot-left) - var(--plot-right)); height:calc(100% - var(--plot-top) - var(--plot-bottom)); }
.chart-grid span { position:absolute; top:var(--y); left:0; right:0; border-top:1px solid var(--line); }
.chart-labels { position:absolute; left:0; top:var(--plot-top); bottom:var(--plot-bottom); width:36px; color:var(--muted); font-size:.8125rem; }
.chart-labels span { position:absolute; top:var(--y); right:0; transform:translateY(-50%); line-height:1; }
.chart-x { position:absolute; left:var(--plot-left); right:var(--plot-right); bottom:8px; height:22px; color:var(--muted); font-size:.8125rem; }
.chart-x span { position:absolute; left:var(--x); transform:translateX(-50%); white-space:nowrap; }
.chart-x span:first-child { transform:none; }
.chart-x span:last-child { transform:translateX(-100%); }
.chart svg { z-index:2; overflow:visible; }
.chart .area { fill:rgba(10,140,106,.10); }
.chart .line { fill:none;stroke:var(--brand);stroke-width:3;stroke-linecap:round;stroke-linejoin:round; }
.chart .line.alt { stroke:var(--blue); }
.chart .dot { fill:#fff;stroke:var(--brand);stroke-width:2; }

.metric-definition { display:flex;align-items:flex-start;gap:8px;color:var(--muted);font-size:0.75rem; }
.metric-definition svg { width:14px;height:14px;color:var(--blue);margin-top:1px; }
.report-card { padding:13px;border:1px solid var(--line);border-radius:10px;background:#fff;cursor:pointer;transition:all var(--transition); }
.report-card:hover { transform:translateY(-1px);border-color:#b8d3cc;box-shadow:var(--shadow-sm); }
.report-card .report-icon { width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:9px;background:var(--brand-pale);color:var(--brand-strong);margin-bottom:11px; }
.report-card :is(h2,h3) { margin:0;font-size:0.875rem; }
.report-card p { margin:5px 0 0;color:var(--muted);font-size:0.75rem; }

.intel-queue { display:grid;gap:8px; }
.intel-item {
  text-align:left;
  display:grid;
  grid-template-columns:36px minmax(0,1fr) auto;
  gap:10px;
  align-items:start;
  padding:11px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fff;
  cursor:pointer;
}
.intel-item:hover { border-color:#b8d4cd;background:#fbfdfc; }
.intel-symbol { width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:9px;background:var(--brand-pale);color:var(--brand-strong); }
.intel-symbol svg { width:18px;height:18px; }
.intel-item :is(h3,h4) { margin:0;font-size:0.875rem; }
.intel-item p { margin:4px 0 0;color:var(--ink-2);font-size:0.75rem; }
.intel-meta { display:flex;align-items:center;gap:7px;margin-top:7px;color:var(--muted);font-size:0.75rem;flex-wrap:wrap; }

.ask-layout {
  min-height:calc(100vh - var(--header-height) - 120px);
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:14px;
}
.ask-thread { display:flex;flex-direction:column;min-height:650px; }
.ask-messages { flex:1;overflow:auto;padding:16px;display:grid;align-content:start;gap:14px; }
.message { max-width:82%;padding:12px 14px;border-radius:12px;font-size:0.875rem; }
.message.user { justify-self:end;background:var(--sidebar);color:#fff;border-bottom-right-radius:4px; }
.message.ai { justify-self:start;background:#fff;border:1px solid var(--line);border-bottom-left-radius:4px;box-shadow:var(--shadow-xs); }
.message.ai h4 { margin:0 0 7px;font-size:0.875rem; }
.message.ai p { margin:0;color:var(--ink-2); }
.citation-list { display:grid;gap:6px;margin-top:10px; }
.citation { display:flex;align-items:center;gap:7px;padding:7px;border:1px solid var(--line);border-radius:7px;background:var(--surface-2);font-size:0.75rem; }
.ask-composer { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px;border-top:1px solid var(--line);background:#fff; }
/* The privacy notice spans the composer so the question and its button keep their two columns. */
.ask-composer .ask-privacy { grid-column:1 / -1; margin:0; }
.ask-composer textarea { min-height:46px;max-height:140px;resize:vertical;border:1px solid var(--line);border-radius:9px;padding:10px;outline:none; }
.ask-composer textarea:focus { border-color:rgba(10,140,106,.55);box-shadow:var(--focus); }

.person-card { padding:14px;border:1px solid var(--line);border-radius:10px;background:#fff; }
.person-card-head { display:flex;align-items:center;gap:10px; }
.person-card-head .meta { min-width:0;flex:1; }
.person-card-head strong,.person-card-head .meta > span { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.person-card-head strong { font-size:0.875rem; }
.person-card-head .meta > span { margin-top:2px;color:var(--muted);font-size:0.75rem; }
.detail-list { display:grid;gap:0;margin-top:0; }
.detail-row:first-child { border-top:0; }
.detail-row { display:grid;grid-template-columns:minmax(120px,.8fr) minmax(0,1.2fr);gap:10px;padding:7px 0;border-top:1px solid var(--line);font-size:0.75rem; }
.detail-row span { color:var(--muted); }
.detail-row strong { color:var(--ink);text-align:right; }

.portal-shell { min-height:100vh;background:linear-gradient(180deg,#eaf6f2,#f8fbfa); }
.portal-head { height:70px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 max(24px,calc((100vw - 1180px)/2));background:#fff;color:var(--ink);border-bottom:1px solid var(--line); }
.portal-brand { display:flex;align-items:center;flex:0 1 140px;min-width:96px; }
.portal-main { width:min(1180px,calc(100% - 32px));margin:0 auto;padding:28px 0 60px; }
.portal-hero { display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr);gap:14px;margin-bottom:14px; }
/* Portal heroes sit on the inverse brand surface; --sidebar is a light rail in the approved design. */
.next-action { padding:18px;border-radius:14px;background:var(--surface-inverse);color:#fff;box-shadow:var(--shadow-md); }
.next-action .context-label { color:#a7e8c6; }
.next-action h2 { margin:0 0 7px;font-size:1.25rem;letter-spacing:-.03em; }
.next-action p { margin:0;color:rgba(255,255,255,.7); }
.next-action .btn { margin-top:16px;background:#fff;color:var(--surface-inverse);border-color:#fff; }
.portal-status { padding:18px;border:1px solid var(--line);border-radius:14px;background:#fff; }

.upload-zone {
  min-height:240px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  border:2px dashed #bad4cd;
  border-radius:12px;
  background:#f7fbfa;
  text-align:center;
  padding:24px;
}
.upload-zone .upload-icon { width:46px;height:46px;display:flex;align-items:center;justify-content:center;border-radius:12px;background:var(--brand-pale);color:var(--brand-strong); }
.upload-zone .upload-icon svg { width:23px;height:23px; }
.upload-zone h3 { margin:0;font-size:1rem; }
.upload-zone p { margin:0;color:var(--muted);font-size:0.875rem; }
.quality-meter { display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:9px;background:#fff; }

.conversation-layout { display:grid;grid-template-columns:320px minmax(0,1fr);min-height:calc(100vh - var(--header-height) - 125px);border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff; }
.thread-list { min-width:0;border-right:1px solid var(--line);overflow:auto; }
.thread-item { display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:9px;padding:11px;border-bottom:1px solid var(--line);cursor:pointer; }
.thread-item:hover { background:var(--surface-2); }
.thread-item.active { background:var(--brand-softer);box-shadow:inset 3px 0 0 var(--brand); }
.thread-item strong,.thread-item > span:not(.avatar):not(.thread-time) > span { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.thread-item strong { font-size:0.875rem; }
.thread-item > span:not(.avatar):not(.thread-time) > span { margin-top:3px;color:var(--muted);font-size:0.75rem; }
.thread-time { color:var(--muted);font-size:0.75rem;white-space:nowrap; }
.thread-view { min-width:0;display:flex;flex-direction:column; }
.thread-head { display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:56px;padding:10px 13px;border-bottom:1px solid var(--line); }
.thread-messages { flex:1;overflow:auto;padding:15px;display:grid;align-content:start;gap:11px;background:#f8fbfa; }
.bubble { max-width:76%;padding:10px 12px;border-radius:11px;background:#fff;border:1px solid var(--line);font-size:0.8125rem;box-shadow:var(--shadow-xs); }
.bubble.out { justify-self:end;background:#dff4ed;border-color:#bee3d7; }
.bubble.internal { max-width:90%;justify-self:center;background:#fff8df;border-color:#eddaa1;color:#674c0b; }
.bubble-meta { margin-top:5px;color:var(--muted);font-size:0.75rem; }
.thread-compose { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:10px;border-top:1px solid var(--line); }
.thread-compose input { min-width:0;height:38px;border:1px solid var(--line);border-radius:9px;padding:0 10px;outline:none; }

.voice-dock {
  position:fixed;
  z-index:90;
  left:calc(var(--sidebar-width) + 24px);
  right:24px;
  bottom:18px;
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto auto;
  align-items:center;
  gap:12px;
  padding:11px 13px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:14px;
  background:rgba(4,38,43,.96);
  color:#fff;
  box-shadow:var(--shadow-lg);
  backdrop-filter:blur(20px);
}
.voice-party { display:flex;align-items:center;gap:10px;min-width:0; }
.voice-party strong,.voice-party > div > span { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.voice-party strong { font-size:0.875rem; }
.voice-party > div > span { margin-top:2px;color:rgba(255,255,255,.8);font-size:0.75rem; }
.voice-state { display:flex;align-items:center;gap:7px;color:#7be2c0;font-size:0.8125rem;font-weight:700; }
.pulse { width:8px;height:8px;border-radius:50%;background:#43d5a7;box-shadow:0 0 0 0 rgba(67,213,167,.5);animation:pulse 1.8s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(67,213,167,.45)}70%{box-shadow:0 0 0 8px rgba(67,213,167,0)}100%{box-shadow:0 0 0 0 rgba(67,213,167,0)} }
.voice-controls { display:flex;gap:6px; }
.voice-btn { width:34px;height:34px;display:flex;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.13);border-radius:9px;background:rgba(255,255,255,.07);color:#fff;cursor:pointer; }
.voice-btn:hover { background:rgba(255,255,255,.14); }
.voice-btn.end { background:#c94040;border-color:#c94040; }

.health-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px; }
.service-card { padding:14px;border:1px solid var(--line);border-radius:10px;background:#fff; }
.service-card-head { display:flex;align-items:center;justify-content:space-between;gap:10px; }
.service-name { display:flex;align-items:center;gap:9px; }
.service-logo { width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:var(--brand-pale);color:var(--brand-strong); }
.service-logo svg { width:17px;height:17px; }
.service-stats { display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:12px; }
.service-stat { padding:8px;border-radius:7px;background:var(--surface-2); }
.service-stat span { display:block;color:var(--muted);font-size:0.75rem;text-transform:uppercase;letter-spacing:.04em; }
.service-stat strong { display:block;margin-top:4px;font-size:0.8125rem; }

.empty-state { min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px;color:var(--muted); }
.empty-icon { width:52px;height:52px;display:flex;align-items:center;justify-content:center;border-radius:14px;background:var(--surface-3);color:var(--brand-strong);margin-bottom:12px; }
.empty-icon svg { width:25px;height:25px; }
.empty-state h3 { margin:0;color:var(--ink);font-size:1rem; }
.empty-state p { max-width:440px;margin:6px 0 0;font-size:0.875rem; }
.empty-state .btn { margin-top:14px; }

.drawer-backdrop,
.modal-backdrop {
  position:fixed;
  inset:0;
  z-index:100;
  background:rgba(3,25,27,.38);
  backdrop-filter:blur(3px);
  animation:fade .16s ease;
}
@keyframes fade { from{opacity:0}to{opacity:1} }
.drawer {
  position:fixed;
  z-index:110;
  top:0;
  right:0;
  width:min(440px,calc(100vw - 20px));
  height:100vh;
  display:flex;
  flex-direction:column;
  background:#fff;
  box-shadow:var(--shadow-lg);
  animation:slide-in .2s ease;
}
@keyframes slide-in { from{transform:translateX(100%)}to{transform:none} }
.drawer-head { display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);min-height:72px;padding:var(--space-3) var(--panel-inset);border-bottom:1px solid var(--line); }
.drawer-head h2 { margin:0;font-size:0.9375rem; }
.drawer-body { flex:1;min-height:0;overflow:auto;padding:var(--panel-inset); }
.drawer-foot { padding:var(--space-4) var(--panel-inset);border-top:1px solid var(--line); }
.modal {
  position:fixed;
  z-index:110;
  left:50%;
  top:50%;
  width:min(680px,calc(100vw - 28px));
  max-height:calc(100vh - 40px);
  display:flex;
  flex-direction:column;
  transform:translate(-50%,-50%);
  border-radius:14px;
  background:#fff;
  box-shadow:var(--shadow-lg);
  animation:modal-in .18s ease;
}
@keyframes modal-in { from{opacity:0;transform:translate(-50%,-48%) scale(.98)}to{opacity:1;transform:translate(-50%,-50%) scale(1)} }
.modal-head { display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);min-height:72px;padding:var(--space-3) var(--panel-inset);border-bottom:1px solid var(--line); }
.modal-head h2 { margin:0;font-size:1rem; }
.modal-body { min-height:0;overflow:auto;padding:var(--panel-inset); }
.modal-foot { display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2);padding:var(--space-4) var(--panel-inset);border-top:1px solid var(--line); }

.form-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-5) var(--space-4); }
.form-group { min-width:0; }
.form-group.full { grid-column:1/-1; }
.form-label { display:block;margin-bottom:var(--space-2);color:var(--ink-2);font-size:var(--text-small);font-weight:600; }
.form-input,
.form-select,
.form-textarea { width:100%;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);outline:none; }
.form-input,.form-select { height:38px;padding:0 10px; }
.form-textarea { min-height:92px;padding:10px;resize:vertical; }
.form-input:focus,.form-select:focus,.form-textarea:focus { border-color:rgba(10,140,106,.55);box-shadow:var(--focus); }
.form-help { margin-top:var(--space-2);color:var(--muted);font-size:var(--text-caption);line-height:1.45; }

.toast-stack { position:fixed;z-index:200;right:18px;bottom:18px;display:grid;gap:8px;pointer-events:none; }
.toast { min-width:280px;max-width:390px;display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:start;gap:9px;padding:11px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:var(--shadow-md);animation:toast-in .2s ease;pointer-events:auto; }
@keyframes toast-in { from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none} }
.toast-icon { width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:var(--brand-pale);color:var(--brand-strong); }
.toast-icon svg { width:15px;height:15px; }
.toast strong { display:block;font-size:0.875rem; }
.toast > span:not(.toast-icon) > span { display:block;margin-top:2px;color:var(--muted);font-size:0.75rem; }
.toast button { border:0;background:transparent;color:var(--muted);cursor:pointer; }

.command-results { display:grid;gap:4px; }
.command-section { padding:9px 9px 4px;color:var(--muted);font-size:0.75rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em; }
.command-item { display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:9px;padding:9px;border-radius:8px;cursor:pointer; }
.command-item:hover,.command-item.active { background:var(--surface-3); }
.command-icon { width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:#fff;border:1px solid var(--line);color:var(--brand-strong); }
.command-icon svg { width:16px;height:16px; }
.command-item strong,.command-item > span:not(.command-icon):not(.command-key) > span { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.command-item strong { font-size:0.875rem; }
.command-item > span:not(.command-icon):not(.command-key) > span { margin-top:2px;color:var(--muted);font-size:0.75rem; }
.command-key { padding:2px 6px;border:1px solid var(--line);border-radius:5px;color:var(--muted);font-size:0.75rem; }

.service-banner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
  padding:10px 12px;
  border:1px solid #efd5a2;
  border-radius:9px;
  background:#fff8e7;
  color:#695011;
}
.service-banner strong { color:#543d03; }
.service-banner p { margin:2px 0 0;font-size:0.75rem; }

.mobile-only { display:none; }
.desktop-only { display:initial; }

@media (max-width: 1280px) {
  :root { --sidebar-width:216px; --page-gutter:var(--space-6); }
  .sidebar-head { padding-inline:14px; }
  .page-wrap { padding-inline:var(--page-gutter); }
  .case-context { margin-inline:calc(-1 * var(--page-gutter));padding-inline:var(--page-gutter);grid-template-columns:minmax(210px,1.1fr) repeat(3,minmax(90px,.45fr)) auto; }
  .case-context .hide-medium { display:none; }
  .home-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .home-grid .wide { grid-column:auto; }
  .home-grid .intelligence-card { grid-column:1/-1; }
  .workspace { grid-template-columns:210px minmax(340px,1fr) 300px; }
  .grid-5 { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

@media (max-width: 1040px) {
  :root { --sidebar-width:0px; --page-gutter:var(--space-4); }
  .app-shell { display:block; }
  .app-main { grid-column:auto; }
  .sidebar {
    width:min(280px,86vw);
    transform:translateX(-105%);
    box-shadow:var(--shadow-lg);
    transition:transform .22s ease;
  }
  body.sidebar-open .sidebar { transform:none; }
  body.sidebar-open::after { content:"";position:fixed;inset:0;z-index:55;background:rgba(3,25,27,.42);backdrop-filter:blur(2px); }
  .sidebar-close { display:inline-flex; }
  .mobile-menu { display:inline-flex; }
  .topbar { grid-template-columns:auto minmax(220px,1fr) auto; padding-inline:14px;gap:10px; }
  .topbar-center { display:none; }
  .profile-button { min-width:0;grid-template-columns:31px auto; }
  .profile-button > div { display:none; }
  .page-wrap { padding:var(--space-6) var(--page-gutter) 42px; }
  .case-context { top:var(--header-height);margin:0 calc(-1 * var(--page-gutter)) var(--space-4);padding:var(--space-3) var(--page-gutter);grid-template-columns:minmax(220px,1fr) repeat(2,minmax(90px,.4fr)) auto; }
  .case-context .hide-tablet { display:none; }
  .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .grid-4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .grid-3 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .case-hero { grid-template-columns:1fr; }
  .workspace { grid-template-columns:190px minmax(330px,1fr); }
  .workspace-pane.review-pane { grid-column:1/-1;border-left:0!important;border-top:1px solid var(--line);max-height:none; }
  .approval-layout { grid-template-columns:1fr; }
  .ask-layout { grid-template-columns:1fr; }
  .ask-layout > .panel:last-child { order:-1; }
  .health-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .portal-hero { grid-template-columns:1fr; }
  .voice-dock { left:16px;right:16px; }
}

@media (max-width: 720px) {
  body { font-size:1rem; }
  .topbar { grid-template-columns:auto minmax(0,1fr) auto;height:62px; }
  :root { --header-height:62px; }
  .global-search input { height:36px;padding-right:10px; }
  .search-hint { display:none; }
  .topbar-actions .desktop-action { display:none; }
  .profile-button { display:none; }
  .page-head { align-items:flex-start; }
  .page-actions { width:100%;justify-content:flex-start; }
  .page-title h1 { font-size:1.75rem; }
  .stats-grid,.grid-2,.grid-3,.grid-4,.grid-5,.finding-grid,.form-grid { grid-template-columns:1fr; }
  .span-2,.span-3 { grid-column:auto; }
  .home-grid { grid-template-columns:1fr; }
  .home-grid .intelligence-card { grid-column:auto; }
  .case-context { grid-template-columns:minmax(0,1fr) auto; }
  .case-context > :not(.person):not(.context-actions) { display:none; }
  .case-context .context-actions .btn span { display:none; }
  .case-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .case-summary-item:nth-child(2) { border-right:0; }
  .case-summary-item:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .workspace { display:block;min-height:auto; }
  .workspace-pane { max-height:none;overflow:visible; }
  .workspace-pane + .workspace-pane { border-left:0;border-top:1px solid var(--line); }
  .workspace .doc-list-pane { max-height:300px;overflow:auto; }
  .document-canvas { min-height:auto;padding:10px; }
  .paper { min-height:600px;padding:24px 22px; }
  .compare-grid { grid-template-columns:1fr; }
  .decision-dock { align-items:stretch;flex-direction:column; }
  .decision-dock .actions { justify-content:stretch; }
  .decision-dock .actions .btn { flex:1; }
  .stage-track { overflow-x:auto;grid-template-columns:repeat(6,120px);padding-bottom:8px; }
  .conversation-layout { display:block;min-height:auto; }
  .thread-list { max-height:270px;border-right:0;border-bottom:1px solid var(--line); }
  .thread-view { min-height:560px; }
  .health-grid { grid-template-columns:1fr; }
  .portal-head { padding-inline:16px; }
  .portal-main { width:min(100% - 24px,1180px);padding-top:16px; }
  .voice-dock { grid-template-columns:minmax(0,1fr) auto;bottom:10px;padding:9px; }
  .voice-state { display:none; }
  .voice-controls .voice-btn:nth-child(-n+2) { display:none; }
  .toast-stack { left:10px;right:10px;bottom:10px; }
  .toast { min-width:0;max-width:none; }
  .desktop-only { display:none!important; }
  .mobile-only { display:initial; }
}

@media (max-width: 480px) {
  .page-wrap { padding-inline:var(--page-gutter); }
  .case-context { margin-inline:calc(-1 * var(--page-gutter));padding-inline:var(--page-gutter); }
  .topbar { padding-inline:9px; }
  .global-search { min-width:0; }
  .global-search input::placeholder { color:transparent; }
  .page-head { display:block; }
  .page-actions { margin-top:12px; }
  .stats-grid { gap:8px; }
  .stat-card { padding:12px; }
  .stat-value { font-size:1.75rem; }
  .panel-body { padding:var(--panel-inset); }
  .toolbar { align-items:stretch; }
  .toolbar .field-wrap,.toolbar input.field.search,.toolbar .select-field { width:100%;min-width:0; }
  .case-summary-grid { grid-template-columns:1fr; }
  .case-summary-item { border-right:0;border-bottom:1px solid var(--line); }
  .case-summary-item:last-child { border-bottom:0; }
  .matrix-row { grid-template-columns:180px repeat(8,70px); }
  .paper { min-height:520px; }
  .bubble,.message { max-width:92%; }
  .modal { width:calc(100vw - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important; }
}

/*
 * UI-012 chrome. Hidden on screen; the print block below is what shows it, so
 * the markup can be rendered once by the shell rather than assembled at the
 * moment somebody reaches for Print.
 */
.print-chrome { display:none; }

@media print {
  /* Room for the running header and footer on every sheet. */
  @page { margin:18mm 14mm 20mm; }
  .sidebar,.topbar,.page-actions,.btn,.icon-btn,.decision-dock,.voice-dock { display:none!important; }
  .app-shell,.app-main { display:block; }
  .page-wrap { max-width:none;padding:0; }
  .panel { box-shadow:none;break-inside:avoid; }
  /* UI-012: headings survive a page break, and a heading never ends a page. */
  h1,h2,h3 { break-after:avoid-page;break-inside:avoid; }
  /*
   * A fixed element repeats on every printed sheet, which is how the
   * confidentiality label and the record identity reach page four as well as
   * page one. `counter(page)` and `counter(pages)` are the paginating engine's
   * own numbering; nothing else knows how many sheets there will be.
   */
  .print-chrome {
    display:flex;
    position:fixed;
    left:0;
    right:0;
    gap:12px;
    justify-content:space-between;
    font-size:9pt;
    color:#000;
  }
  .print-chrome-header { top:0;border-bottom:1px solid #000;padding-bottom:2mm; }
  .print-chrome-footer { bottom:0;border-top:1px solid #000;padding-top:2mm; }
  .print-confidentiality { font-weight:700;text-transform:uppercase;letter-spacing:.04em; }
  .print-document { min-width:0;overflow-wrap:anywhere; }
  .print-page { flex-shrink:0;white-space:nowrap; }
  .print-page-number::after { content:counter(page); }
  .print-page-total::after { content:counter(pages); }
}

/* Native button reset for row-style controls. */
.list-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}
.list-row:hover { background: var(--surface-2); }
.list-row:focus-visible { position: relative; z-index: 1; }

/* Prevent page-level horizontal drift while preserving table/workspace scrolling. */
html, body, .app-shell, .app-main, .portal-shell { max-width: 100%; overflow-x: visible; }
.page-wrap { max-width: 100%; }
.panel, .person-card, .portal-head > *, .portal-main > * { min-width: 0; }
.person-card { width: 100%; overflow: hidden; text-align: left; }

@media (max-width: 720px) {
  .segmented {
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: thin;
  }
  .segmented button { flex: 0 0 auto; }
  .portal-head > div:last-child { min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 480px) {
  .portal-head .status,
  .portal-head .avatar { display: none; }
  .person-card-head { align-items: flex-start; }
  .detail-row { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .detail-row strong { overflow-wrap: anywhere; }
}

/* Grid chrome visibility must override the shared icon-button display rule. */
.mobile-menu, .sidebar-close { display: none !important; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@media (max-width: 1040px) {
  .mobile-menu, .sidebar-close { display: inline-flex !important; }
}

/* Shared readable typography and resilient layout primitives. */
body { font-size:1rem; line-height:1.5; }
.panel-title h2,.panel-title h3,.modal-head h2,.drawer-head h2 { font-size:var(--text-section); font-weight:650; line-height:1.35; letter-spacing:-.015em; }
button,input,select,textarea { line-height:1.4; }
.btn,.btn.small,.btn.large { min-height:44px; font-size:var(--text-small); font-weight:600; border-radius:var(--radius-sm); padding-inline:var(--space-4); white-space:normal; }
.btn > span { color:inherit; margin:0; }
.icon-btn { min-width:44px; min-height:44px; }
input.field,.select-field,.form-input,.form-select,.form-textarea,.thread-compose input,.ask-composer textarea { font-size:1rem; min-height:44px; }
input::placeholder,textarea::placeholder { color:var(--muted); opacity:1; }
input[type="checkbox"] { min-width:24px; min-height:24px; accent-color:var(--brand); }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible { outline:2px solid var(--brand-strong); outline-offset:3px; }
.avatar,.radar-number,.stage-dot,.check-box { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; line-height:1; text-align:center; }
.avatar { width:38px; height:38px; font-size:.875rem; }
.avatar.sm { width:34px; height:34px; font-size:.8125rem; }
.avatar.lg { width:48px; height:48px; font-size:1rem; }
.stage-dot { width:36px; height:36px; font-size:.875rem; margin:0 auto 8px; }
.radar-number { width:38px; height:38px; margin:0; font-size:1rem; }
.check-box { width:26px; height:26px; margin:0; padding:0; }
button.check-box { min-width:44px; min-height:44px; }
.stage { background:transparent; border:0; color:inherit; padding:8px; }
.stage strong { white-space:normal; }
.stage-track { align-items:start; }
.stage::before { top:26px; }
.nav-item { min-height:44px; }
.nav-label { white-space:normal; }
.nav-badge,.icon-count { display:flex; align-items:center; justify-content:center; line-height:1; min-width:22px; min-height:22px; padding:3px; }
.list-main strong,.list-main span,.evidence-row strong,.doc-item strong,.person-card-head .meta,.person-card-head strong,.case-context .person > div > span { white-space:normal; overflow-wrap:anywhere; }
.case-context { grid-template-columns:minmax(220px,1.7fr) repeat(3,minmax(100px,1fr)) auto; gap:14px; }
.case-context .hide-medium { display:none; }
.case-context .person { min-width:0; }
.user-card > span:not(.avatar),.profile-button > div { min-width:0; }
.table-wrap { max-width:100%; }
th { font-size:.8125rem; }
td { font-size:.875rem; }
th,td { padding:var(--space-3) var(--space-4); }
.cell-sub { display:block; font-size:.8125rem; }
.table-person { min-width:170px; }
.table-person > div { min-width:0; }
.row-link { text-align:left; font-weight:700; padding:6px 0; min-height:36px; }
.portfolio-grid { grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr); }
.portfolio-grid > *, .grid > *, .panel,.page-wrap { min-width:0; }
.workspace { grid-template-columns:minmax(190px,.75fr) minmax(300px,1.4fr) minmax(270px,1fr); overflow:visible; }
.workspace-toolbar { flex-wrap:wrap; gap:10px; }
.workspace-toolbar > div { min-width:0; }
.workspace-toolbar strong { overflow-wrap:anywhere; }
.doc-item { grid-template-columns:28px minmax(0,1fr); }
.doc-item > .status { grid-column:2; justify-self:start; }
.paper { min-width:0; width:100%; min-height:380px; height:auto; padding:24px; }
.paper .detail-row { font-size:1em; }
.paper p { font-size:1em; }
.paper h3 { overflow-wrap:anywhere; }
.document-canvas { min-height:440px; padding:18px; }
.coverage-table { width:100%; min-width:680px; border:1px solid var(--line); border-collapse:separate; border-spacing:0; }
.coverage-table th:first-child { position:sticky; left:0; z-index:1; background:var(--surface); width:40%; min-width:220px; max-width:280px; white-space:normal; }
.coverage-table thead th { background:var(--surface-3); text-align:center; }
.coverage-table thead th:first-child { background:var(--surface-3); text-align:left; }
.coverage-table td { text-align:center; min-width:100px; }
.period-marker { appearance:none; border:1px solid var(--line-strong); padding:0; margin:auto; width:40px; height:40px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:var(--surface-3); color:var(--muted); font:inherit; line-height:1; cursor:pointer; }
.period-marker svg { width:20px; height:20px; stroke-width:2.4; }
.period-marker.present { background:var(--brand-pale); color:var(--brand-strong); border-color:var(--brand-strong); }
.period-marker.missing,.period-marker.unreadable { background:var(--red-pale); color:var(--red); border-color:var(--red); }
.period-marker.partial,.period-marker.conflict { background:var(--orange-pale); color:var(--orange); border-color:var(--orange); }
.period-marker.requested { background:var(--blue-pale); color:var(--blue); border-color:var(--blue); }
.period-label { display:block; font-size:.75rem; margin-top:5px; color:var(--ink-2); }
.matrix-help { color:var(--muted); font-size:.875rem; }
.financial-account-card { display:flex; }
.financial-account-card > .panel-body { display:flex; flex-direction:column; flex:1; min-width:0; }
.financial-account-actions { display:flex; justify-content:center; margin-top:auto; padding-top:10px; }
.matrix-legend { display:flex; flex-wrap:wrap; gap:12px; margin-top:14px; font-size:.8125rem; color:var(--ink-2); }
.matrix-legend > span { display:flex; align-items:center; gap:5px; }
.matrix-legend svg { width:16px; height:16px; }
.demo-banner { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; background:var(--surface); border:1px solid var(--line-strong); border-radius:10px; padding:10px 14px; margin-bottom:18px; font-size:.8125rem; }
.demo-banner > span { flex:1; min-width:190px; color:var(--muted); }
.view-results { color:var(--muted); font-size:.8125rem; margin:10px 0 0; }
.overlay-open { overflow:hidden; }
.modal { max-height:calc(100dvh - 32px); }
.modal-body { overflow:auto; min-height:0; }
.modal-backdrop,.drawer-backdrop { cursor:default; }
.saved-record { padding:12px 0; border-bottom:1px solid var(--line); }
.saved-record pre { white-space:pre-wrap; overflow-wrap:anywhere; font-size:.8125rem; }
.saved-record summary { cursor:pointer; }
.chart-data { margin:0 18px 18px; font-size:.875rem; }
.chart-data table { width:100%; }
.next-action h1 { font-size:1.75rem; margin:0 0 12px; line-height:1.2; }
.next-action p { color:#d5eee7; }
.check-item { grid-template-columns:auto minmax(0,1fr) auto; gap:10px; }
.thread-head h2 { font-size:1.125rem; margin:0; }
.thread-head p { font-size:.8125rem; color:var(--muted); }
.thread-compose { flex-wrap:wrap; }
.thread-compose input { min-width:160px; flex:1; }
.thread-messages { min-height:220px; }
.segmented { max-width:100%; flex-wrap:wrap; }
.toolbar { flex-wrap:wrap; }
.stat-card { cursor:default; }
@media(max-width:1400px) {
 .workspace { grid-template-columns:minmax(180px,.65fr) minmax(0,1.5fr); }
 .workspace .review-pane { grid-column:1/-1; border-left:0; border-top:1px solid var(--line); max-height:none; }
 .review-sidebar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
 .case-context { grid-template-columns:minmax(210px,1.5fr) repeat(2,minmax(90px,1fr)) auto; }
 .case-context .hide-tablet { display:none; }
 .home-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .home-grid .wide { grid-column:auto; }
}
@media(max-width:1100px) {
 .portfolio-grid { grid-template-columns:minmax(0,1fr); }
 .conversation-layout { grid-template-columns:minmax(220px,.75fr) minmax(0,1.5fr); }
 .grid-4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .case-context { grid-template-columns:minmax(0,1fr) auto; }
 .case-context > div:not(.person):not(.context-actions) { display:none; }
}
@media(max-width:760px) {
 .page-wrap,.portal-main { padding:16px; }
 .home-grid,.portfolio-grid,.conversation-layout,.grid-2,.grid-3,.grid-4 { grid-template-columns:minmax(0,1fr); }
 .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .stat-card { padding:14px; min-height:118px; }
 .stat-label { font-size:.875rem; }
 .stat-change { font-size:.75rem; }
 .stat-icon { display:none; }
 .page-actions { width:100%; }
 .page-actions .btn { flex:1; }
 .workspace { display:block; }
 .review-sidebar { display:block; }
 .case-context .context-actions .btn span { display:block; }
 .case-context .context-actions .btn { max-width:130px; }
 .check-item { grid-template-columns:26px minmax(0,1fr); }
 .check-item > .btn,.check-item > .status { grid-column:2; justify-self:start; }
 .stage-track { grid-template-columns:repeat(6,minmax(100px,1fr)); }
 .next-action .stage-track { grid-template-columns:repeat(4,minmax(80px,1fr)); }
 .portal-head { flex-wrap:wrap; gap:12px; padding:16px; }
 .portal-head > div { flex-wrap:wrap; }
 .thread-list { max-height:250px; overflow:auto; }
 .thread-item { min-height:70px; }
 .demo-banner { align-items:flex-start; }
 .demo-banner > span { min-width:100%; }
 .demo-banner .btn { margin-left:0; }
 .coverage-table { min-width:620px; }
 .coverage-table th:first-child { min-width:180px; max-width:180px; }
 .coverage-table td { min-width:110px; }
 .chart-x.is-monthly span:where(:nth-child(even):not(:last-child),:nth-last-child(2)) { display:none; }
 .decision-dock { position:static; }
 .modal { width:calc(100% - 24px); max-height:calc(100dvh - 24px); }
 .modal-foot { flex-wrap:wrap; }
 .detail-row { grid-template-columns:minmax(90px,.75fr) minmax(0,1.25fr); }
 .detail-row strong { overflow-wrap:anywhere; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *,*::before,*::after { transition:none!important; animation:none!important; } }
.status,.badge { align-self:flex-start; flex-shrink:0; }
.coverage-table tbody th { text-transform:none; letter-spacing:normal; font-weight:400; color:var(--ink); }
.coverage-table tbody th strong { font-size:.875rem; }
.coverage-table tbody th .cell-sub { font-weight:400; }
.sample-metric { display:block; margin-top:4px; color:var(--muted); font-size:.75rem; }
.table-wrap table { min-width:720px; }
.row-link { display:block; width:100%; }
.row-link .table-person { text-align:left; }
.table-wrap td:first-child:has(.row-link) { min-width:180px; }
.sidebar[inert] { visibility:hidden; }
@media(min-width:1041px) { .sidebar[inert] { visibility:visible; } }
@media(max-width:760px) { .topbar { padding-inline:10px; gap:6px; } .global-search { min-width:0; } .topbar-actions { gap:0; } }
.filter-chip,.case-tab,.segmented button,.citation { min-height:44px; }

/* Global Ask Caidwise stays alongside the current workspace. */
.topbar-ask { flex-shrink:0; min-height:44px; white-space:nowrap; }
.ask-backdrop { background:rgba(3,25,27,.14); backdrop-filter:none; }
.ask-drawer { width:min(520px,100vw); height:100dvh; border-left:1px solid var(--line); box-shadow:none; animation:none; overflow:auto; }
.ask-drawer.is-opening { animation:slide-in .2s ease; }
.ask-drawer .drawer-head { min-height:80px; flex-shrink:0; padding:14px 20px; }
.ask-heading { display:flex; align-items:center; gap:12px; min-width:0; }
.ask-heading > svg { flex-shrink:0; width:24px; height:24px; color:var(--brand); }
.ask-heading p { margin:4px 0 0; font-size:.875rem; color:var(--muted); }
.ask-context { padding:16px 20px; background:var(--surface-2); flex-shrink:0; }
.ask-context > span { display:block; color:var(--muted); font-size:.8125rem; margin-bottom:4px; }
.ask-context strong { display:block; font-size:1rem; overflow-wrap:anywhere; }
.ask-context p { margin:4px 0 0; font-size:.875rem; color:var(--ink-2); overflow-wrap:anywhere; }
.ask-unavailable { margin:0; padding:14px 20px; background:var(--orange-pale); color:var(--ink); font-size:.9375rem; flex-shrink:0; }
/* The conversation log is the scroll region. The thread never shrinks below the log's 100px floor
   plus the composer, so a short drawer scrolls as a whole instead of spilling the composer under its
   foot; `contain:size` keeps the history itself out of that minimum, so a long conversation scrolls
   inside the log and the composer stays in view. */
.ask-drawer .ask-thread { flex:1; min-height:auto; overflow:visible; }
.ask-drawer .ask-messages { min-height:100px; padding:20px; contain:size; }
.ask-thread .message { font-size:1rem; line-height:1.55; overflow-wrap:anywhere; white-space:pre-wrap; }
.ask-thread .message.ai { background:var(--surface-2); border:0; box-shadow:none; }
.ask-thread .message.ai h4 { font-size:.9375rem; }
.ask-thread .citation-list { white-space:normal; }
.ask-thread .citation { font-size:.875rem; text-align:left; }
.ask-drawer .message { max-width:94%; }
.ask-suggestions { padding:0 20px 16px; display:grid; gap:8px; flex-shrink:0; }
.ask-suggestions p { margin:0 0 2px; color:var(--muted); font-size:.875rem; }
.ask-suggestions .btn { justify-content:flex-start; text-align:left; background:var(--surface-2); border:0; box-shadow:none; white-space:normal; }
.ask-suggestions .btn:hover { background:var(--surface-3); }
.ask-drawer .ask-composer { padding:16px 20px max(16px,env(safe-area-inset-bottom)); flex-shrink:0; align-items:end; }
.ask-drawer .ask-composer textarea { min-height:88px; max-height:160px; width:100%; }
.ask-drawer .ask-composer .btn { min-height:44px; }
@media (min-width:1041px) and (max-width:1400px) {
  .topbar { grid-template-columns:minmax(0,1fr) auto; }
  .topbar-center { display:none; }
}
@media (max-width:480px) {
  :root { --header-height:112px; }
  .topbar { height:auto; min-height:var(--header-height); grid-template-columns:44px minmax(0,1fr) auto; padding-block:8px; row-gap:8px; }
  .topbar .mobile-menu { grid-column:1; grid-row:1; }
  .topbar .global-search { grid-column:1 / -1; grid-row:2; }
  .topbar .global-search input::placeholder { color:var(--muted); }
  .topbar-actions { grid-column:2 / -1; grid-row:1; justify-content:flex-end; gap:4px; }
  .ask-drawer { border-left:0; }
  .ask-drawer .drawer-head,.ask-context,.ask-unavailable { padding-inline:16px; }
  .ask-drawer .ask-messages { padding:16px; }
  .ask-suggestions { padding-inline:16px; }
  .ask-drawer .ask-composer { padding-inline:12px; gap:8px; }
  .readiness { grid-template-columns:minmax(0,1fr); }
  .chart { --plot-left:42px; --plot-right:10px; margin-inline:12px; }
  .chart-x.is-monthly span { display:none; }
  .chart-x.is-monthly span:is(:first-child,:nth-child(4),:nth-child(8),:last-child) { display:block; }
}
@media (prefers-reduced-motion:reduce) { .ask-drawer.is-opening { animation:none; } }

.source-excerpt { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 50vh; overflow: auto; padding: 16px; background: var(--surface-alt, #f3f7f6); }
.demo-banner { flex-wrap: wrap; }

/* Authenticated caidwise-ui-suite: reuse the approved shell, palette and panels. */
.live-brand { width:170px; }
/* UX-83: the sign-in front door matches the managed-identity passkey page
   (infra/identity/themes/caidwise/login/resources/css/caidwise.css). */
main.live-sign-in { box-sizing:border-box; min-height:100vh; min-height:100svh; display:grid; place-items:center; margin:0; padding:48px 24px; background:#f4f6f5; }
.live-sign-in > .panel { box-sizing:border-box; width:min(100%,606px); border:1px solid #dce2e7; border-radius:16px; background:#fff; box-shadow:0 12px 42px rgba(22,60,47,.06),0 1px 2px rgba(22,60,47,.03); }
.live-sign-in > .panel > .panel-body { padding:48px 52px 42px; font-size:1rem; line-height:1.5; }
.live-sign-in-brand { display:block; width:200px; height:auto; margin:0 0 34px; }
.live-sign-in h1 { margin:0; font-size:2rem; font-weight:650; line-height:1.2; letter-spacing:-.03em; color:var(--ink); }
.live-sign-in .panel-body > p { margin:8px 0 24px; font-size:1rem; color:var(--muted); }
.live-sign-in .panel-body > .btn { display:flex; width:100%; min-height:52px; margin:0; padding:12px 20px; border-radius:9px; font-size:1rem; font-weight:600; }
.live-sign-in .panel-body > .btn + .btn { margin-top:12px; }
.live-sign-in .panel-body > .muted:last-child { margin:24px 0 0; font-size:.875rem; text-align:center; }
@media (max-width:520px) {
  main.live-sign-in { place-items:start center; padding:12vh 16px 32px; }
  .live-sign-in > .panel > .panel-body { padding:32px 24px 28px; }
  .live-sign-in-brand { width:168px; margin-bottom:28px; }
  .live-sign-in h1 { font-size:1.75rem; }
}
/* Task 381: approved soft-halo transition. No timing here controls navigation. */
.live-auth-transition {
  --auth-paper:#f7faf8;
  --auth-panel:#fff;
  --auth-ink:#112f29;
  --auth-muted:#536e64;
  --auth-accent:#087557;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  min-height:100vh;
  min-height:100svh;
  display:grid;
  place-items:center;
  padding:44px 24px;
  background:var(--auth-paper);
  color:var(--auth-ink);
}
.live-auth-transition::before { content:""; position:absolute; inset:0; z-index:-1; background:radial-gradient(ellipse at 50% 43%,color-mix(in srgb,var(--auth-accent) 7%,transparent),transparent 59%); }
.live-auth-connect { display:flex; flex-direction:column; align-items:center; text-align:center; }
.live-auth-emblem { width:124px; height:124px; display:grid; place-items:center; position:relative; margin-bottom:22px; }
.live-auth-halo { position:absolute; inset:0; border:1px solid color-mix(in srgb,var(--auth-accent) 20%,transparent); border-radius:50%; animation:live-auth-halo 2.4s ease-out infinite; }
.live-auth-halo:nth-child(2) { animation-delay:1.2s; }
.live-auth-mark-plate { width:80px; height:80px; border-radius:24px; display:grid; place-items:center; background:var(--auth-panel); box-shadow:0 8px 32px color-mix(in srgb,var(--auth-accent) 10%,transparent); animation:live-auth-breathe 2.4s ease-in-out infinite; }
.live-auth-mark { width:48px; height:48px; }
.live-auth-name { font-size:27px; font-weight:500; letter-spacing:-.8px; line-height:1.5; margin:0 0 8px; }
.live-auth-status { margin:0; color:var(--auth-muted); font-size:14px; line-height:1.5; min-height:22px; }
.live-auth-dots { display:flex; gap:5px; margin-top:20px; height:6px; }
.live-auth-dots span { width:4px; height:4px; background:var(--auth-accent); border-radius:50%; animation:live-auth-dot 1.4s ease-in-out infinite; }
.live-auth-dots span:nth-child(2) { animation-delay:.15s; }
.live-auth-dots span:nth-child(3) { animation-delay:.3s; }
@keyframes live-auth-halo { 0% { transform:scale(.64); opacity:0; } 18% { opacity:.75; } 100% { transform:scale(1.23); opacity:0; } }
@keyframes live-auth-breathe { 0%,100% { transform:scale(1); } 50% { transform:scale(1.035); } }
@keyframes live-auth-dot { 0%,75%,100% { opacity:.25; } 35% { opacity:1; } }
/* UX-05: no dark variant. The app it hands over to is light, so a dark splash only flashed. */
@media (prefers-reduced-motion:reduce) {
  .live-auth-halo { display:none; animation:none; }
  .live-auth-mark-plate,.live-auth-dots span { animation:none; }
}
@media (max-width:420px) {
  .live-auth-transition { padding:36px 22px; }
}
.live-shell .sidebar-head > button { display:none; }
.live-shell .sidebar-foot { color:#d2e4e0; font-size:var(--text-caption); padding:var(--space-4); }
.live-shell .nav-item { font-size:.9375rem; font-weight:550; }
.live-shell .nav-item.active { font-weight:650; }
.live-shell .topbar { display:flex; align-items:center; justify-content:space-between; }
/* The top bar and content share a gutter, including on wide monitors. */
.live-shell { --live-gutter:22px; }
@media (min-width:1500px) { .live-shell { --live-gutter:28px; } }
@media (max-width:1200px) { .live-shell { --live-gutter:18px; } }
@media (max-width:720px) { .live-shell { --live-gutter:16px; } }
.live-shell .page-wrap { padding-inline:var(--live-gutter); }
.live-shell .topbar { padding-inline:var(--live-gutter); }
/* R1-29: an open compact drawer dims the page behind it; tapping the dimmed page closes it. */
.live-navigation-scrim { display:none; }
.live-shell .topbar > button { display:none; }
.live-shell .topbar > .status { align-self:center; }
.live-shell .page-wrap > .panel, .live-home-grid { margin-bottom:var(--section-gap); }
.live-home-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--section-gap); align-items:start; }
.live-home-grid .panel { min-width:0; scroll-margin-top:120px; }
/* M-04: a Home card shows five rows and links to its page for the rest. */
.live-shell .live-view-all { display:inline-flex; align-items:center; min-height:44px; margin-top:4px; font-size:.875rem; font-weight:600; color:var(--brand,#087557); }
.live-shell .live-view-all:hover { text-decoration:underline; }
.live-shell .panel-header h2 { font-size:var(--text-section); font-weight:650; line-height:1.35; letter-spacing:-.015em; margin:0; }
.live-counts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-top:22px; }
.live-counts a { display:grid; gap:var(--space-1); padding:var(--panel-inset); background:var(--surface-3); border-radius:var(--radius-md); }
.live-counts strong { font-size:2rem; font-weight:650; line-height:1.2; letter-spacing:-.035em; font-variant-numeric:tabular-nums; }
.live-counts span { font-size:.8125rem; color:var(--muted); }
.live-work-list { padding:0; margin:0; list-style:none; }
.live-work-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 0; border-bottom:1px solid var(--line); }
.live-work-row:last-child { border-bottom:0; }
.live-work-row > div, .live-brief-row > .live-work-summary { flex:1 1 16rem; min-width:0; overflow-wrap:anywhere; }
.live-brief-row > .live-work-actions { display:flex; flex:0 1 auto; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; max-width:100%; }
.live-work-row p { margin:5px 0 0; font-size:.8125rem; }
.live-work-row .btn { flex-shrink:0; }
.live-brief-row .live-work-actions .btn { flex:0 0 auto; max-width:100%; white-space:normal; }
.live-source-fields { display:grid; grid-template-columns:100px minmax(0,1fr); gap:12px; }
.live-source-fields dt { color:var(--muted); }
.live-source-fields dd { margin:0; overflow-wrap:anywhere; }
.live-shell :is(h1,h2,h3,p,li) { overflow-wrap:break-word; }
@media (max-width:1050px) {
  .live-home-grid { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:1040px) {
  .live-shell .topbar > button, .live-shell .sidebar-head > button { display:inline-flex; }
  .live-shell .topbar { gap:8px; flex-wrap:wrap; height:auto; min-height:68px; padding:12px; }
  .live-shell .topbar-actions { margin-left:auto; }
  .live-navigation-open .sidebar { transform:translateX(0); }
  .live-navigation-open .live-navigation-scrim { display:block; position:fixed; inset:0; z-index:55; margin:0; padding:0; border:0; border-radius:0; background:rgba(3,25,27,.42); cursor:pointer; }
  .live-navigation-open .sidebar-head { flex-wrap:wrap; gap:16px; }
  .live-counts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .live-work-row:not(.live-brief-row) { align-items:flex-start; flex-direction:column; }
  .live-work-row:not(.live-brief-row) > div { flex-basis:auto; }
}

.live-source-drawer { min-width:0; scroll-margin-top:100px; }
.live-document-record { outline:2px solid var(--brand, #4f46e5); outline-offset:4px; border-radius:6px; scroll-margin-top:120px; }
.live-source-drawer .panel-header { gap:12px; flex-wrap:wrap; }
.live-source-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.live-source-provenance { margin-top:18px; }
.live-source-provenance summary { cursor:pointer; padding:8px 0; }

.live-case-tabs { position:sticky; top:var(--live-header-height, var(--header-height)); z-index:40; background:var(--surface, #fff); padding-block:8px; display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.live-review-line { display:flex; flex-direction:column; align-items:flex-start; gap:8px; padding:14px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
/* Chip, statement and source action are 8px apart: the gap spaces them, not paragraph margins. */
.live-review-line > p, .live-review-line > ul { margin:0; }
.live-review-line:last-child { border-bottom:0; }
.live-review-line .button-row, [data-live-case-content] .button-row { display:flex; flex-wrap:wrap; gap:8px; }
[data-live-case-content] .panel { margin-bottom:18px; min-width:0; }
.live-work-row { flex-wrap:wrap; }
.live-approval-center { display:grid; gap:var(--section-gap); min-width:0; }
.live-approval-center .panel-body { overflow-wrap:anywhere; }
.live-approval-form { display:flex; flex-direction:column; gap:12px; align-items:stretch; }
.live-approval-form select, .live-approval-form textarea { width:100%; max-width:100%; }
.live-approval-form textarea { min-height:100px; }
.live-application .panel-body { overflow-wrap:anywhere; }
.live-application label { display:block; margin:12px 0; }
.live-application label > select, .live-application label > textarea { display:block; margin-top:8px; max-width:100%; }
.live-application [data-application-answer] { padding:12px 0; border-bottom:1px solid var(--line); }
.live-application [data-application-answer]:last-child { border-bottom:0; }
.live-approval-form .button-row { display:flex; flex-wrap:wrap; gap:8px; }
/* R1-20: on a phone the six decisions form an even two-column grid rather than ragged rows. */
@media(max-width:560px) { .live-approval-form .button-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); } .live-approval-form .button-row > .btn { width:100%; } }
.live-approval-evidence-check { display:flex; align-items:flex-start; gap:8px; }
.live-approval-evidence-check > span { min-width:0; overflow-wrap:anywhere; }
.live-approval-evidence-check input[type="checkbox"] { flex-shrink:0; width:24px; margin:0; }

.live-case-review p.status { display:block; white-space:normal; overflow-wrap:anywhere; line-height:1.5; padding:8px 12px; border-radius:8px; font-size:0.875rem; }

.live-source-drawer { max-height:65vh; overflow:auto; }

/* Connected Workforce uses the approved panel, badge and navigation system. */
.live-workforce-list { list-style: none; padding: 0; margin: 16px 0; }
.live-workforce-list > li { padding: 20px 0; border-bottom: 1px solid var(--border, #dce2e0); }
.live-workforce-person, .live-workforce-pagination { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.live-workforce-person h3 { margin: 0; }
.live-workforce-services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.live-workforce-services dt { font-size: 13px; margin-bottom: 8px; }
.live-workforce-services dd { margin: 0; }
.live-workforce-list h3, .live-workforce-list p, .live-workforce-list li { overflow-wrap: anywhere; }
@media (max-width: 620px) { .live-workforce-services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.live-approval-queue-summary { display:flex; flex-wrap:wrap; align-items:center; gap:14px; }
.live-approval-queue-summary p { margin:0; }
.live-approval-review { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.live-approval-review > .panel-header, .live-approval-review > [data-approval-receipt], .live-approval-review > .live-approval-decision-panel { grid-column:1 / -1; }
.live-approval-review > .panel-body { padding:var(--panel-inset); border-top:1px solid var(--line); }
.live-approval-review h3 { margin:0 0 12px; }
@media(max-width:760px) { .live-approval-review { grid-template-columns:minmax(0,1fr); } }
.live-approval-review > .panel-header { flex-wrap:wrap; gap:12px; }
.live-approval-review > .panel-header h2 { flex:1 0 160px; }
.live-approval-review > .panel-header p { margin:0; }
.live-approval-review .panel-body > .btn { margin:4px 6px 0 0; }
@media(max-width:760px) { .live-approval-review > .panel-header h2, .live-approval-review > .panel-header p { flex-basis:100%; } }
/* B2: a proposal that is no longer pending says what happened first, across the full width. */
.live-shell .live-approval-review > .live-approval-state { grid-column:1 / -1; margin:var(--space-4) var(--panel-inset) 0; }
.live-approval-review > .live-approval-state h3 { margin:0 0 6px; }
.live-approval-state p { margin:0 0 6px; }
.live-approval-state .live-source-fields { grid-template-columns:minmax(0,9rem) minmax(0,1fr); gap:6px 12px; margin:6px 0 0; }
/* M-07: what generated the proposal, what it leaves out, and its identifiers behind Technical details. */
.live-approval-review > .live-approval-about { grid-column:1 / -1; }
.live-approval-about > p { margin:0 0 8px; }
.live-approval-technical { margin-top:8px; }
.live-approval-technical > summary { cursor:pointer; min-height:24px; }
.live-approval-technical .live-source-fields { grid-template-columns:minmax(0,11rem) minmax(0,1fr); margin-top:8px; }
.live-approval-technical dd { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.8125rem; }

/* Focus/scroll must not put a Workforce action underneath the sticky global
   header: the overlapping Sign out control must never receive its click. */
.live-shell [data-workforce-heading],
.live-shell [data-workforce-action],
.live-shell [data-confirm-departure] {
  scroll-margin-top: calc(var(--live-header-height, var(--header-height)) + 16px);
  scroll-margin-bottom: 16px;
}

/* Processing metadata keeps opaque references readable at narrow widths. */
.live-processing .muted { overflow-wrap: anywhere; }
.live-processing-job { border-top: 1px solid var(--border, #dbe2e8); margin-top: 1.25rem; padding-top: 1rem; }
.live-processing-job label { display: block; margin: .75rem 0 .35rem; font-weight: 600; }
.live-processing-job select { min-height: 44px; max-width: 100%; padding: .6rem; }
.live-processing-job .btn { min-height: 44px; white-space: normal; }

.live-processing .live-source-fields { grid-template-columns: minmax(0,8.5rem) minmax(0,1fr); column-gap:1rem; }
.live-processing [data-processing-detail] { scroll-margin-top:9rem; }
.live-processing [data-processing-detail] > .panel-body > .btn { margin-block-start:1rem; }

.live-processing-job-heading { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:.75rem; }
.live-processing-job-heading > h3,.live-processing-job-heading > .status { margin:0; }
.live-processing-job > p { margin:.6rem 0; }
.live-questionnaire-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0;}
.live-questionnaire-fields label {display:flex;flex-direction:column;gap:6px;min-width:0;font-weight:600;}
.live-questionnaire-fields input,.live-questionnaire-fields select,.live-questionnaire-fields textarea {box-sizing:border-box;width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:inherit;font:inherit;}
.live-questionnaire-fields input:focus-visible,.live-questionnaire-fields select:focus-visible,.live-questionnaire-fields textarea:focus-visible {outline:2px solid var(--brand);outline-offset:2px;}
.live-questionnaire-fields textarea {resize:vertical;}
.live-questionnaire-question {padding:12px 0;border-bottom:1px solid var(--line);}
.live-questionnaire-question summary {min-height:44px;cursor:pointer;overflow-wrap:anywhere;}
.live-questionnaire-rule {white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;max-width:100%;}
.live-questionnaire-hash {overflow-wrap:anywhere;}
@media(max-width:700px){.live-questionnaire-fields{grid-template-columns:1fr;}}

/* The explicit proof reader is a separate, comfortably spaced action. */
.filing-confirmation a.btn { min-height:44px; margin-top:8px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }

/* Keep panel/header insets aligned at narrow widths without reducing hit targets. */
@media (max-width:760px) {
  :root { --page-gutter:var(--space-4); --panel-inset:var(--space-4); --section-gap:var(--space-4); }
  .page-head { gap:var(--space-4); margin-bottom:var(--space-5); }
  .stat-card { padding:var(--panel-inset); }
}

.live-home-grid .panel-body > .muted { font-size:var(--text-small); line-height:1.5; }
.live-shell .intelligence-card h2 { margin:var(--space-5) 0 var(--space-3); font-size:1.5rem; font-weight:650; line-height:1.3; letter-spacing:-.02em; }
.live-shell .intelligence-card .panel-body > h2:first-child { margin-top:0; }
.live-shell :where(select,textarea,input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"])) {
  min-height:44px;
  max-width:100%;
  padding:10px 12px;
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  background:var(--surface);
  color:var(--ink);
  font:inherit;
  line-height:1.4;
}

.table-wrap :is(th,td):first-child { padding-inline-start:var(--panel-inset); }
.table-wrap :is(th,td):last-child { padding-inline-end:var(--panel-inset); }

/* Connected form navigation lands at its destination without an intermediate
   scroll that can move controls underneath the sticky workspace bars. */
html:has(.live-shell) { scroll-behavior:auto; }

/* Keep panel destinations and native keyboard focus clear of both measured,
   wrapping case bars. */
.live-shell [data-live-case-content] .filing-confirmation,
.live-shell [data-live-case-content] :is(button, input, select, textarea, a[href], summary, [tabindex]) {
  scroll-margin-top: calc(var(--live-header-height, var(--header-height)) + var(--live-case-tabs-height, 0px) + 12px);
  scroll-margin-bottom: 12px;
}

/* Connected referral entry uses the same readable fields and touch targets as case work. */
.live-referral { min-width: 0; max-width: 44rem; }
/* One label style with the operations filters and forms: sentence case, 13px, 600 (R3-23). */
.live-referral .form-label { font-size: .8125rem; }
.live-referral .form-grid { max-width: 40rem; }
.live-referral .form-hint { margin: 6px 0 0; font-size: .8125rem; color: var(--muted); }
.live-referral .form-hint:empty { display: none; }
.live-referral h2 { margin-bottom: 8px; }
.live-referral .panel-body > p { margin: 8px 0 16px; }
.live-referral .form-grid { grid-template-columns: minmax(0, 1fr); }
.live-referral .form-grid > button { justify-self: start; }
.live-referral .button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.live-referral input, .live-referral select { scroll-margin-top: calc(var(--live-header-height, 72px) + 12px); }

/* Human triage retains the connected workspace scale and native focus behavior. */
.live-triage { min-width:0; }
.live-triage :is(form,.triage-context) { max-width:48rem; }
.live-triage h2 { margin:0 0 12px; }
.live-triage p { margin:8px 0 16px; overflow-wrap:anywhere; }
.live-triage .button-row { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0; }
.live-triage .triage-finding { min-width:0; margin:24px 0; padding:16px; border:1px solid var(--line); border-radius:var(--radius-sm); }
.live-triage .triage-finding legend { max-width:100%; padding:0 6px; font-weight:650; font-size:1rem; }
.live-triage :is(input,select,textarea) { width:100%; min-width:0; box-sizing:border-box; }
.live-triage textarea { resize:vertical; height:auto; min-height:88px; }
.live-triage :is(form,.triage-context,.triage-recorded,.triage-accepted,.triage-command-status) { margin-block:24px; }
.live-triage form > .btn { margin-top:16px; }
.live-triage .triage-candidates { padding-inline-start:20px; }
.live-triage .triage-candidates > li { margin-block:12px; }
.live-triage :is(.btn,summary) { min-height:44px; white-space:normal; overflow-wrap:anywhere; }
@media(max-width:700px){ .live-triage .form-grid { grid-template-columns:minmax(0,1fr); } }

/* Connected QA uses the returned checklist and the approved case shell. */
.live-qa { min-width: 0; }
.live-qa .panel-body { display: grid; gap: 16px; justify-items: start; }
.live-qa .panel-body > :is(p, form, .qa-checklist, ul, ol, dl, details, fieldset) { justify-self: stretch; }
/* Before a case is sent for QA review there is nothing to review yet: an empty state, not an error. */
.live-qa .panel-body > .qa-empty { justify-self: stretch; min-height: 160px; }
.live-qa .qa-checklist { display: grid; gap: 8px; }
.live-qa label { font-weight: 600; }
.live-qa .qa-checklist button { text-align: left; justify-content: flex-start; white-space: normal; overflow-wrap: anywhere; }
.live-qa button, .live-qa select, .live-qa a.btn { min-height: 44px; }
.live-qa form { display: grid; gap: 12px; margin-top: 16px; justify-items: start; }
.live-qa form > :is(textarea, select, label, fieldset, p) { justify-self: stretch; }
.live-qa textarea { width: 100%; height: auto; min-height: 88px; resize: vertical; }
.live-qa [aria-pressed="true"] { border-color: var(--green, #087b61); }
.live-qa summary { min-height: 44px; align-content: center; }

.staff-work { display:grid;gap:var(--section-gap);min-width:0; }
/* Approvals: a compact, wrapping filter bar (label above control), folded behind a disclosure on a phone. */
.approval-filter-disclosure { min-width:0; }
.approval-filter-disclosure > summary { display:list-item; width:max-content; padding:11px 0; cursor:pointer; font-weight:600; font-size:.875rem; line-height:22px; }
.approval-queue-filters { display:flex; flex-wrap:wrap; align-items:end; gap:12px 16px; padding:4px 0 0; }
.approval-queue-filters > .live-filter { display:grid; gap:6px; flex:0 1 14rem; min-width:0; }
.approval-queue-filters > .live-filter > label { font-size:.8125rem; font-weight:600; color:var(--ink-2,#33414f); }
.approval-queue-filters > .live-filter > select { width:100%; }
@media(max-width:560px){ .approval-queue-filters > .live-filter { flex-basis:100%; } }
/* Master and detail side by side once the content is wide enough; a selected proposal takes the full width. */
.live-shell [data-live-case-content] { container:live-content / inline-size; }
@container live-content (min-width:60rem) {
  .live-approval-center:not(.has-selection) { grid-template-columns:minmax(0,3fr) minmax(0,2fr); align-items:start; }
  .live-approval-center:not(.has-selection) > .approval-filter-disclosure { grid-column:1 / -1; }
}

.live-source-review .panel-body { display:grid;gap:var(--space-4);overflow-wrap:anywhere; }
.live-source-review .panel-body>p { margin:0; }
.live-source-review .source-review-actions { display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--space-2); }
.live-source-review .source-review-actions>.btn { max-width:100%;white-space:normal;overflow-wrap:anywhere; }
/* A failure is an alert above the one action that recovers it. */
.live-source-review .source-review-alert { margin:0;padding:12px 14px;border:1px solid #f3c9c6;border-left:4px solid #bd3636;border-radius:8px;background:#fff0ef;color:#7d2323;font-weight:500; }
/* Each fact once; a fact in conflict lists its current versions under it. */
.live-source-review .source-fact-list { display:grid;gap:12px;margin:12px 0 0;padding:0;list-style:none; }
.live-source-review .source-fact { display:grid;gap:8px;justify-items:start;padding-top:12px;border-top:1px solid var(--line); }
.live-source-review .source-fact-head { display:flex;flex-wrap:wrap;align-items:center;gap:8px; }
.live-source-review .source-fact-head h3 { margin:0;font-size:.9375rem; }
.live-source-review .source-fact-versions { display:grid;gap:4px;margin:0;padding:0;list-style:none;color:var(--muted);font-size:.875rem; }
.live-source-review .source-fact>button { white-space:normal;max-width:100%;text-align:start; }
.live-source-review label { display:block;margin:12px 0; }
.live-source-review label>textarea { display:block;width:min(100%,40rem);min-height:90px; }
.live-source-review [data-fact-version] { border-top:1px solid var(--line);padding-block:10px; }
.live-source-review a { overflow-wrap:anywhere;max-width:100%;white-space:normal; }

.live-source-review button, .live-source-review a.btn { min-height:44px; }

.live-source-review details>button { display:flex;justify-content:flex-start;text-align:start;white-space:normal;margin-block:8px; }
.live-source-review [data-source-fact]>button { margin:0 8px 8px 0;white-space:normal;max-width:100%; }
.live-source-review summary { min-height:44px;align-content:center;cursor:pointer; }

/* Connected Intelligence workspace: seven category tabs over recorded proposals. */
.live-intelligence { display:grid; gap:var(--section-gap); min-width:0; }
.live-intelligence-tabs { margin:0; width:max-content; max-width:100%; }
.live-intelligence-tabs [role="tab"][aria-selected="true"] { background:#fff; color:var(--ink); box-shadow:var(--shadow-xs); }
.live-intelligence .panel-header { gap:12px; flex-wrap:wrap; }
.live-intelligence-table th { text-align:left; font-size:.8125rem; color:var(--muted); font-weight:600; }
.live-intelligence-table td, .live-intelligence-table th { padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:middle; overflow-wrap:break-word; }
.live-intelligence-table tbody tr:last-child td { border-bottom:0; }
.live-intelligence-table p { margin:4px 0 0; font-size:.8125rem; }
.live-intelligence-row-badges { display:flex; gap:6px; flex-wrap:wrap; }
.live-intelligence-pagination { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.live-intelligence-governance { border-top:1px solid var(--line); }
.live-shell .nav-item .nav-badge { margin-left:auto; }

/* Ask Caidwise in the authenticated shell (task 264): the approved drawer classes carry the layout; these name the read-only outcomes. */
.live-ask-host:not([hidden]) { display:contents; }
.live-ask-sources { margin:8px 0 0; padding-left:20px; font-size:.875rem; color:var(--ink-2); }
.live-ask-sources li { overflow-wrap:anywhere; }
.live-ask-abstention { border-left:3px solid var(--orange,#c4741f); }
.live-ask-failure { border-left:3px solid var(--line); }
.ask-drawer .drawer-foot p { margin:0; font-size:.8125rem; }
/* Administration → Intelligence governance (task 265): the approved panel and table classes carry the layout. */
.live-governance .panel { margin-top:14px; }
.live-governance-flip { display:grid; gap:12px; max-width:640px; margin-top:14px; }
.live-governance-flip .field { display:grid; gap:4px; font-size:.875rem; }
.live-governance-flip .field > span { color:var(--muted); }
.live-governance-flip select, .live-governance-flip input, .live-governance-flip textarea { border:1px solid var(--line); border-radius:8px; padding:8px 10px; font:inherit; }
.live-governance-flip > .btn { justify-self:start; }
.live-governance-flip-result { margin-top:12px; padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); }
.live-governance-audit { display:grid; grid-template-columns:max-content 1fr; gap:4px 12px; margin:8px 0 0; font-size:.875rem; }
.live-governance-audit dt { color:var(--muted); }
.live-governance-audit dd { margin:0; overflow-wrap:anywhere; }
.live-governance-absent { margin:12px 0 0; padding-left:20px; font-size:.875rem; }

/* §8.10 unavailable state (task 266): one shape on every Intelligence surface, and the Home feature note. */
.live-intelligence-unavailable { border-left:3px solid var(--orange,#c4741f); margin-top:14px; }
.live-intelligence-unavailable h3 { margin:0 0 6px; }
.live-intelligence-manual-path { color:var(--ink-2); }
.live-feature-note { margin:0 0 14px; padding:12px 14px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); }


/* Connected document intake and release controls. */
.document-upload { display:grid; gap:10px; margin:12px 0 0; }
.document-upload-disclosure { margin-bottom:16px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.document-upload-disclosure > summary { min-height:44px; display:list-item; align-content:center; color:var(--brand-strong); font-weight:600; }
.document-upload label { font-weight:600; }
.document-upload input[type="file"] { display:block; width:100%; min-height:44px; max-width:100%; padding:8px; border:1px solid var(--line); border-radius:6px; }
.document-upload input::file-selector-button { min-height:28px; margin-right:10px; }
.document-upload > .btn { justify-self:start; }
.document-upload .muted { margin:0; }
.document-inventory [data-original-actions] { display:flex; gap:10px; flex-wrap:wrap; padding:14px 0; }
.document-inventory [data-original-actions] .btn { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.document-inventory [data-original-actions] > p { flex-basis:100%; overflow-wrap:anywhere; color:var(--muted); }
.document-inventory nav[aria-label="Document pages"] { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }

.staff-work-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:16px}
/* R1-12: the helper and the empty state are two statements, not one run-on line. */
.staff-work-help{margin:0;color:var(--muted)}
.staff-work-empty{margin:12px 0 0}
.staff-work-row{padding:20px 0;border-bottom:1px solid var(--border,#dce5e1)}
.staff-work-row h3{margin:0 0 8px;font-size:17px}.staff-work-row>.btn{margin:0 10px 10px 0}
.staff-completion{display:grid;gap:8px;max-width:720px;margin-top:14px}.staff-completion label{font-weight:600}
.staff-completion textarea{width:100%;font:inherit;padding:12px;border:1px solid #b9cbc4;border-radius:6px;resize:vertical;min-height:72px}
.staff-completion button{justify-self:start;margin-top:8px}
.mail-triage { display:grid;gap:var(--section-gap);min-width:0; }
/* Case email addresses: the intro, each person and the add form are spaced apart, and each label sits above its control. */
.case-email-addresses .panel-body { display:grid; gap:16px; min-width:0; }
.case-email-addresses .panel-body > p { margin:0; }
.case-email-person { display:grid; gap:8px; padding-top:12px; border-top:1px solid var(--line); min-width:0; }
.case-email-person > :is(h3, p) { margin:0; }
.case-email-person .live-work-list > li { display:grid; gap:6px; justify-items:start; }
.case-email-person .live-work-list p { margin:0; }
.case-email-add { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); align-items:end; gap:12px 16px; max-width:48rem; }
.case-email-add > label { display:grid; gap:6px; min-width:0; font-size:.875rem; font-weight:600; }
.case-email-add :is(select, input) { box-sizing:border-box; width:100%; min-width:0; min-height:44px; }
.case-email-add > .btn { justify-self:start; min-height:44px; }
/* Inbound mail prose keeps a readable measure and room between its parts (R3-14). */
.live-shell .mail-triage .panel-body > p { max-width:72ch; margin:0 0 12px; }
.case-mail { display:grid;gap:var(--section-gap);min-width:0; }
.message-templates { display:grid;gap:var(--section-gap);min-width:0; }
.message-template-row{padding:20px 0;border-bottom:1px solid var(--border,#dce5e1);min-width:0}
.message-template-row h3{margin:0 0 8px;font-size:17px;overflow-wrap:anywhere}.message-template-row>.btn{margin:0 10px 10px 0}
.message-template-wording{display:grid;gap:8px;margin:12px 0;padding:12px 16px;border:1px solid var(--border,#dce5e1);border-radius:6px;max-width:720px}.message-template-wording p{margin:0;overflow-wrap:anywhere}.message-template-wording .message-template-subject{font-weight:600}
.mail-triage-row{padding:20px 0;border-bottom:1px solid var(--border,#dce5e1);min-width:0}
.mail-triage-row h3{margin:0 0 8px;font-size:17px;overflow-wrap:anywhere}.mail-triage-row p{overflow-wrap:anywhere}.mail-triage-row>.btn{margin:0 10px 10px 0}
.mail-link{display:grid;gap:8px;max-width:480px;margin:14px 0 10px}.mail-link label{font-weight:600}
.mail-link input{width:100%;font:inherit;padding:10px 12px;border:1px solid var(--border,#dce5e1);border-radius:6px}
.mail-link button{justify-self:start;margin-top:4px}
.mail-reader{display:grid;gap:8px;margin:12px 0;padding:12px 16px;border:1px solid var(--border,#dce5e1);border-radius:6px;max-width:880px;min-width:0}
.mail-text,.mail-quoted pre{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}
.mail-quoted summary{cursor:pointer;font-weight:600}
.mail-attachments{margin:0;padding-left:20px}.mail-attachments li{overflow-wrap:anywhere}

/* One staff shell; case navigation stays compact before the actual work. */
.staff-area-navigation, .case-section-actions {display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px;}
.case-section-actions[hidden] {display:none;}
.staff-page-actions {display:flex;justify-content:flex-end;margin-bottom:16px;}
.workspace-header > .staff-page-actions {margin:0;align-self:flex-start;}
/* R1-16: the page-scope note's button sits on its own line, never inside the running text. */
.live-shell .role-content [data-page-scope] > .button {display:flex;width:max-content;max-width:100%;margin-top:8px;}
.case-section-navigation {margin-bottom:14px;border-bottom:1px solid var(--line,#dce3df);}
.case-section-links {display:flex;flex-wrap:nowrap;gap:4px;overflow-x:auto;scrollbar-width:thin;}
.case-section-link {flex:0 0 auto;white-space:nowrap;font:inherit;font-size:.875rem;font-weight:600;padding:12px 10px;border:0;border-bottom:3px solid transparent;background:transparent;color:var(--ink-muted,#56645e);cursor:pointer;}
.case-section-link[aria-current="page"] {color:var(--green,#21624b);border-bottom-color:currentColor;}
.case-section-link:focus-visible {outline:2px solid currentColor;outline-offset:-3px;}
.case-section-mobile {display:none;}
.case-specialist-content {min-width:0;}
.case-specialist-content table {max-width:100%;}
@media(max-width:900px) {
 .case-section-links {display:none;}
 .case-section-mobile {display:flex;flex-direction:column;gap:6px;padding-bottom:14px;font-weight:600;}
 .case-section-mobile select {width:100%;min-height:44px;max-width:100%;border:1px solid var(--line,#dce3df);border-radius:8px;padding:10px;background:#fff;color:inherit;font:inherit;}
 .case-specialist-content {overflow-wrap:break-word;}
}
.staff-reference-search {margin-bottom:16px;}
.staff-reference-search>summary {cursor:pointer;padding:12px 0;font-weight:600;}
.case-next-action {font-weight:600;color:var(--green,#21624b);}
/* Projector and 200%-zoom heights: the case header is one line (name, reference and stage, the next action as a
   chip) and each level of case navigation is one row, so the first screen shows the case's content. */
@media (max-height: 800px) {
 .live-shell .page-wrap .page-head.case-head { margin-bottom:12px; align-items:center; }
 .live-shell .page-wrap .page-head.case-head .page-title { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; }
 .live-shell .page-wrap .page-head.case-head h1 { font-size:1.25rem; }
 .live-shell .page-wrap .page-head.case-head .page-title > p { margin:0; }
 .live-shell .page-wrap .page-head.case-head .page-title > p.case-next-action { padding:2px 10px; border-radius:999px; background:#e3f5ef; font-size:.8125rem; line-height:1.5; }
 .case-section-navigation { margin-bottom:8px; }
 .case-section-link { padding:8px 10px; }
 .case-section-mobile { flex-direction:row; align-items:center; gap:8px; padding-bottom:8px; }
 .case-section-mobile select { flex:1 1 auto; width:auto; min-width:0; }
 .live-shell .case-section-actions.live-pills { flex-wrap:nowrap; overflow-x:auto; margin-bottom:12px; padding-bottom:2px; scrollbar-width:thin; }
 .live-shell .case-section-actions.live-pills > .live-pill { flex:0 0 auto; }
}

/* ── Live shell launch polish (UX-03, UX-04, UX-61, UX-62). Scoped to .live-shell: the
   demo keeps its own rules, and redesign.css (loaded after this file) is out-ranked by
   specificity rather than edited. ── */

/* One page header everywhere: H1 1.5rem/650, description .875rem muted, 8px apart, 24px before content. */
.live-shell .page-wrap .page-head { display:flex; flex-wrap:wrap; justify-content:space-between; margin:0 0 24px; gap:12px 16px; align-items:flex-start; }
.live-shell .page-wrap .page-head > .page-title { flex:1 1 20rem; }
.live-shell .page-wrap .page-head h1 { margin:0; font-size:1.5rem; font-weight:650; line-height:1.25; letter-spacing:-.02em; }
.live-shell .page-wrap .page-title > p { margin:8px 0 0; font-size:.875rem; line-height:1.5; color:var(--muted); }
.live-shell .page-wrap .page-title > p + p { margin-top:4px; }
.live-shell .page-wrap .page-title > p.case-next-action { color:var(--green,#21624b); font-weight:600; }

/* Tables use the available workspace width; prose keeps a readable measure. */
.live-shell .page-wrap { box-sizing:border-box; width:100%; max-width:none; margin-inline:auto; }
.live-shell .page-wrap p { max-width:72ch; }
.live-shell .page-wrap :is(td,th) p { max-width:none; }

/* The type floor (12px) for the shell's own chrome and chips. */
.live-shell :is(.status,.badge) { font-size:.75rem; }
.live-shell .sidebar .sidebar-foot, .live-shell .sidebar .nav-section-label { font-size:.75rem; }
.live-shell .mono { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.8125rem; overflow-wrap:anywhere; }

/* Panel headers centre their count badge on the title. */
.live-shell .panel-header { align-items:center; }
.live-shell .panel-header > :is(.badge,.status) { align-self:center; }

/* Secondary navigation is a tab strip, never a row of action buttons. It scrolls, it does not wrap. */
.live-shell .live-tabstrip { position:relative; display:flex; flex-wrap:nowrap; gap:4px; overflow-x:auto; overscroll-behavior-inline:contain; scrollbar-width:thin; margin:0 0 20px; border-bottom:1px solid var(--line); }
.live-shell .live-tabstrip > :is(.live-tab,button) { flex:0 0 auto; min-height:44px; margin:0; padding:10px 12px; border:0; border-bottom:3px solid transparent; border-radius:0; background:transparent; box-shadow:none; color:var(--muted); font:inherit; font-size:.875rem; font-weight:600; line-height:1.3; white-space:nowrap; cursor:pointer; }
.live-shell .live-tabstrip > :is(.live-tab,button):hover { color:var(--ink); background:transparent; }
.live-shell .live-tabstrip > :is(.live-tab,button):is([aria-current="page"],[aria-pressed="true"]) { color:#065f47; border-bottom-color:#087557; background:transparent; box-shadow:none; }
.live-shell .live-tabstrip > :is(.live-tab,button):focus-visible { outline:2px solid #087557; outline-offset:-4px; }
/* R1-11, R3-16: a strip that scrolls says so. Shadows fixed to its edges show where tabs are clipped; covers that
   travel with the tabs hide them at either end, so a strip that fits shows nothing. On a phone it snaps tab by tab. */
.live-shell .live-tabstrip { background:linear-gradient(to right, var(--bg,#fff) 40%, rgba(255,255,255,0)) left center / 28px 100% no-repeat local, linear-gradient(to left, var(--bg,#fff) 40%, rgba(255,255,255,0)) right center / 28px 100% no-repeat local, radial-gradient(farthest-side at 0 50%, rgba(18,61,50,.28), rgba(18,61,50,0)) left center / 14px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, rgba(18,61,50,.28), rgba(18,61,50,0)) right center / 14px 100% no-repeat scroll; }
@media (max-width:420px) {
  .live-shell .live-tabstrip { scroll-snap-type:x proximity; scroll-padding-inline:16px; }
  .live-shell .live-tabstrip > :is(.live-tab,button) { scroll-snap-align:start; }
}

/* Level two of the case navigation: small pills under the section tabs, never a primary fill. */
.live-shell .live-pills { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 20px; }
.live-shell .live-pills > :is(.live-pill,button) { min-height:36px; padding:6px 14px; border:1px solid var(--line-strong,#c9d3cf); border-radius:999px; background:#fff; box-shadow:none; color:var(--ink-2,#33414f); font:inherit; font-size:.8125rem; font-weight:600; line-height:1.3; cursor:pointer; }
.live-shell .live-pills > :is(.live-pill,button):hover { border-color:#087557; color:#065f47; }
.live-shell .live-pills > :is(.live-pill,button):is([aria-current="page"],[aria-pressed="true"]) { background:#e3f5ef; border-color:#087557; color:#065f47; }
.live-shell .live-pills > :is(.live-pill,button):focus-visible { outline:2px solid #087557; outline-offset:2px; }

/* Home: every brief row puts its actions on one row under the summary. */
.live-shell .live-home-grid .live-brief-row { flex-direction:column; align-items:stretch; }
.live-shell .live-home-grid .live-brief-row > .live-work-summary { flex:0 0 auto; }
/* A brief row's line may carry a long reference: it breaks anywhere, like its summary, so it can never widen the row. */
.live-shell .live-brief-row > .live-work-summary > p { overflow-wrap:anywhere; }
.live-shell .live-empty { margin-top:8px; }
/* R1-08: on a phone the row's primary action takes its own line, and the quiet actions share the next. */
@media (max-width:480px) { .live-shell .live-brief-row .live-work-actions > .btn.primary { flex:1 1 100%; } }
.live-shell .live-home-grid .live-brief-row > .live-work-actions { flex:0 0 auto; }
.live-shell .live-work-row details .live-source-fields { margin:8px 0 0; }

/* UX-62: the header is one row at every width. Below 720px the controls become 44px icons whose
   text stays as the accessible name, and the posture chip keeps only its essential word. */
.topbar-icon { display:none; flex-shrink:0; }
.live-shell .topbar .topbar-icon-button, .live-shell .topbar .topbar-ask { gap:8px; }
.topbar-label, .topbar-ask-label, .topbar-ask-rest, .topbar-posture-extra { display:inline; }
@media (max-width:720px) {
  .live-shell .topbar { flex-wrap:wrap; gap:6px; row-gap:6px; min-height:60px; height:auto; padding:8px 12px; } /* one row whenever it fits; wraps rather than overflowing (200% zoom) */
  .live-shell .topbar > .status { flex:0 0 auto; }
  .live-shell .topbar .topbar-actions { flex:0 0 auto; gap:4px; margin-left:auto; }
  .live-shell .topbar .topbar-icon { display:block; }
  .live-shell .topbar .topbar-icon-button { width:44px; min-width:44px; min-height:44px; padding:0; justify-content:center; }
  .live-shell .topbar .topbar-icon-button .topbar-label,
  .live-shell .topbar .topbar-ask .topbar-ask-rest,
  .live-shell .topbar .status .topbar-posture-extra { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
  .live-shell .topbar .topbar-ask { min-height:44px; padding:0 12px; }
  .live-shell .topbar .topbar-ask .topbar-ask-label { display:inline; }
}
@media (max-width:359px) {
  .live-shell .topbar { gap:4px; padding-inline:8px; }
  .live-shell .topbar .topbar-ask { width:44px; padding:0; justify-content:center; }
  .live-shell .topbar .topbar-ask .topbar-ask-label { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
}

/* Intelligence proposals (S6): the categories scroll on one row; columns keep their place between
   categories; below ~45rem of content each proposal is a card, so the action is never off-screen. */
.live-shell .live-intelligence-tabs { display:flex; flex-wrap:nowrap; overflow-x:auto; max-width:100%; scrollbar-width:thin; }
.live-shell .live-intelligence-tabs > .segment { flex:0 0 auto; white-space:nowrap; }
.live-shell .live-intelligence-table { width:100%; border-collapse:collapse; }
.live-shell .live-intelligence .panel-body > .muted + .table-wrap { margin-top:12px; }
.live-intelligence-proposals { table-layout:fixed; }
.live-intelligence-proposals .live-intelligence-col-proposal { width:32%; }
.live-intelligence-proposals .live-intelligence-col-case { width:15%; }
.live-intelligence-proposals .live-intelligence-col-status { width:19%; }
.live-intelligence-proposals .live-intelligence-col-recorded { width:16%; }
.live-intelligence-proposals .live-intelligence-col-action { width:18%; }
.live-intelligence-proposals td[data-label="Action"] .btn { white-space:normal; }
@container live-content (max-width:45rem) {
  .live-shell .live-intelligence-proposals, .live-shell .live-intelligence-proposals tbody, .live-shell .live-intelligence-proposals tr, .live-shell .live-intelligence-proposals td { display:block; width:auto; }
  .live-shell .live-intelligence-proposals colgroup { display:none; }
  .live-shell .live-intelligence-proposals thead { display:none; }
  .live-shell .live-intelligence-proposals tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px 16px; padding:14px 0; border-bottom:1px solid var(--line); }
  .live-shell .live-intelligence-proposals tbody tr:last-child { border-bottom:0; }
  .live-shell .live-intelligence-proposals td { padding:0; border:0; }
  .live-shell .live-intelligence-proposals td:is([data-label="Proposal"],[data-label="Action"]) { grid-column:1 / -1; }
  .live-shell .live-intelligence-proposals td:not([data-label="Proposal"],[data-label="Action"])::before { content:attr(data-label); display:block; margin-bottom:2px; font-size:.75rem; font-weight:600; color:var(--muted); }
}
/* A table that can scroll sideways is a named tab stop with a visible focus ring. */
.live-shell .live-scroll-region { max-width:100%; overflow-x:auto; }
.live-shell :is(.live-scroll-region,.live-governance) th { font-size:.75rem; }
.live-shell .live-scroll-region:focus-visible { outline:2px solid #087557; outline-offset:2px; }

/* Case overview and evidence gaps (case 17): checks are rows with a status chip, not bullets. */
.live-shell .live-case-overview > h3 { margin:20px 0 8px; font-size:.9375rem; }
.live-shell .live-case-overview > .live-source-fields { margin:0; }
.live-shell .live-check-list, .live-shell .live-gap-list { list-style:none; margin:0; padding:0; border-top:1px solid var(--line); }
.live-shell .live-check-list > li { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:40px; padding:8px 0; border-bottom:1px solid var(--line); }
.live-shell .live-check-list > li > .badge { align-self:center; }
.live-shell .live-gap-list > li { padding:12px 0; border-bottom:1px solid var(--line); }
.live-shell .live-gap-head { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:8px 12px; }
.live-shell .live-gap-head > strong { flex:1 1 18rem; min-width:0; overflow-wrap:anywhere; }
.live-shell .live-gap-head > .badge { align-self:center; }
/* A gap's type, severity and status sit together beside the item it asks for. */
.live-shell .live-gap-chips { display:flex; flex-wrap:wrap; gap:6px; }
.live-shell .live-gap-list p { margin:6px 0 0; }
.live-shell .live-gap-list details { margin-top:6px; }

/* Actions in live case panels: a run of buttons never touches, and sits clear of the text above. */
.live-shell [data-live-case-content] .panel-body > :is(.btn,button) { margin:8px 8px 0 0; }
.live-shell [data-live-case-content] .panel-body > .button-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:12px 0 0; }
.live-shell .live-pills[hidden] { display:none; }

/* Case documents (case 18, 22): a styled file picker, status chips, the release reason under its button. */
.document-upload .document-picker-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
.document-upload .document-picker-control { position:relative; display:inline-flex; }
.document-upload input[type="file"].document-file-input { position:absolute; inset:0; z-index:1; width:100%; height:100%; min-height:0; margin:0; padding:0; border:0; opacity:0; cursor:pointer; }
.document-upload input[type="file"].document-file-input:disabled { cursor:not-allowed; }
.document-upload .document-file-input:focus-visible + .document-picker { outline:2px solid #087557; outline-offset:2px; }
.document-upload .document-file-input:disabled + .document-picker { opacity:.55; cursor:not-allowed; }
.document-upload .document-picker { cursor:pointer; font-weight:600; }
.document-upload .document-picker-name { min-width:0; color:var(--muted); font-size:.875rem; overflow-wrap:anywhere; }
.live-shell .live-document-title { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.live-shell .live-document-title > .badge { align-self:center; }
.live-shell .live-document-action { display:flex; flex-direction:column; align-items:flex-end; gap:4px; flex:0 0 auto; max-width:16rem; }
.live-shell .live-document-action > p { margin:0; font-size:.8125rem; color:var(--muted); text-align:end; }
.document-inventory nav[aria-label="Document pages"][hidden] { display:none; }
@media (max-width:640px) { .live-shell .live-document-action { align-items:flex-start; max-width:none; } .live-shell .live-document-action > p { text-align:start; } }

/* An outcome is stated first, as a callout; a refusal reads in the coral danger tone (case 20). */
.live-shell .live-callout { margin:0 0 16px; padding:12px 14px; border:1px solid var(--line); border-left:3px solid #087557; border-radius:8px; background:var(--surface-2,#f6f8f7); color:var(--ink); font-size:.875rem; }
.live-shell .live-callout:empty { display:none; }
.live-shell .live-callout-danger { border-color:#f1c9c4; border-left-color:#c2412d; background:#fff4f2; color:#8f2a1c; }
.live-shell .live-callout-success { border-color:#bfe3d5; border-left-color:#087557; background:#eef8f4; }
.live-shell [data-live-case-content] section.panel:empty { display:none; }

/* Ask drawer (UX-96, S23): the history is a named, focusable scroll region; identifiers sit behind Record details. */
.ask-drawer .ask-messages:focus-visible { outline:2px solid #087557; outline-offset:-2px; }
.ask-drawer .live-ask-record { margin-top:8px; font-size:.8125rem; white-space:normal; }
.ask-drawer .live-ask-record > summary { cursor:pointer; color:var(--muted); min-height:24px; }
.ask-drawer .live-ask-record .live-source-fields { grid-template-columns:minmax(0,8rem) minmax(0,1fr); gap:4px 12px; margin:6px 0 0; }
.ask-drawer .live-ask-record .mono { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; overflow-wrap:anywhere; }

/* Knowledge citation links navigate to the source already present in the drawer. */
.ask-drawer .live-ask-citation a { color:var(--ink); text-decoration:underline; text-underline-offset:2px; padding:0 2px; }
.ask-drawer .live-ask-citation a:focus-visible,
.ask-drawer .live-ask-sources li:focus-visible { outline:2px solid #087557; outline-offset:2px; }

.document-unlock { display:grid; gap:8px; width:100%; max-width:16rem; text-align:start; }
.document-unlock label { font-weight:600; }
.document-unlock input { width:100%; max-width:100%; min-height:44px; padding:8px; box-sizing:border-box; border:1px solid var(--line); border-radius:6px; }
.document-unlock p { margin:0; font-size:.8125rem; color:var(--muted); }
.document-unlock .btn { justify-self:start; }

/* Approved compact operations design. Legacy route styles remain in styles.css. */
:root {
  --bg: #fff;
  --bg-soft: #f7f8f7;
  --surface-2: #f7f8f7;
  --surface-3: #edf7f2;
  --ink: #17231f;
  --ink-2: #35483e;
  --muted: #58655f;
  --line: #e4e9e5;
  --sidebar: #f7f8f7;
  /* The dark brand surface for heroes and focus cards (never the light rail token). */
  --surface-inverse: #123d32;
  --brand: #087557;
  --brand-strong: #123d32;
  --brand-pale: #e1f5ec;
  --sidebar-width: 196px;
  --header-height: 58px;
  --shadow-xs: none;
  --radius-sm: 8px;
  --radius-lg: 12px;
  --radius-xl: 12px;
}
body {
  font-size: 13px;
  line-height: 1.45;
  background: #fff;
}
button,
input,
select,
textarea {
  font-size: 13px;
  line-height: 1.45;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1 {
  font-size: 22px;
  line-height: 28px;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 14px;
  line-height: 20px;
}
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  color: var(--ink);
}
.sidebar:after {
  display: none;
}
.sidebar-head {
  border: 0;
  height: 76px;
  padding: 16px 22px;
}
.sidebar-head .brand-lockup {
  width: 140px;
}
.sidebar-scroll {
  padding: 0 10px 12px;
}
.nav-label {
  font-size: 13px;
  font-weight: 500;
}
.nav-item {
  min-height: 42px;
  margin: 4px 0;
  border-radius: 5px;
  color: var(--muted);
  padding: 10px 14px;
  gap: 12px;
}
.nav-icon {
  color: inherit;
}
.nav-item.active {
  background: #ddf4ea;
  box-shadow: inset 4px 0 #087557;
  color: #123d32;
}
.nav-item.active .nav-label {
  font-weight: 650;
}
.nav-item:hover,
.nav-item:hover .nav-icon {
  color: #123d32;
  background: #eaf2ee;
}
.nav-item.active .nav-icon {
  color: #087557;
}
/* The base stylesheet colours the count pill for a dark rail (light blue on translucent blue); on this light rail that reads 1.07:1, and 1.01:1 on the active ground (task 267, SC 1.4.3). */
.nav-badge,
.nav-item.active .nav-badge,
.nav-item:hover .nav-badge {
  background: rgba(8, 117, 87, .14);
  color: #123d32;
}
.sidebar-foot {
  border: 0;
  padding: 16px;
}
.user-card {
  display: flex;
  gap: 10px;
  border: 0;
  padding: 4px;
  background: none;
  text-align: left;
  width: 100%;
  color: var(--ink);
  border-radius: 8px;
}
.user-card:hover {
  background: #eaf2ee;
}
.user-card strong {
  font-size: 12px;
  color: var(--ink);
  font-weight: 600;
}
.user-card > span:not(.avatar) > span {
  color: var(--muted);
  font-size: 12px;
}
.avatar {
  background: #123d32;
  color: white;
  box-shadow: none;
  font-size: 12px;
  flex: none;
}
.topbar {
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  gap: 18px;
  box-shadow: none;
}
.global-search {
  max-width: 464px;
  height: 36px;
  background: #f7f8f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.global-search input {
  font-size: 13px;
}
.search-hint {
  font-size: 12px;
}
.topbar-actions {
  margin-left: auto;
  gap: 24px;
}
.topbar-ask {
  border-color: #087557;
  color: #123d32;
  background: #fff;
  font-size: 13px;
}
.notification-dot {
  position: absolute;
  right: 6px;
  top: 4px;
  width: 7px;
  height: 7px;
  background: #087557;
  border-radius: 50%;
  box-shadow: 0 0 0 2px white;
}
.page-wrap {
  padding: 20px 22px 8px;
  max-width: none;
  min-height: calc(100vh - 58px);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.page-wrap > * {
  flex-shrink: 0;
}
.page-head h1 {
  font-size: 22px;
}
.page-head {
  margin-bottom: 16px;
}
.page-head p,
.panel-title p {
  font-size: 12px;
}
.panel {
  box-shadow: none;
  border-radius: 8px;
}
.panel-title h2 {
  font-size: 16px;
}
.panel-header,
.panel-body,
.panel-footer {
  padding: 14px;
}
.btn {
  min-height: 36px;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 550;
  box-shadow: none;
}
.btn.small {
  min-height: 32px;
  font-size: 12px;
  padding: 6px 12px;
}
.btn.primary {
  background: #087557;
  border-color: #087557;
  color: #fff;
}
.btn.primary:hover {
  background: #123d32;
}
.btn.mint {
  background: #a7e8c6;
  color: #123d32;
  border-color: #a7e8c6;
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.icon-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
}
.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #087557;
}
.muted {
  color: var(--muted);
}
.actions {
  gap: 12px;
  align-items: center;
}
.push {
  margin-left: auto;
}
.status,
.badge {
  font-size: 12px;
  line-height: 16px;
}
.rd-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 2px 0 20px;
}
.rd-heading p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 3px;
}
.rd-heading .actions > span {
  font-size: 12px;
}
.rd-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 20px;
  padding: 0 0 0 1px;
}
.rd-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 24px;
  border-left: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.rd-metric:first-child {
  padding-left: 0;
  border: 0;
}
.rd-metric strong {
  font-size: 28px;
  line-height: 32px;
  color: #123d32;
  letter-spacing: -0.03em;
}
.rd-metric span {
  font-size: 13px;
  line-height: 19px;
  color: var(--muted);
}
.rd-metric small {
  font-size: 12px;
  line-height: 17px;
  min-height: 17px;
  color: #b54317;
}
.rd-home-columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(310px, 1fr);
  gap: 18px;
}
.rd-home-aside {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.rd-section-head {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 42px;
}
.rd-section-head h2 {
  flex-shrink: 0;
}
.rd-section-head > .muted {
  font-size: 12px;
}
.rd-priorities > .rd-section-head {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 56px;
  gap: 20px;
}
.rd-priorities .rd-section-head > .btn {
  margin-left: auto;
}
.rd-tabs {
  display: flex;
  gap: 12px;
  align-self: stretch;
}
.rd-tabs button {
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 8px 4px;
  white-space: nowrap;
  font-size: 12px;
  cursor: pointer;
  color: var(--muted);
}
.rd-tabs button.active {
  border-bottom-color: #087557;
  color: #123d32;
  font-weight: 700;
}
.rd-task-table {
  table-layout: auto;
  width: 100%;
  font-size: 12px;
}
.rd-task-table th {
  background: white;
  font-size: 12px;
  font-weight: 500;
  padding: 10px 8px;
  color: var(--muted);
}
.rd-task-table td {
  padding: 10px 8px;
  height: 55px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  white-space: nowrap;
}
.rd-task-table td:nth-child(2) {
  width: 44%;
  white-space: normal;
}
.rd-task-table tr.selected td {
  background: #e8f7ef;
}
.rd-task-table tr.selected td:first-child {
  border-radius: 6px 0 0 6px;
}
.rd-task-table tr.selected td:last-child {
  border-radius: 0 6px 6px 0;
}
.rd-task-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  line-height: 18px;
  font-size: 13px;
}
.rd-task-link strong {
  font-weight: 550;
}
.rd-task-link span {
  font-size: 12px;
  color: var(--muted);
}
.priority-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #087557;
  margin-right: 8px;
}
.priority-dot.high {
  background: #db650a;
}
.priority-dot.medium {
  background: #d59600;
}
.rd-list-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 6px;
  font-size: 12px;
  color: var(--muted);
}
.rd-focus {
  background: #123d32;
  color: #fff;
  border-radius: 8px;
  padding: 20px;
}
.rd-focus > span {
  font-size: 12px;
}
.rd-focus h2 {
  font-size: 19px;
  line-height: 25px;
  color: white;
  margin: 6px 0;
}
.rd-focus p {
  font-size: 13px;
  line-height: 19px;
  margin: 4px 0 12px;
  color: #e2eee8;
}
.rd-focus-fact {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  margin: 10px 0;
}
.rd-focus-fact svg {
  color: #ffc338;
}
.rd-focus-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.rd-focus-actions .btn {
  flex: 1;
}
.rd-focus .link {
  color: #effbf6;
  text-decoration: underline;
  font-size: 12px;
}
.rd-activity {
  padding: 14px 12px 0;
}
.rd-activity h2 {
  margin-bottom: 6px;
}
.rd-activity > .link {
  margin-top: 10px;
}
.rd-activity-rows button {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  min-height: 48px;
  padding: 8px 4px;
  cursor: pointer;
}
.rd-activity-rows button:last-child {
  border-bottom: 1px solid var(--line);
}
.rd-activity-rows button > span {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.rd-activity-rows strong {
  font-size: 12px;
  font-weight: 550;
}
.rd-activity-rows small,
.rd-activity-rows time {
  font-size: 12px;
  color: var(--muted);
}
.rd-activity-rows time {
  max-width: 96px;
  text-align: right;
  flex: none;
}
.rd-activity-rows.inline button {
  min-height: 36px;
}
.rd-activity-rows.inline button > span {
  flex-direction: row;
  gap: 8px;
  align-items: center;
}
.rd-activity-rows.inline small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rd-activity-rows.inline strong {
  white-space: nowrap;
}
.rd-workload {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 16px;
}
.rd-workload p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.rd-workload-bar {
  display: flex;
  gap: 3px;
  height: 14px;
  border-radius: 9px;
  overflow: hidden;
}
.rd-workload figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.rd-workload figcaption span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rd-workload figcaption strong {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 550;
}
.rd-workload i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.demo-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  margin-top: auto;
}
.demo-footer .link {
  font-size: 12px;
  color: var(--muted);
}
.rd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin: -3px 0 12px;
}
.rd-breadcrumb .link {
  color: var(--muted);
}
.back-arrow {
  transform: rotate(180deg);
}
.rd-case-heading {
  margin-bottom: 12px;
}
.rd-case-heading h1 > span {
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--muted);
  margin-left: 8px;
}
.rd-owner {
  display: flex;
  flex-direction: column;
  line-height: 16px;
  margin-right: 12px;
}
.rd-owner small {
  font-size: 12px;
  color: var(--muted);
}
.rd-owner strong {
  font-size: 12px;
  font-weight: 550;
}
.case-subnav {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: none;
  overflow: visible;
  margin: 0 0 14px;
  padding: 0;
  border-radius: 0;
}
.case-subnav > div {
  display: flex;
  gap: 18px;
}
.case-tab {
  font-size: 13px;
  padding: 12px 8px;
  min-height: 42px;
  border-radius: 0;
  background: none;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-weight: 400;
}
.case-tab.active {
  color: #123d32;
  background: none;
  border-bottom-color: #087557;
  font-weight: 650;
}
.rd-more {
  position: relative;
}
.rd-more > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  padding: 10px;
}
.rd-more > summary::-webkit-details-marker {
  display: none;
}
.rd-more > div {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  border-radius: 8px;
  z-index: 20;
  width: 200px;
  padding: 8px;
}
.rd-case-brief {
  display: grid;
  grid-template-columns: 1.75fr 1fr 1fr 0.8fr 1.2fr;
  gap: 18px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.rd-case-brief > div + div {
  padding-left: 18px;
  border-left: 1px solid #527266;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.rd-case-brief h2 {
  margin: 0 0 4px;
  font-size: 19px;
}
.rd-case-brief p {
  margin: 0;
  font-size: 12px;
}
.rd-case-brief small,
.rd-case-brief span {
  font-size: 12px;
  line-height: 16px;
}
.rd-case-brief strong {
  font-size: 12px;
}
.rd-progress {
  height: 10px;
  border-radius: 6px;
  background: #53766a;
  overflow: hidden;
  margin: 2px 0;
}
.rd-progress > span {
  height: 100%;
  display: block;
  background: #a7e8c6;
  border-radius: 6px;
}
.rd-case-columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr);
  gap: 18px;
}
.rd-case-columns .table-wrap {
  border: 1px solid var(--line);
  border-radius: 4px;
}
.rd-evidence {
  width: 100%;
  table-layout: fixed;
}
.rd-evidence th {
  font-size: 12px;
  padding: 8px 12px;
  font-weight: 500;
  background: #f7f8f7;
  text-transform: none;
  letter-spacing: 0;
}
.rd-evidence th:first-child {
  width: 31%;
}
.rd-evidence th:not(:first-child) {
  text-align: center;
}
.rd-evidence td {
  padding: 8px 12px;
  height: 44px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 12px;
}
.rd-evidence td:first-child strong {
  font-size: 12px;
  display: block;
  font-weight: 550;
}
.rd-evidence td:first-child small {
  font-size: 12px;
  color: var(--muted);
}
.rd-evidence td:last-child {
  border-right: 0;
}
.rd-evidence tr:last-child td {
  border-bottom: 0;
}
.rd-evidence td.missing {
  background: #fff9ec;
}
.rd-evidence button {
  border: 0;
  background: none;
  padding: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: 12px;
  cursor: pointer;
  min-height: 27px;
  color: var(--muted);
}
.rd-state-symbol {
  width: 21px;
  height: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: #087557;
  flex: none;
}
.rd-state-symbol.missing,
.rd-state-symbol.unreadable {
  background: #cf5015;
}
.rd-state-symbol.partial,
.rd-state-symbol.conflict {
  background: #f0b300;
  color: #483500;
}
.rd-state-symbol.na {
  background: #d8ddda;
  color: #58655f;
}
.rd-authority {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eaf8f1;
  border-radius: 5px;
  padding: 9px 12px;
  margin: 8px 0 4px;
  font-size: 12px;
}
.rd-authority > svg {
  color: #087557;
}
.rd-authority .link {
  margin-left: auto;
  font-size: 12px;
  white-space: nowrap;
}
.rd-next {
  border-left: 1px solid var(--line);
  padding: 4px 0 0 18px;
}
.rd-next > p {
  font-size: 12px;
  margin-top: 2px;
}
.rd-next-primary {
  display: flex;
  gap: 16px;
  background: #eaf8f1;
  border-radius: 5px;
  padding: 14px 16px;
  margin: 12px 0 0;
}
.rd-next b {
  font-size: 18px;
  line-height: 24px;
  min-width: 26px;
  font-variant-numeric: tabular-nums;
}
.rd-next strong {
  font-size: 13px;
}
.rd-next-primary p {
  font-size: 12px;
  margin: 2px 0 8px;
}
.rd-next-row {
  display: flex;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: none;
  cursor: pointer;
}
.rd-next-row span {
  flex: 1;
}
.rd-next-row small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.rd-source-context {
  padding: 12px 4px;
}
.rd-source-context p {
  color: var(--muted);
  font-size: 12px;
  margin: 6px 0 8px;
}
.rd-pagination {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.rd-pagination .btn {
  border: 0;
  border-radius: 0;
  padding: 6px;
  min-height: 32px;
  min-width: 32px;
}
.rd-pagination .btn:first-child svg {
  transform: rotate(180deg);
}
.rd-pagination > span {
  padding: 0 12px;
  font-size: 12px;
}
.rd-review-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
}
.rd-review-columns > section {
  min-width: 0;
}
.rd-review-columns > .rd-decision {
  border-left: 1px solid var(--line);
  padding-left: 26px;
}
.rd-review-columns .rd-section-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
  min-height: 36px;
}
.rd-review-columns h3 {
  font-weight: 600;
  font-size: 14px;
}
.rd-review-columns > section > p {
  margin: 5px 0 12px;
  font-size: 12px;
}
.rd-source-meta {
  display: grid;
  grid-template-columns: 144px 1fr;
  gap: 6px 16px;
  font-size: 12px;
  margin: 12px 0 18px;
}
.rd-source-meta dt {
  color: var(--muted);
}
.rd-source-meta dd {
  margin: 0;
}
.rd-source-summary {
  border-left: 4px solid #0f9e78;
  background: #f7f8f7;
  border-radius: 4px;
  padding: 12px 20px;
  margin: 16px 0;
}
.rd-source-summary p {
  font-size: 13px;
  margin-top: 8px;
  line-height: 21px;
}
.rd-notice {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  background: #fff6e8;
  border-radius: 5px;
  font-size: 12px;
  margin: 12px 0 18px;
}
.rd-notice svg {
  color: #b57900;
}
.rd-disclosure {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.rd-disclosure + .rd-disclosure {
  border-top: 0;
}
.rd-disclosure summary {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  padding: 12px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 550;
}
.rd-disclosure summary > svg:last-child {
  margin-left: auto;
}
.rd-disclosure summary::-webkit-details-marker {
  display: none;
}
.rd-disclosure[open] summary > svg:last-child {
  transform: rotate(180deg);
}
.rd-disclosure summary small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
}
.rd-disclosure > div {
  padding: 0 0 12px;
  font-size: 12px;
}
.rd-disclosure p + p {
  margin-top: 8px;
}
.rd-proposal {
  margin: 12px 0 16px;
  padding: 18px 22px;
}
.rd-compare {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.rd-compare > div {
  display: flex;
  flex-direction: column;
  max-width: 44%;
}
.rd-compare small {
  font-size: 12px;
}
.rd-compare strong {
  font-size: 15px;
  line-height: 21px;
  margin-top: 3px;
}
.rd-proposed-value {
  font-size: 18px !important;
  line-height: 26px;
  margin: 16px 0 10px !important;
  color: #fff;
}
.rd-proposed-value.date {
  font-size: 26px !important;
  line-height: 32px;
}
.rd-proposal p {
  font-size: 12px;
  margin: 0;
}
.rd-consequences {
  list-style: none;
  padding: 0;
  counter-reset: consequences;
  margin: 10px 0 14px;
  display: grid;
  gap: 6px;
}
.rd-consequences li {
  counter-increment: consequences;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 13px;
}
.rd-consequences li:before {
  content: counter(consequences);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #d9f7e9;
  color: #123d32;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.rd-review-authority {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  margin: 0;
  grid-template-columns: 148px 1fr;
}
.rd-decision-dock {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--line);
  box-shadow: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 0 8px;
  margin-top: 20px;
  z-index: 12;
}
.rd-decision-label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rd-decision-label > svg {
  color: #b57900;
}
.rd-decision-label strong {
  font-size: 13px;
}
.rd-decision-label small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.rd-decision-dock .actions {
  gap: 10px;
}
.rd-decision-dock .btn {
  font-size: 12px;
}
.rd-decision-dock .btn.primary {
  min-width: 155px;
}
.page-wrap[data-screen="approval-detail"] > .demo-footer {
  padding-top: 2px;
}
.page-wrap[data-screen="approval-detail"] .callout.info {
  margin: 12px 0 0;
}
.table-wrap {
  max-width: 100%;
}
table {
  font-size: 13px;
}
th {
  font-size: 12px;
}
td {
  font-size: 13px;
}
.cell-main {
  font-size: 13px;
}
.cell-sub {
  font-size: 12px;
}
input.field,
.select-field,
.form-input,
.form-select,
.form-textarea {
  font-size: 13px;
}
.form-textarea {
  min-height: 80px;
}
.stat-value {
  font-size: 28px;
}
.stat-label {
  font-size: 13px;
}
.stat-change {
  font-size: 12px;
}
@media (min-width: 1500px) {
  :root {
    --sidebar-width: 220px;
    --header-height: 64px;
  }
  .page-wrap {
    padding: 24px 28px 12px;
    min-height: calc(100vh - 64px);
  }
  .rd-heading {
    margin-bottom: 24px;
  }
  .rd-metrics {
    margin: 8px 0 24px;
  }
  .rd-home-columns {
    gap: 24px;
  }
  .rd-home-aside {
    padding-left: 24px;
  }
  .rd-task-table td {
    height: 64px;
  }
  .rd-focus {
    padding: 24px;
  }
  .rd-activity-rows button {
    min-height: 56px;
  }
  .rd-workload {
    margin-top: 20px;
    padding-top: 20px;
  }
  .rd-evidence td {
    height: 54px;
  }
  .rd-case-brief {
    padding: 20px;
  }
  .rd-case-columns {
    gap: 24px;
  }
  .rd-review-columns {
    margin-top: 10px;
  }
  .rd-source-summary {
    padding: 20px;
  }
  .rd-disclosure summary {
    padding: 16px 0;
  }
  .rd-decision-dock {
    margin-top: auto;
    padding-top: 20px;
  }
}
@media (max-width: 1200px) {
  :root {
    --sidebar-width: 176px;
  }
  .sidebar-head {
    padding: 16px;
  }
  .sidebar-head .brand-lockup {
    width: 134px;
  }
  .nav-item {
    padding: 10px;
  }
  .nav-label {
    font-size: 12px;
  }
  .page-wrap {
    padding: 18px;
  }
  .rd-home-columns {
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  }
  .rd-section-head {
    gap: 12px;
  }
  .rd-tabs {
    gap: 8px;
  }
  .rd-tabs button {
    font-size: 12px;
  }
  .rd-task-table td {
    padding: 8px 5px;
    font-size: 13px;
  }
  .rd-task-link {
    font-size: 12px;
  }
  .rd-focus {
    padding: 16px;
  }
  .rd-case-brief {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 12px;
  }
  .rd-case-brief > div:last-child {
    grid-column: 1/-1;
    border: 0;
    display: grid;
    grid-template-columns: 100px 1fr 140px;
    align-items: center;
    padding-left: 0;
  }
  .rd-case-columns {
    grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr);
  }
  .rd-evidence td {
    padding: 8px;
  }
  .rd-evidence button {
    gap: 4px;
  }
  .rd-authority {
    flex-wrap: wrap;
  }
  .rd-review-columns {
    gap: 20px;
  }
  .rd-review-columns > .rd-decision {
    padding-left: 20px;
  }
  .rd-source-meta {
    grid-template-columns: 110px 1fr;
  }
  .rd-decision-label {
    max-width: 190px;
  }
  .rd-decision-dock .actions {
    gap: 6px;
  }
  .rd-decision-dock .btn {
    padding: 8px 10px;
  }
}
@media (max-width: 1040px) {
  .rd-home-columns,
  .rd-case-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .rd-home-aside {
    padding: 0;
    border: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .rd-next {
    padding: 16px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .rd-activity {
    padding: 8px;
  }
  .rd-case-brief {
    grid-template-columns: repeat(2, 1fr);
  }
  .rd-case-brief > div:nth-child(3) {
    border: 0;
    padding: 0;
  }
  .rd-review-columns {
    grid-template-columns: 1fr;
  }
  .rd-review-columns > .rd-decision {
    border-left: 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
  }
  .rd-decision-dock {
    flex-wrap: wrap;
  }
  .rd-decision-dock .actions {
    margin-left: auto;
  }
  .rd-decision-label {
    max-width: none;
  }
  .case-subnav {
    gap: 8px;
  }
  .case-subnav > div {
    gap: 4px;
  }
  .case-tab {
    font-size: 12px;
  }
}
@media (max-width: 720px) {
  :root {
    --sidebar-width: 196px;
  }
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar-head {
    height: 64px;
  }
  .topbar {
    padding: 0 14px;
    gap: 10px;
  }
  .topbar-actions {
    gap: 8px;
  }
  .global-search {
    width: auto;
    min-width: 0;
    flex: 1;
  }
  .global-search input {
    width: 100%;
  }
  .topbar-ask {
    padding: 8px;
  }
  .topbar-ask span {
    display: none;
  }
  .page-wrap {
    padding: 18px 16px 10px;
  }
  .rd-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  .rd-heading .actions {
    margin-left: 0;
  }
  .rd-heading h1 {
    font-size: 22px;
  }
  .rd-heading p {
    font-size: 13px;
  }
  .rd-metrics {
    row-gap: 16px;
    grid-template-columns: repeat(2, 1fr);
  }
  .rd-metric {
    padding: 0 16px;
  }
  .rd-metric:nth-child(3) {
    border: 0;
    padding-left: 0;
  }
  .rd-home-aside {
    grid-template-columns: 1fr;
  }
  .rd-priorities .rd-section-head {
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
  }
  .rd-tabs {
    order: 3;
    width: 100%;
    min-height: 38px;
    gap: 20px;
  }
  .rd-task-table {
    min-width: 620px;
  }
  .rd-workload {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .rd-workload figcaption {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 16px;
  }
  .rd-case-heading h1 > span {
    display: block;
    margin: 0;
    font-size: 12px;
  }
  .rd-breadcrumb {
    margin-bottom: 8px;
  }
  .rd-case-heading .actions {
    width: 100%;
    justify-content: space-between;
  }
  .case-subnav {
    align-items: flex-start;
    gap: 0;
  }
  .case-subnav > div {
    min-width: 0;
    overflow: auto;
  }
  .rd-more > summary {
    padding: 12px 4px;
  }
  .case-tab {
    white-space: nowrap;
  }
  .rd-case-brief {
    grid-template-columns: 1fr 1fr;
  }
  .rd-case-brief > div:first-child {
    grid-column: 1/-1;
  }
  .rd-case-brief > div:nth-child(2),
  .rd-case-brief > div:nth-child(4) {
    border: 0;
    padding-left: 0;
  }
  .rd-case-brief > div:last-child {
    grid-template-columns: 1fr;
  }
  .rd-case-brief h2 {
    font-size: 19px;
  }
  .rd-evidence {
    min-width: 620px;
  }
  .rd-case-columns .rd-section-head {
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 0;
  }
  .rd-case-columns .rd-section-head > .muted {
    margin-left: auto;
  }
  .rd-case-columns .rd-section-head > .push {
    margin-left: 0;
  }
  .rd-authority {
    align-items: flex-start;
  }
  .rd-authority > span {
    flex: 1;
  }
  .rd-authority .link {
    margin-left: 28px;
  }
  .rd-activity-rows.inline button > span {
    flex-direction: column;
    align-items: flex-start;
  }
  .rd-activity-rows.inline small {
    white-space: normal;
  }
  .rd-activity-rows.inline strong {
    white-space: normal;
  }
  .rd-source-meta {
    grid-template-columns: 108px 1fr;
    gap: 8px;
  }
  .rd-review-columns {
    gap: 20px;
  }
  .rd-decision-dock {
    padding: 12px 0 8px;
    gap: 12px;
  }
  .rd-decision-dock .actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0;
  }
  .rd-decision-dock .btn {
    min-height: 42px;
  }
  .rd-proposal {
    padding: 18px;
  }
  .rd-proposed-value.date {
    font-size: 24px !important;
  }
  .rd-review-columns .rd-section-head {
    gap: 10px;
  }
  .rd-pagination > span {
    padding: 0 8px;
  }
  .rd-decision-label {
    font-size: 12px;
  }
  .rd-compare strong {
    font-size: 14px;
  }
  .rd-compare {
    gap: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
/* Keep compact icons from inheriting the legacy 44px minimum. */
@media (min-width: 721px) {
  .icon-btn {
    min-height: 32px;
  }
  .rd-task-table td {
    padding-top: 7px;
    padding-bottom: 7px;
  }
  .rd-task-table th {
    text-transform: none;
    letter-spacing: 0;
  }
  .rd-home-aside .rd-activity-rows time {
    display: none;
  }
  .rd-home-aside .rd-activity-rows button {
    min-height: 48px;
  }
  .rd-metrics {
    margin-bottom: 16px;
  }
  .rd-focus-fact {
    margin: 8px 0;
  }
  .rd-focus-actions {
    margin-top: 12px;
  }
  .rd-home-columns .rd-focus {
    padding: 18px;
  }
  .rd-home-columns .rd-focus h2 {
    margin: 4px 0;
  }
  .rd-home-columns .rd-focus p {
    margin-bottom: 8px;
  }
  .rd-home-columns .rd-activity {
    padding-top: 12px;
  }
}
@media (min-width: 1201px) and (max-height: 820px) {
  .rd-case-columns .rd-section-head {
    min-height: 34px;
  }
  .rd-evidence td {
    padding: 6px 10px;
    line-height: 15px;
    height: 44px;
  }
  .rd-case-columns .rd-activity-rows button {
    padding-top: 6px;
    padding-bottom: 6px;
    min-height: 34px;
  }
  .rd-next-primary {
    padding: 12px 14px;
    margin-top: 8px;
  }
  .rd-next-row {
    padding: 12px 14px;
  }
  .rd-source-context {
    padding: 8px 4px;
  }
  .rd-case-heading {
    margin-bottom: 8px;
  }
  .rd-breadcrumb {
    margin-bottom: 8px;
  }
  .rd-case-brief {
    margin-bottom: 8px;
  }
  .rd-case-columns .rd-authority {
    margin-top: 6px;
    padding: 8px 12px;
  }
}
.actions {
  display: flex;
  flex-wrap: wrap;
}
.rd-heading > .actions {
  flex-wrap: nowrap;
}
.rd-evidence td:first-child strong {
  font-size: 12px;
}
.rd-evidence td:first-child small {
  font-size: 12px;
}
.rd-evidence button {
  font-size: 12px;
}
.rd-case-heading .actions {
  flex-direction: row;
}
.rd-heading .actions {
  gap: 16px;
}
.rd-focus-actions .btn svg {
  order: 2;
}
.rd-next-primary .btn svg {
  order: 2;
}
@media (min-width: 721px) {
  .rd-task-table {
    min-width: 0;
  }
}
/* Evidence symbols and labels share fixed tracks across every account row. */
.rd-evidence button {
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr);
  justify-content: start;
  justify-items: start;
  column-gap: 8px;
  text-align: left;
}
.rd-evidence .rd-state-symbol {
  width: 21px;
  height: 21px;
  margin: 0;
  justify-self: start;
}
/* Equal metric tracks keep values and captions on the same repeated grid. */
.rd-metrics {
  gap: 24px;
}
.rd-metric,
.rd-metric:first-child {
  position: relative;
  padding: 0;
  border: 0;
}
.rd-metric + .rd-metric:before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -12px;
  border-left: 1px solid var(--line);
}
@media (max-width: 720px) {
  .rd-metrics {
    gap: 16px 24px;
  }
  .rd-metric:nth-child(3):before {
    display: none;
  }
}

/* Shared evidence glyphs: preserve compact discs and optically center triangles. */
.rd-state-symbol svg {
  display: block;
  width: 12px;
  height: 12px;
  flex: none;
  margin: 0;
  stroke-width: 1.8;
}
.rd-state-symbol.unreadable svg,
.rd-state-symbol.conflict svg {
  transform: translateY(-0.75px);
}
.rd-state-symbol.requested {
  background: #2a6c9e;
  color: #fff;
}
/* Retain the financial control's hit area around the same 21px evidence disc. */
.coverage-table .period-marker {
  background: transparent;
  border: 0;
}
.coverage-table .period-marker:hover {
  background: var(--surface-3);
}

/* Core scenes stay visible; section headings organize them without disclosure menus. */
.sidebar-head {
  height: 64px;
  min-height: 64px;
  flex: none;
  padding-top: 12px;
  padding-bottom: 12px;
}
.sidebar-scroll {
  padding-bottom: 8px;
  scrollbar-color: #becbc4 transparent;
}
.sidebar-nav-group + .sidebar-nav-group {
  margin-top: 8px;
}
.sidebar-nav-heading {
  margin: 0;
  padding: 3px 12px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.sidebar .nav-item {
  min-height: 32px;
  padding: 6px 12px;
  margin: 0;
  gap: 10px;
}
.sidebar .nav-label {
  line-height: 20px;
}
.sidebar .nav-divider {
  height: 1px;
  background: var(--line);
  margin: 8px 12px;
}
.sidebar-foot {
  padding: 12px 16px;
  flex: none;
}
@media (max-width: 720px) {
  :root {
    --sidebar-width: min(280px, calc(100vw - 32px));
  }
  .sidebar .nav-item {
    min-height: 44px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .sidebar .nav-label {
    font-size: 13px;
  }
}

/* Keep severity in one column beside each Intelligence review title. */
.intel-item {
  text-align: left;
}
.intel-content {
  min-width: 0;
}
.intel-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  align-items: center;
  gap: 12px;
}
.intel-heading :is(h3,h4) {
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.intel-heading > .badge {
  width: 64px;
  justify-content: center;
  align-self: center;
}
.intel-meta {
  margin-top: 5px;
  gap: 12px;
}
@media (max-width: 480px) {
  .intel-item {
    grid-template-columns: 28px minmax(0, 1fr) 14px;
    gap: 8px;
    padding: 10px;
  }
  .intel-symbol {
    width: 28px;
    height: 28px;
  }
  .intel-heading {
    gap: 8px;
  }
}

/* Facility identifiers belong below the name, not in the shared inline link row. */
.row-link[data-facility] {
  display: block;
}
.row-link[data-facility] .cell-sub {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}


/* Ask answers use a compact brief, shared by the drawer and Intelligence scene. */
.ask-thread .message {
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
}
.ask-thread .message.user {
  background: var(--brand-strong);
  color: #fff;
  white-space: pre-wrap;
}
.ask-thread .message.ai {
  width: 100%;
  max-width: 100%;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.ask-answer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.ask-thread .ask-answer-header h4 {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}
.ask-readiness {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: 6px;
}
.ask-readiness > span {
  color: var(--muted);
  font-size: 12px;
}
.ask-readiness > strong {
  text-align: right;
  font-weight: 600;
}
.ask-answer-section {
  margin-top: 12px;
}
.ask-answer-section h5 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ask-answer-list {
  margin: 0;
  padding-left: 17px;
  display: grid;
  gap: 7px;
}
.ask-answer-list li::marker {
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.ask-answer-list li > div {
  padding-left: 2px;
}
.ask-answer-list strong,
.ask-answer-list span,
.ask-answer-list small {
  display: block;
}
.ask-answer-list strong {
  font-size: 13px;
  font-weight: 600;
}
.ask-answer-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.ask-answer-details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 3px;
}
.ask-answer-details summary {
  cursor: pointer;
  padding: 10px 0;
  min-height: 40px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}
.ask-answer-details .ask-source-ids {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}
.ask-thread .citation {
  font-size: 12px;
}
.ask-drawer .drawer-head {
  min-height: 64px;
  padding: 10px 16px;
}
.ask-heading p {
  font-size: 12px;
  margin-top: 2px;
}
.ask-context {
  padding: 10px 16px;
}
.ask-context > span {
  font-size: 12px;
  margin-bottom: 2px;
}
.ask-context strong {
  font-size: 14px;
}
.ask-context p {
  font-size: 12px;
  margin-top: 2px;
}
.ask-drawer .ask-messages {
  padding: 12px 16px;
  gap: 10px;
}
.ask-drawer .ask-composer {
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
}
.ask-drawer .ask-composer textarea {
  min-height: 64px;
  font-size: 13px;
}
@media (max-width: 480px) {
  .ask-drawer .ask-messages {
    padding: 12px;
  }
  .ask-drawer .ask-composer textarea {
    font-size: 16px;
  }
}

.ask-layout {
  min-height: 0;
  align-items: start;
}
.ask-layout > .ask-thread {
  height: max(480px, calc(100dvh - 240px));
  min-height: 0;
}
.ask-layout .ask-messages {
  min-height: 0;
}
.ask-layout .ask-composer {
  flex-shrink: 0;
}
@media (min-width: 1100px) {
  .ask-layout > aside {
    max-height: max(480px, calc(100dvh - 240px));
    overflow: auto;
  }
  .ask-layout .ask-case-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 24px;
    align-content: start;
  }
  .ask-layout .ask-case-summary > .ask-answer-header,
  .ask-layout .ask-case-summary > .ask-readiness,
  .ask-layout .ask-case-summary > .ask-answer-details {
    grid-column: 1 / -1;
  }
}
.ask-layout .ask-messages {
  padding: 12px;
  gap: 8px;
}
.ask-layout .message.user {
  padding: 8px 12px;
}
.ask-layout .message.ai {
  padding: 12px;
}
.ask-layout .ask-composer textarea {
  font-size: 13px;
}
.ask-layout .ask-answer-details summary {
  min-height: 36px;
  padding: 8px 0;
}
@media (max-width: 480px) {
  .ask-layout .ask-composer textarea {
    font-size: 16px;
  }
}


/* A full-width notice queue keeps deadlines, ownership and status in view. */
.rd-notice-metrics {
  margin-bottom: 12px;
}
.rd-notice-metrics .stat-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 12px;
  padding: 10px 14px;
  min-height: 0;
}
.rd-notice-metrics .stat-top {
  grid-row: 1 / 4;
  justify-content: flex-start;
}
.rd-notice-metrics .stat-value {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
.rd-notice-metrics .stat-icon {
  display: none;
}
.rd-notice-metrics .stat-label {
  margin: 0;
  font-size: 12px;
}
.rd-notice-metrics .stat-change,
.rd-notice-metrics .sample-metric {
  margin-top: 2px;
  font-size: 12px;
  line-height: 15px;
}
.rd-notice-queue .panel-header {
  padding: 8px 14px;
}
.rd-notice-queue .rd-notice-table {
  table-layout: fixed;
  min-width: 0;
}
.rd-notice-table th,
.rd-notice-table td {
  padding: 10px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.rd-notice-table th {
  font-size: 12px;
  line-height: 14px;
}
.rd-notice-table td:first-child:has(.row-link) {
  min-width: 0;
}
.rd-notice-table .row-link {
  display: block;
  padding: 0;
  min-height: 44px;
  color: var(--ink);
}
.rd-notice-table .cell-main,
.rd-notice-table .cell-sub {
  display: block;
}
.rd-notice-table .cell-main {
  font-size: 12px;
  line-height: 18px;
}
.rd-notice-table .cell-sub,
.rd-notice-id {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 12px;
}
.rd-notice-table .status {
  font-size: 12px;
  padding: 3px 6px;
}
.rd-notice-selected {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 12px 14px;
  margin-top: 10px;
}
.rd-notice-selected h2 {
  margin: 0 0 3px;
  font-size: 14px;
  line-height: 20px;
}
.rd-notice-selected h2 span {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 8px;
  white-space: nowrap;
}
.rd-notice-selected p,
.rd-notice-agency strong {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 18px;
}
.rd-notice-selected p {
  color: var(--muted);
}
.rd-notice-agency span,
.rd-notice-agency strong {
  display: block;
}
.rd-notice-agency span {
  color: var(--muted);
  font-size: 12px;
}
.rd-notice-agency strong {
  font-weight: 500;
}
@media (max-width: 1100px) {
  .rd-notice-table colgroup {
    display: none;
  }
  .rd-notice-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .rd-notice-table tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rd-notice-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
    gap: 10px 16px;
    border-bottom: 1px solid var(--line);
  }
  .rd-notice-table tr:nth-child(odd) {
    border-right: 1px solid var(--line);
  }
  .rd-notice-table td {
    display: block;
    border: 0;
    padding: 0;
  }
  .rd-notice-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 3px;
  }
  .rd-notice-selected {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .rd-notice-agency {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
@media (max-width: 600px) {
  .rd-notice-metrics .stat-card {
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 8px;
    padding: 10px;
  }
  .rd-notice-table tbody,
  .rd-notice-selected {
    grid-template-columns: minmax(0, 1fr);
  }
  .rd-notice-table tr:nth-child(odd) {
    border-right: 0;
  }
  .rd-notice-selected {
    gap: 10px;
  }
  .rd-notice-agency {
    grid-row: auto;
  }
  .rd-notice-selected .btn {
    justify-self: start;
  }
}

/* Platform integration: preserve meaningful demo controls and connected forms. */
.demo-footer { align-items:center; gap:12px; flex-wrap:wrap; padding-top:4px; font-size:12px; color:var(--muted); }
.demo-footer .btn { min-height:24px; height:auto; padding:3px 8px; font-size:12px; }
.rd-case-brief .case-summary-item > span { font-size:12px; color:#b9d4c9; }
.rd-case-brief .case-summary-item > strong { font-size:12px; font-weight:500; }
.live-shell { --text-section:16px; --text-small:12px; --text-caption:12px; --section-gap:20px; --panel-inset:16px; }
.live-shell .sidebar-head { padding:16px 22px; }
.live-shell .live-brand { width:140px; }
.live-shell .sidebar-foot { color:var(--muted); font-size: .75rem; }
.live-shell .nav-item { font-size:13px; min-height:36px; padding:8px 12px; }
.live-shell .nav-section-label { color:var(--muted); padding-inline:12px; font-size: .75rem; }
.live-shell .page-wrap { min-height:calc(100vh - var(--live-header-height,58px)); }
.live-shell .intelligence-card h2 { font-size:18px; line-height:24px; margin:12px 0 8px; }
.live-counts { gap:0; }
.live-counts a { border-radius:0; background:transparent; border-left:1px solid var(--line); padding:8px 16px; }
.live-counts a:first-child { border-left:0; padding-left:0; }
.live-counts strong { font-size:28px; line-height:32px; }
.live-shell .live-case-tabs .btn { background:transparent; border:0; border-bottom:3px solid transparent; border-radius:0; box-shadow:none; color:var(--muted); }
.live-shell .live-case-tabs .btn[aria-current="page"] { border-bottom-color:var(--brand); color:var(--brand-strong); }
.live-shell .live-work-row { padding:12px 0; }
.live-shell .panel-header h2 { font-size:16px; line-height:22px; }
.live-shell .btn,.live-sign-in .btn { min-height:44px; white-space:normal; }
@media(max-width:1040px) {
  .live-shell .sidebar { width:280px; }
  .live-shell .sidebar-head { height:auto; min-height:76px; padding:16px; }
  .live-shell .sidebar-head > button { min-height:44px; }
  .live-shell .nav-item { min-height:44px; }
  .live-counts a { padding:12px; }
  .live-counts a:nth-child(odd) { border-left:0; padding-left:0; }
}
@media(max-width:720px) {
  .demo-footer { gap:8px; justify-content:flex-start; padding-top:12px; }
  .demo-footer .btn,.demo-footer .link { min-height:44px; font-size:12px; }
  .live-shell .topbar { min-height:68px; height:auto; }
  .live-shell .live-case-tabs .btn { min-height:44px; }
}

.rd-case-brief .case-summary-item { border-right:0; background:transparent; border-radius:0; padding-block:0; padding-right:0; color:#fff; }
.rd-case-brief .case-summary-item > span { text-transform:none; letter-spacing:0; color:#fff; }
.rd-case-brief .case-summary-item > strong { color:#fff; margin-top:0; }

.live-shell .intelligence-card { background:#123d32; color:#fff; border-color:#123d32; }
.live-shell .intelligence-card::before,
.live-shell .intelligence-card::after { display:none; }
.live-shell .intelligence-card :is(h2,p,strong) { color:#fff; }
.live-shell .intelligence-card .live-counts a { color:#fff; border-color:#527266; }
.live-shell .intelligence-card .live-counts span { color:#cde2d9; }
/* Native thread buttons keep the flat list presentation and visible selection. */
.thread-list .thread-item { width:100%; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; color:inherit; text-align:left; }
.thread-list .thread-item:hover { background:var(--surface-2); }
.thread-list .thread-item.active { background:var(--brand-pale); }
/* Let the checklist column fit its retained 44px touch control on mobile. */
@media(max-width:760px) {
  .check-item { grid-template-columns:auto minmax(0,1fr); }
}

/* ===== Demo launch polish (simulation bundle; ADR-0580) =====
   Rules for demo-only classes, or scoped to the simulation root ([data-view-key] is set on
   #app only by app.ts), so none of them can match the authenticated application. */

/* Case sections: a tablist of tabs only, "More" beside it; bold never shifts the strip. */
.case-subnav { gap: 8px; }
.case-tablist { display: flex; gap: 18px; min-width: 0; }
.case-tab { display: inline-flex; flex-direction: column; align-items: center; white-space: nowrap; }
.case-tab::after { content: attr(data-label); height: 0; overflow: hidden; visibility: hidden; font-weight: 650; pointer-events: none; }
.rd-more { flex: none; }
.rd-more > summary { min-height: 42px; }
.rd-more-item { display: block; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 6px; background: none; color: var(--ink); font-size: 13px; text-align: left; cursor: pointer; }
.rd-more-item:hover { background: #eaf2ee; }
@media (max-width: 1040px) {
  .case-tablist { gap: 4px; }
}
@media (max-width: 720px) {
  .case-subnav { gap: 4px; align-items: stretch; }
  .case-tablist { overflow-x: auto; scrollbar-width: none; padding-right: 24px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .case-tablist::-webkit-scrollbar { display: none; }
  .rd-more { border-left: 1px solid var(--line); }
  .rd-more > summary { padding: 12px 8px; }
}

/* Scene tabs (Communications, Reports, Intelligence, Administration) share the case tab look. */
.rd-page-tabs { display: flex; gap: 18px; margin: 0 0 16px; border-bottom: 1px solid var(--line); min-width: 0; }
@media (max-width: 720px) {
  .rd-page-tabs { gap: 4px; overflow-x: auto; scrollbar-width: none; padding-right: 24px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .rd-page-tabs::-webkit-scrollbar { display: none; }
}

/* One KPI component: value, label, one hint line; the illustrative note appears once. */
.rd-metrics { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.rd-metric small { color: var(--muted); }
.rd-metric small.attention { color: #b54317; }
.rd-metrics-note { margin: -8px 0 16px; color: var(--muted); font-size: 12px; }
@media (max-width: 720px) {
  .rd-metrics { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-metric:nth-child(odd):before { display: none; }
}

/* Buttons that are cards or rows start from a transparent, start-aligned box, not the UA grey one. */
:where([data-view-key]) button { text-align: inherit; background-color: transparent; }
.evidence-row, .doc-item, .review-card, .person-card, .intel-item, .rd-activity-row { text-align: left; }
.report-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; }
.report-card .report-icon { flex: none; }

/* One button system in the demo: 44px, 36px when small; 14/600 like the application. */
:where([data-view-key]) .btn { min-height: 44px; padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; }
:where([data-view-key]) .btn.small { min-height: 36px; padding: 6px 12px; font-size: 13px; }
:where([data-view-key]) .icon-btn { min-width: 36px; min-height: 36px; }
.demo-footer { gap: 8px; font-size: 12px; }
.demo-footer .btn { min-height: 32px; padding: 4px 10px; font-size: 12px; }

/* Toolbars: every control in the row shares one 44px height. */
[data-view-key] .toolbar { align-items: center; }
[data-view-key] .toolbar :is(.btn, .select-field, input.field) { min-height: 44px; height: 44px; }

/* Panels: sibling headers share a height; body children keep a 12px rhythm. */
[data-view-key] .panel-header { min-height: 72px; align-items: center; }
:where([data-view-key]) .panel-body > * + * { margin-top: 12px; }
[data-view-key] .callout { font-size: 13px; }

/* Identifiers, dates, owners and money never break inside a table or account card. */
.table-case { white-space: nowrap; }
[data-view-key] td:has(> .table-case) { width: 1%; white-space: nowrap; }
[data-view-key] :is(td, th).nowrap, [data-view-key] .money { white-space: nowrap; }
[data-view-key] th { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 12px; }
[data-view-key] th.numeric, [data-view-key] td.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.financial-account-owner { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

/* Wide tables show that they scroll: an edge shadow appears on the side with more columns. */
[data-view-key] .table-wrap {
  background:
    linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left / 32px 100% no-repeat local,
    linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(18,61,50,.18), transparent) left / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(18,61,50,.18), transparent) right / 12px 100% no-repeat scroll;
}

/* Status marks are round; a reviewable QA item keeps a 44px control around its 24px mark. */
.check-box { width: 24px; height: 24px; border-radius: 50%; }
.check-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -10px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; }
.check-toggle:hover:not(:disabled) .check-box { border-color: var(--brand); }
.check-toggle:disabled { cursor: default; }
.check-item { align-items: center; }

/* Evidence matrix: labels sit beside the mark when they fit and under it when they do not. */
.rd-evidence .rd-period { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; text-align: center; }
.rd-evidence td { font-size: 12px; }

/* Notices: columns size to their content; the pill never escapes its cell. */
.rd-notice-queue .rd-notice-table { table-layout: auto; }
.rd-notice-table th, .rd-notice-table td { overflow-wrap: normal; }
.rd-notice-table .status { font-size: 12px; }

/* Home: times visible at every width; the legend sits under its bar. */
.rd-home-aside .rd-activity-rows time { display: block; }
.rd-workload figcaption { justify-content: flex-start; gap: 8px 20px; flex-wrap: wrap; }

/* Pages stop growing at a readable width on very wide screens. */
[data-view-key] .page-wrap > :not(.demo-footer) { max-width: 1600px; }

/* Ask: the context column grows with its content instead of cutting "Safety boundary". */
@media (min-width: 1100px) {
  .ask-layout > aside { max-height: none; overflow: visible; }
}

/* Native disclosure triangles give way to the same chevron the other disclosures use. */
:is(.chart-data, .ask-answer-details) > summary { list-style: none; display: flex; align-items: center; gap: 8px; }
:is(.chart-data, .ask-answer-details) > summary::-webkit-details-marker { display: none; }
:is(.chart-data, .ask-answer-details) > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); }
:is(.chart-data, .ask-answer-details)[open] > summary::after { transform: rotate(225deg); }

/* Contrast: amber pills at 4.5:1 in the demo (the shared token is ledgered for the application). */
[data-view-key] :is(.status, .badge).orange { color: #855300; }

/* Phones: actions stack at full width instead of collapsing into strips. */
@media (max-width: 480px) {
  [data-view-key] .panel-footer { flex-wrap: wrap; }
  [data-view-key] .panel-footer > .btn, [data-view-key] .panel-footer > .metric-definition { flex: 1 1 100%; width: 100%; justify-content: center; }
  .rd-decision-dock .actions .btn { width: 100%; }
}
@media (max-width: 720px) {
  .rd-decision-dock { position: static; }
}
.rd-task-table td:nth-child(2) { width: auto; }
.rd-activity-rows time { max-width: none; white-space: nowrap; }
@media (min-width: 721px) {
  .table-wrap .rd-task-table { min-width: 0; }
}
[data-view-key] :is(th, td) { padding: 12px; }
[data-view-key] :is(th, td):first-child { padding-left: 16px; }
[data-view-key] .cell-sub .nowrap { white-space: nowrap; }
[data-view-key] td > .status { white-space: normal; border-radius: 10px; }
[data-view-key] .table-person { min-width: 150px; }
[data-view-key] th { white-space: normal; }
[data-view-key] :is(th, td):last-child { padding-right: 16px; }
@media (min-width: 1041px) {
  [data-view-key] .table-wrap table { min-width: 0; }
}
[data-view-key] td.nowrap .cell-sub { white-space: normal; }
@media (max-width: 1400px) {
  .portfolio-grid { grid-template-columns: minmax(0, 1fr); }
}
.notice-canvas { min-height: 0; }
.notice-canvas .paper { min-height: 0; }
@media (max-width: 1400px) {
  .account-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .account-cards { grid-template-columns: minmax(0, 1fr); }
}

/* Portals: step labels never truncate; a download reads as a link; steps sit mid-panel. */
.stage strong { overflow: visible; text-overflow: clip; }
@media (max-width: 480px) { .portal-main .stage { padding-inline: 0; } }
.list-meta.list-meta-link { display: inline-flex; align-items: center; gap: 6px; color: #087557; font-weight: 600; }
.portal-main .panel-body:has(> .portal-steps) { display: flex; align-items: center; min-height: calc(100% - 72px); }
.portal-main .panel-body > .portal-steps { width: 100%; }
@media (max-width: 720px) {
  .rd-case-heading > .actions { flex-wrap: wrap; justify-content: flex-start; }
  .rd-case-heading > .actions .rd-owner { flex: 1 1 100%; }
}
@media (max-width: 1100px) {
  [data-view-key] .rd-notice-table td, [data-view-key] .rd-notice-table td:first-child { padding: 0; }
  .rd-notice-table tr { padding: 12px 16px; }
}
/* Application phases are filters: on a phone they sit on a 3-column grid instead of a hidden scroller. */
@media (max-width: 720px) {
  .stage-track.phase-track { overflow: visible; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 8px; }
  .phase-track .stage::before { display: none; }
}
/* Progress tracks wrap onto a grid on a phone rather than hiding steps in an unfocusable scroller. */
@media (max-width: 720px) {
  [data-view-key] .stage-track:not(.portal-steps) { overflow: visible; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 8px; }
  [data-view-key] .stage-track:not(.portal-steps) .stage::before { display: none; }
}
.thread-item .thread-time { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; white-space: nowrap; }
[data-view-key] .panel-footer .link { white-space: nowrap; }

.live-episode-transition { margin-top: 20px; }
.live-episode-transition .panel-body { overflow-wrap: anywhere; }
.live-episode-transition h2 { margin: 0 0 12px; }
.live-episode-transition p { margin: 0 0 16px; }
.live-episode-transition form { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 18px; max-width: 680px; }
.live-episode-transition label { display: grid; gap: 8px; font-weight: 600; }
.live-episode-transition :is(input, select, textarea) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; font: inherit; font-weight: 400; }
.live-episode-transition textarea { min-height: 104px; resize: vertical; }
.live-episode-transition :is(input, select, textarea, button):focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.live-episode-transition button { justify-self: start; align-self: start; min-height: 44px; white-space: normal; }

.live-application .application-calculation .panel-body { display:grid; gap:12px; }
.live-application .application-calculation .panel-body > :is(h2,h3,p,label) { margin:0; }
.live-application .application-calculation label > input { display:block; margin-top:8px; max-width:100%; min-height:44px; }
.live-application .application-calculation .panel-body > button { justify-self:start; max-width:100%; min-height:44px; white-space:normal; }
.live-application .application-calculation [aria-disabled="true"] { opacity:.65; }
/* Case 21: the date is a date-sized field; the chosen run carries a chip and a pressed button. */
.live-application .application-calculation label > input[type="date"] { width:14rem; }
.live-application .application-calculation .application-calculation-chosen { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.live-application .application-calculation .application-calculation-chosen > .badge { align-self:center; }

@scope (.role-content) {
/* ../../packages/design-system/styles/tokens.css */
:scope {
  --ink-950:#112321;
  --ink-900:#182c29;
  --ink-800:#243a36;
  --ink-700:#3b514d;
  --ink-600:#475d58;
  --ink-500:#526862;
  --ink-400:#8aa09a;
  --line:#dce8e5;
  --line-strong:#c8d9d5;
  --control-line:#748b84;
  --canvas:#f3f6f5;
  --paper:#ffffff;
  --paper-warm:#fbfaf6;
  --teal-700:#087557;
  --teal-600:#087158;
  --teal-100:#e3f5ef;
  --teal-800:#065e46;
  --jade-700:#137050;
  --jade-100:#e3f3ea;
  --amber-700:#855300;
  --amber-100:#fff7dc;
  --coral-700:#b02d35;
  --coral-100:#fff0ef;
  --indigo-700:#334a92;
  --indigo-100:#e8ecfa;
  --violet-700:#684a8d;
  --violet-100:#efe9f6;
  --pine-900:#0e3a33;
  --pine-200:#bcc8c6;
  --mint-300:#86dcb8;
  --shadow:0 1px 2px rgba(13,46,42,.05);
  --shadow-float:0 18px 48px rgba(12,23,38,.18);
  --rail:76px;
  --top:58px;
  --casebar:78px;
  color-scheme: light;
}

/* ../../packages/design-system/styles/base.css */
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  min-width: 320px;
  background: var(--canvas);
  font-family:
    Inter,
    "IBM Plex Sans",
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: var(--ink-950);
  font-size: 16px;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  overflow-x: hidden;
}
button,
input,
select,
textarea {
  min-height: 24px;
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--teal-700);
  outline-offset: 2px;
}
button,
a[href],
input,
select,
textarea,
[tabindex] {
  scroll-margin-top: calc(var(--top) + var(--casebar) + 8px);
  scroll-margin-bottom: calc(54px + 14px + 8px);
}
svg {
  display: block;
}
summary {
  min-height: 24px;
  cursor: pointer;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  display: inline-flex;
  align-items: center;
  min-width: 24px;
  min-height: 24px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink-950);
  font-weight: 800;
  z-index: 1000;
}
.skip-link:focus,
.skip-link:focus-visible,
.sr-only[href="#main"]:focus,
.sr-only[href="#main"]:focus-visible {
  position: absolute;
  left: 8px;
  top: 8px;
  display: inline-flex;
  align-items: center;
  width: auto;
  height: auto;
  min-width: 24px;
  min-height: 24px;
  padding: 8px 12px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  background: var(--paper);
  color: var(--ink-950);
  z-index: 1000;
}
body:has(.skip-link) > .sr-only[href="#main"] {
  display: none;
}

/* ../../packages/design-system/styles/components.css */
.app-shell {
  --posture-banner:56px;
  min-height: 100vh;
  padding-left: var(--rail);
}
.global-rail {
  position: fixed;
  z-index: 90;
  inset: 0 auto 0 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--ink-950);
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, .08);
}
.brand-mark {
  width: var(--rail);
  height: 72px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand-mark svg {
  width: 38px;
  height: 38px;
}
.rail-nav {
  width: 100%;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
}
.rail-link {
  position: relative;
  width: 58px;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 8px;
  color: #aab8c7;
  font-size: .8125rem;
  line-height: 1.1;
  letter-spacing: .01em;
  text-align: center;
  transition: .16s ease;
}
.rail-link:hover {
  background: rgba(255, 255, 255, .07);
  color: #fff;
}
.rail-link.active {
  background: #f7f9fb;
  color: var(--ink-950);
}
.rail-link.active:before {
  content: "";
  position: absolute;
  left: -8px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--teal-600);
}
.rail-link .rail-count {
  position: absolute;
  right: 5px;
  top: 5px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 9px;
  background: #d86767;
  color: white;
  font-size: .8125rem;
  font-weight: 800;
}
.rail-bottom {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px 14px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.rail-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: #243a53;
  color: #fff;
  font-size: .875rem;
  font-weight: 800;
}
.topbar {
  position: fixed;
  z-index: 80;
  left: var(--rail);
  right: 0;
  top: 0;
  height: var(--top);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: rgba(255, 255, 255, .98);
  border-bottom: 1px solid var(--line);
}
.product-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 205px;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: 1rem;
}
.product-name small {
  color: var(--ink-500);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .16em;
}
.global-search {
  height: 36px;
  min-width: 330px;
  max-width: 560px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
  color: var(--ink-500);
  font-size: .875rem;
}
.global-search kbd {
  margin-left: auto;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: .8125rem;
}
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
}
.icon-button {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--ink-600);
  cursor: pointer;
}
.icon-button:hover {
  background: #eef2f5;
  color: var(--ink-950);
}
.icon-button .notification {
  position: absolute;
  right: 2px;
  top: 1px;
  min-width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  padding: 0 3px;
  border: 2px solid #fff;
  border-radius: 8px;
  background: #c94f55;
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
}
.policy-chip {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-700);
  font-size: .875rem;
  font-weight: 750;
}
.policy-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--jade-700);
}
.user-menu {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}
.user-menu .user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.user-menu strong {
  font-size: .875rem;
}
.user-menu span {
  color: var(--ink-500);
  font-size: .75rem;
}
.casebar {
  position: fixed;
  z-index: 70;
  left: var(--rail);
  right: 0;
  top: var(--top);
  height: var(--casebar);
  display: grid;
  grid-template-columns: minmax(320px, 1.3fr) repeat(5, minmax(120px, .6fr)) auto;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 3px 10px rgba(18, 34, 56, .03);
}
.case-identity {
  min-width: 0;
}
.case-identity .eyeline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.case-identity h1 {
  margin: 5px 0 0;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.case-identity .subline {
  display: flex;
  gap: 8px;
  margin-top: 5px;
  color: var(--ink-600);
  font-size: .8125rem;
}
.case-fact {
  min-width: 0;
  padding-left: 13px;
  border-left: 1px solid var(--line);
}
.case-fact label {
  display: block;
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.case-fact strong {
  display: block;
  margin-top: 5px;
  font-size: .875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.case-fact strong.alert {
  color: var(--coral-700);
}
.case-fact strong.warn {
  color: var(--amber-700);
}
.case-action {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--ink-950);
  border-radius: 6px;
  background: var(--ink-950);
  color: #fff;
  font-size: .875rem;
  font-weight: 800;
  cursor: pointer;
}
.case-action.secondary {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink-900);
}
.page {
  min-height: 100vh;
  padding: calc(var(--top) + var(--casebar) + 18px) 18px 84px;
}
.page.no-case {
  padding-top: calc(var(--top) + 18px);
}
.page-inner {
  max-width: 1800px;
  margin: 0 auto;
}
.app-shell.with-banner > .data-posture-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 140;
  height: var(--posture-banner);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.app-shell.with-banner .topbar {
  top: var(--posture-banner);
}
.app-shell.with-banner .casebar {
  top: calc(var(--top) + var(--posture-banner));
}
.app-shell.with-banner .global-rail {
  top: var(--posture-banner);
}
.app-shell.with-banner .page {
  padding-top: calc(var(--top) + var(--casebar) + var(--posture-banner) + 18px);
}
.app-shell.with-banner .page.no-case {
  padding-top: calc(var(--top) + var(--posture-banner) + 18px);
}
.section-kicker {
  color: var(--teal-700);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.section-heading h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.02em;
}
.section-heading p {
  margin: 4px 0 0;
  color: var(--ink-500);
  font-size: .875rem;
}
.portal-link {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 2px 4px;
  color: var(--teal-700);
  text-decoration: underline;
}
.text-link {
  color: var(--teal-700);
  font-size: .875rem;
  font-weight: 800;
  cursor: pointer;
}
.button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-900);
  font-size: .875rem;
  font-weight: 800;
  cursor: pointer;
}
.button:hover {
  border-color: #9faaba;
  background: #f8fafb;
}
.button.primary {
  border-color: var(--teal-700);
  background: var(--teal-700);
  color: #fff;
}
.button.dark {
  border-color: var(--ink-950);
  background: var(--ink-950);
  color: #fff;
}
.button.danger {
  border-color: #d8a8aa;
  background: #fff6f6;
  color: var(--coral-700);
}
.button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--teal-700);
}
.button.small {
  min-height: 29px;
  padding: 0 9px;
  font-size: .8125rem;
}
.button:disabled {
  opacity: .52;
  cursor: not-allowed;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafb;
  color: var(--ink-700);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .02em;
}
.badge:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .8;
}
.badge.good {
  border-color: #bcdccf;
  background: var(--jade-100);
  color: var(--jade-700);
}
.badge.warn {
  border-color: #e3ca93;
  background: var(--amber-100);
  color: var(--amber-700);
}
.badge.block {
  border-color: #e3b6b8;
  background: var(--coral-100);
  color: var(--coral-700);
}
.badge.info {
  border-color: #c3ceeb;
  background: var(--indigo-100);
  color: var(--indigo-700);
}
.badge.violet {
  border-color: #d4c3e2;
  background: var(--violet-100);
  color: var(--violet-700);
}
.badge.neutral:before {
  display: none;
}
.mono {
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
}
.muted {
  color: var(--ink-500);
}
.track-ribbon {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.track-cell {
  position: relative;
  min-height: 82px;
  padding: 12px 12px 10px;
  border-right: 1px solid var(--line);
}
.track-cell:last-child {
  border-right: 0;
}
.track-cell:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--ink-400);
}
.track-cell.good:before {
  background: var(--jade-700);
}
.track-cell.warn:before {
  background: var(--amber-700);
}
.track-cell.block:before {
  background: var(--coral-700);
}
.track-cell.info:before {
  background: var(--indigo-700);
}
.track-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.track-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  font-weight: 850;
}
.track-state {
  margin-top: 11px;
  font-size: 1rem;
  font-weight: 850;
}
.track-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  color: var(--ink-500);
  font-size: .75rem;
}
.case-grid {
  display: grid;
  grid-template-columns: 224px minmax(650px, 1fr) 330px;
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}
.case-index {
  position: sticky;
  top: calc(var(--top) + var(--casebar) + 14px);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.case-index-header {
  padding: 14px 14px 11px;
  border-bottom: 1px solid var(--line);
}
.case-index-header strong {
  display: block;
  font-size: .875rem;
}
.case-index-header span {
  display: block;
  margin-top: 3px;
  color: var(--ink-500);
  font-size: .75rem;
}
.case-index-list {
  padding: 5px 0;
}
.case-index-link {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  padding: 0 12px;
  color: var(--ink-600);
  font-size: .8125rem;
  font-weight: 750;
  cursor: pointer;
}
.case-index-link:hover {
  background: #f4f7f9;
  color: var(--ink-950);
}
.case-index-link.active {
  background: var(--teal-100);
  color: var(--teal-700);
}
.case-index-link.active:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--teal-700);
}
.case-index-link .index-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-400);
}
.case-index-link .index-dot.good {
  background: var(--jade-700);
}
.case-index-link .index-dot.warn {
  background: var(--amber-700);
}
.case-index-link .index-dot.block {
  background: var(--coral-700);
}
.case-index-link .index-count {
  min-width: 22px;
  text-align: right;
  color: var(--ink-500);
  font-size: .75rem;
}
.case-canvas {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.case-inspector {
  position: sticky;
  top: calc(var(--top) + var(--casebar) + 14px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ledger-section {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.ledger-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.ledger-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -.01em;
}
.ledger-header span {
  color: var(--ink-500);
  font-size: .75rem;
}
.critical-ledger {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
}
.critical-cell {
  min-height: 104px;
  padding: 14px;
  border-right: 1px solid var(--line);
}
.critical-cell:last-child {
  border-right: 0;
}
.critical-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.critical-value {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 880;
  letter-spacing: -.02em;
}
.critical-copy {
  margin-top: 5px;
  color: var(--ink-600);
  font-size: .8125rem;
  line-height: 1.45;
}
.deadline-bar {
  height: 6px;
  margin-top: 14px;
  background: #edf1f4;
}
.deadline-bar span {
  display: block;
  height: 100%;
  width: 72%;
  background: var(--coral-700);
}
.snapshot-hash {
  margin-top: 11px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  background: #f8fafb;
  color: var(--ink-600);
  font-size: .75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workstream-ledger {
  width: 100%;
  border-collapse: collapse;
}
.workstream-ledger th {
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-align: left;
}
.workstream-ledger td {
  padding: 12px;
  border-bottom: 1px solid #e6ebf0;
  font-size: .8125rem;
  vertical-align: top;
}
.workstream-ledger tr:last-child td {
  border-bottom: 0;
}
.workstream-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 850;
  color: var(--ink-900);
}
.workstream-name .bar {
  width: 4px;
  height: 26px;
  background: var(--ink-400);
}
.workstream-name .bar.good {
  background: var(--jade-700);
}
.workstream-name .bar.warn {
  background: var(--amber-700);
}
.workstream-name .bar.block {
  background: var(--coral-700);
}
.workstream-name .bar.info {
  background: var(--indigo-700);
}
.owner-cell strong {
  display: block;
  font-size: .8125rem;
}
.owner-cell span {
  display: block;
  margin-top: 3px;
  color: var(--ink-500);
  font-size: .75rem;
}
.dependency-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.dep {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fbfcfd;
  color: var(--ink-600);
  font-size: .75rem;
}
.coverage-wrap {
  overflow: auto;
}
.coverage-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}
.coverage-table th {
  height: 40px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
  color: var(--ink-600);
  font-size: .75rem;
  font-weight: 850;
  text-align: center;
}
.coverage-table th:first-child {
  text-align: left;
  padding-left: 14px;
  min-width: 220px;
}
.coverage-table td {
  height: 54px;
  border-right: 1px solid #e6ebf0;
  border-bottom: 1px solid #e6ebf0;
  text-align: center;
  font-size: .75rem;
}
.coverage-table tr:last-child td {
  border-bottom: 0;
}
.coverage-table td:first-child {
  text-align: left;
  padding: 0 14px;
}
.coverage-account strong {
  display: block;
  font-size: .8125rem;
}
.coverage-account span {
  display: block;
  margin-top: 4px;
  color: var(--ink-500);
  font-size: .75rem;
}
.matrix-cell {
  width: 34px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink-500);
  cursor: pointer;
}
.matrix-cell:hover {
  border-color: var(--teal-700);
}
.matrix-cell.good {
  border-color: #acd1c0;
  background: var(--jade-100);
  color: var(--jade-700);
}
.matrix-cell.warn {
  border-color: #dfc17c;
  background: var(--amber-100);
  color: var(--amber-700);
}
.matrix-cell.block {
  border-color: #e0a9ab;
  background: var(--coral-100);
  color: var(--coral-700);
}
.matrix-cell.active {
  box-shadow: 0 0 0 3px rgba(20, 122, 113, .18);
  border-color: var(--teal-700);
}
.issue-table {
  width: 100%;
  border-collapse: collapse;
}
.issue-table th {
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 850;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.issue-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e6ebf0;
  font-size: .8125rem;
  vertical-align: middle;
}
.issue-table tr:last-child td {
  border-bottom: 0;
}
.issue-title {
  font-weight: 850;
}
.issue-title span {
  display: block;
  margin-top: 4px;
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 500;
}
.inspector-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.inspector-head {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}
.inspector-head .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.inspector-head h3 {
  margin: 0;
  font-size: 1rem;
}
.inspector-head p {
  margin: 5px 0 0;
  color: var(--ink-500);
  font-size: .75rem;
  line-height: 1.4;
}
.inspector-body {
  padding: 14px;
}
.inspector-field {
  padding: 10px 0;
  border-bottom: 1px solid #e7ecf0;
}
.inspector-field:last-child {
  border-bottom: 0;
}
.inspector-field label {
  display: block;
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.inspector-field strong {
  display: block;
  margin-top: 5px;
  font-size: .875rem;
}
.inspector-field p {
  margin: 5px 0 0;
  color: var(--ink-600);
  font-size: .75rem;
  line-height: 1.5;
}
.provenance-row {
  min-height: 24px;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid #e7ecf0;
  font-size: .75rem;
}
.provenance-row:last-child {
  border-bottom: 0;
}
.provenance-row strong {
  display: block;
  font-size: .75rem;
}
.provenance-row span {
  display: block;
  margin-top: 3px;
  color: var(--ink-500);
}
.legal-lock {
  padding: 12px;
  border-left: 4px solid var(--coral-700);
  background: #fff7f7;
}
.legal-lock strong {
  display: block;
  color: var(--coral-700);
  font-size: .8125rem;
}
.legal-lock p {
  margin: 6px 0 0;
  color: var(--ink-600);
  font-size: .75rem;
  line-height: 1.5;
}
.inspector-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}
.command-dock {
  position: fixed;
  z-index: 60;
  left: calc(var(--rail) + 18px);
  right: 18px;
  bottom: 14px;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #273a50;
  border-radius: 8px;
  background: rgba(12, 23, 38, .96);
  color: white;
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(8px);
}
.command-dock .dock-context {
  min-width: 250px;
  padding-right: 14px;
  border-right: 1px solid rgba(255, 255, 255, .16);
}
.command-dock .dock-context strong {
  display: block;
  font-size: .8125rem;
}
.command-dock .dock-context span {
  display: block;
  margin-top: 3px;
  color: #aebdcc;
  font-size: .75rem;
}
.command-dock .dock-spacer {
  flex: 1;
}
.command-dock .button {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08);
  color: #fff;
}
.command-dock .button.primary {
  border-color: #67c1b5;
  background: #1b8b80;
}
.evidence-layout {
  display: grid;
  grid-template-columns: 270px minmax(560px, 1fr) 350px;
  height: calc(100vh - var(--top) - var(--casebar) - 36px);
  min-height: 690px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.evidence-sidebar {
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #f7f9fb;
}
.evidence-sidebar-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fb;
}
.evidence-sidebar-head h2 {
  margin: 0;
  font-size: 1rem;
}
.evidence-sidebar-head p {
  margin: 4px 0 0;
  color: var(--ink-500);
  font-size: .75rem;
}
.document-group {
  padding: 11px 10px 5px;
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.document-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 56px;
  padding: 8px 10px;
  border-top: 1px solid #e4e9ee;
  cursor: pointer;
}
.document-row:hover {
  background: #fff;
}
.document-row.active {
  background: var(--teal-100);
  box-shadow: inset 3px 0 0 var(--teal-700);
}
.doc-icon {
  width: 28px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #fff;
  color: var(--ink-600);
}
.document-row strong {
  display: block;
  font-size: .75rem;
}
.document-row span {
  display: block;
  margin-top: 3px;
  color: var(--ink-500);
  font-size: .75rem;
}
.document-row em {
  font-style: normal;
  font-size: .75rem;
  font-weight: 800;
}
.document-viewer {
  position: relative;
  overflow: auto;
  background: #dfe5ea;
}
.viewer-toolbar {
  position: sticky;
  z-index: 4;
  top: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
}
.viewer-toolbar .toolbar-title {
  min-width: 0;
  flex: 1;
}
.viewer-toolbar strong {
  display: block;
  font-size: .8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.viewer-toolbar span {
  display: block;
  margin-top: 2px;
  color: var(--ink-500);
  font-size: .75rem;
}
.viewer-toolbar .tool {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink-600);
}
.paper-stage {
  min-height: 100%;
  padding: 32px;
}
.statement-page {
  position: relative;
  max-width: 770px;
  min-height: 920px;
  margin: 0 auto;
  padding: 48px 52px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(12, 23, 38, .15);
  font-family: Arial, sans-serif;
  color: #1d2530;
}
.statement-brand {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 3px solid #183b5b;
}
.statement-logo {
  font-size: 23px;
  font-weight: 900;
  color: #183b5b;
}
.statement-logo small {
  display: block;
  margin-top: 3px;
  font-size: 8px;
  letter-spacing: .14em;
}
.statement-meta {
  text-align: right;
  font-size: 9px;
  line-height: 1.55;
}
.statement-address {
  margin-top: 28px;
  font-size: 10px;
  line-height: 1.55;
}
.statement-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 24px;
  border: 1px solid #aab4bd;
}
.statement-summary div {
  padding: 10px;
  border-right: 1px solid #aab4bd;
}
.statement-summary div:last-child {
  border-right: 0;
}
.statement-summary label {
  display: block;
  font-size: 7px;
  text-transform: uppercase;
  color: #66717c;
}
.statement-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 11px;
}
.statement-table {
  width: 100%;
  margin-top: 28px;
  border-collapse: collapse;
  font-size: 8px;
}
.statement-table th {
  padding: 8px;
  border-bottom: 1px solid #566471;
  background: #edf0f2;
  text-align: left;
}
.statement-table td {
  padding: 8px;
  border-bottom: 1px solid #d9dee2;
}
.statement-table td:nth-child(3),
.statement-table td:nth-child(4),
.statement-table th:nth-child(3),
.statement-table th:nth-child(4) {
  text-align: right;
}
.source-highlight {
  position: absolute;
  left: 48px;
  right: 48px;
  border: 2px solid var(--teal-600);
  background: rgba(20, 122, 113, .08);
  pointer-events: none;
}
.source-highlight.balance {
  top: 214px;
  height: 65px;
}
.source-highlight.transfer {
  top: 492px;
  height: 39px;
  border-color: var(--coral-700);
  background: rgba(165, 61, 66, .08);
}
.source-label {
  position: absolute;
  right: -2px;
  top: -21px;
  padding: 4px 6px;
  border-radius: 3px 3px 0 0;
  background: var(--teal-600);
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: .75rem;
  font-weight: 800;
}
.source-highlight.transfer .source-label {
  background: var(--coral-700);
}
.extraction-panel {
  overflow: auto;
  border-left: 1px solid var(--line);
}
.extraction-panel-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.extraction-panel-head h2 {
  margin: 0;
  font-size: 1rem;
}
.extraction-panel-head p {
  margin: 4px 0 0;
  color: var(--ink-500);
  font-size: .75rem;
}
.extract-section {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}
.extract-section h3 {
  margin: 0 0 9px;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-600);
}
.extract-field {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fafbfc;
  margin-bottom: 8px;
}
.extract-field.active {
  border-color: var(--teal-700);
  box-shadow: 0 0 0 2px rgba(20, 122, 113, .12);
}
.extract-field .field-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.extract-field label {
  font-size: .75rem;
  font-weight: 850;
  color: var(--ink-600);
}
.extract-field .confidence {
  font-size: .75rem;
  font-weight: 850;
  color: var(--jade-700);
}
.extract-field .candidate {
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 850;
}
.extract-field .source {
  margin-top: 4px;
  color: var(--ink-500);
  font-size: .75rem;
}
.extract-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-size: .75rem;
}
.compare-value {
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}
.compare-value label {
  display: block;
  font-size: .75rem;
  color: var(--ink-500);
  text-transform: uppercase;
}
.compare-value strong {
  display: block;
  margin-top: 4px;
  font-size: .8125rem;
}
.impact-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.impact-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 7px;
  padding: 8px;
  border-left: 3px solid var(--amber-700);
  background: #fffaf0;
  font-size: .75rem;
  line-height: 1.4;
}
.rfi-studio {
  display: grid;
  grid-template-columns: minmax(460px, .9fr) minmax(640px, 1.1fr);
  gap: 14px;
  align-items: start;
}
.notice-viewer {
  position: sticky;
  top: calc(var(--top) + var(--casebar) + 14px);
  height: calc(100vh - var(--top) - var(--casebar) - 28px);
  overflow: auto;
  border: 1px solid var(--line);
  background: #dfe5ea;
  box-shadow: var(--shadow);
}
.notice-viewer-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.notice-page {
  max-width: 700px;
  min-height: 980px;
  margin: 30px auto;
  padding: 56px 60px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(12, 23, 38, .16);
  font-family: Georgia, serif;
  color: #20242b;
}
.notice-page .state-head {
  text-align: center;
  border-bottom: 2px solid #20242b;
  padding-bottom: 18px;
}
.notice-page .state-head strong {
  display: block;
  font-size: 18px;
  letter-spacing: .05em;
}
.notice-page .state-head span {
  display: block;
  margin-top: 5px;
  font: 10px Arial, sans-serif;
}
.notice-page h2 {
  margin: 30px 0 12px;
  font-size: 17px;
}
.notice-page p,
.notice-page li {
  font-size: 11px;
  line-height: 1.7;
}
.notice-callout {
  margin: 18px 0;
  padding: 14px;
  border: 2px solid #333;
  background: #f7f7f7;
}
.notice-mark {
  background: #fff1a8;
}
.rfi-workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.deadline-ledger {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.deadline-item {
  min-height: 95px;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.deadline-item label {
  display: block;
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.deadline-item strong {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
}
.deadline-item span {
  display: block;
  margin-top: 5px;
  color: var(--ink-500);
  font-size: .75rem;
  line-height: 1.4;
}
.request-item {
  display: grid;
  grid-template-columns: 40px 1fr 180px;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-bottom: 1px solid #e7ecf0;
}
.request-item:last-child {
  border-bottom: 0;
}
.request-number {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: .8125rem;
  font-weight: 850;
}
.request-copy h3 {
  margin: 0;
  font-size: .875rem;
}
.request-copy p {
  margin: 5px 0 0;
  color: var(--ink-600);
  font-size: .75rem;
  line-height: 1.5;
}
.request-copy .request-source {
  margin-top: 9px;
  color: var(--teal-700);
  font-size: .75rem;
  font-weight: 800;
}
.request-state {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}
.packet-list {
  padding: 0 14px;
}
.packet-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 9px;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid #e7ecf0;
  font-size: .75rem;
}
.packet-row:last-child {
  border-bottom: 0;
}
.packet-row strong {
  display: block;
  font-size: .75rem;
}
.packet-row span {
  display: block;
  margin-top: 3px;
  color: var(--ink-500);
  font-size: .75rem;
}
.workspace-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 24px;
}
.workspace-header > div {
  min-width: 0;
}
.workspace-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.workspace-header p {
  max-width: 72ch;
  margin: 8px 0 0;
  color: var(--ink-500);
  font-size: .875rem;
  line-height: 1.5;
}
.workspace-actions {
  display: flex;
  gap: 8px;
}
.pulse-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}
.pulse-item {
  min-height: 88px;
  padding: 13px;
  border-right: 1px solid var(--line);
}
.pulse-item:last-child {
  border-right: 0;
}
.pulse-item label {
  display: block;
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.pulse-item strong {
  display: block;
  margin-top: 8px;
  font-size: 21px;
  letter-spacing: -.02em;
}
.pulse-item span {
  display: block;
  margin-top: 4px;
  color: var(--ink-500);
  font-size: .75rem;
}
.operations-grid {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 340px;
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}
.queue-board {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}
.queue-table {
  width: 100%;
  border-collapse: collapse;
}
.queue-table th {
  height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 850;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.queue-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e7ecf0;
  font-size: .8125rem;
  vertical-align: middle;
}
.queue-table tr:last-child td {
  border-bottom: 0;
}
.queue-name {
  font-weight: 850;
}
.queue-name span {
  display: block;
  margin-top: 4px;
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 500;
}
.age-bar {
  display: flex;
  width: 150px;
  height: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.age-bar span:nth-child(1) {
  background: #7fbda9;
}
.age-bar span:nth-child(2) {
  background: #e5c46f;
}
.age-bar span:nth-child(3) {
  background: #d87979;
}
.owner-stack {
  display: flex;
  align-items: center;
}
.owner-stack i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  margin-left: -5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #dce6ed;
  color: var(--ink-700);
  font-style: normal;
  font-size: .75rem;
  font-weight: 850;
}
.owner-stack i:first-child {
  margin-left: 0;
}
.right-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.deadline-watch {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}
.deadline-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border-bottom: 1px solid #e7ecf0;
}
.deadline-row:last-child {
  border-bottom: 0;
}
.days-badge {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #eef2f5;
  color: var(--ink-700);
  font-size: .875rem;
  font-weight: 900;
}
.days-badge.warn {
  background: var(--amber-100);
  color: var(--amber-700);
}
.days-badge.block {
  background: var(--coral-100);
  color: var(--coral-700);
}
.facility-rows > .deadline-row.facility-pending-row {
  grid-template-columns: minmax(min-content, 6rem) minmax(0, 1fr) auto;
}
.facility-pending-row > .days-badge {
  width: auto;
  height: auto;
  min-height: 42px;
  padding: 6px;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: normal;
}
.deadline-row strong {
  display: block;
  font-size: .8125rem;
}
.deadline-row > span:not(.days-badge):not(.badge),
.deadline-row > div > span:not(.badge) {
  display: block;
  margin-top: 4px;
  color: var(--ink-500);
  font-size: .75rem;
  line-height: 1.4;
}
.facility-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid #b7c7d6;
  border-radius: 10px;
  background: #f7fafc;
}
.facility-banner > svg {
  flex: none;
  margin-top: 2px;
}
.facility-banner > div {
  flex: 1 1 16rem;
  min-width: 0;
}
.facility-banner > .badge {
  flex: 0 1 auto;
  max-width: 100%;
}
.facility-banner strong {
  display: block;
  font-size: .875rem;
}
.facility-banner > div > span {
  display: block;
  margin-top: 4px;
  color: var(--ink-600);
  font-size: .8125rem;
  line-height: 1.5;
}
.facility-privacy {
  margin-bottom: 14px;
  color: var(--ink-600);
  font-size: .875rem;
}
.facility-privacy-toggle {
  min-height: 44px;
  min-width: 24px;
  display: list-item;
  align-content: center;
  cursor: pointer;
  font-weight: 650;
}
.facility-privacy > p {
  max-width: 72ch;
  margin: 8px 0;
  line-height: 1.5;
}
@container workflow (max-width:600px) {
  .facility-table-wrap > .ledger-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .facility-table-wrap > .ledger-header > .badge {
    white-space: nowrap;
  }
}
.facility-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 14px;
  align-items: start;
}
@container workflow (max-width:960px) {
  .facility-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .facility-layout .right-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}
.facility-table-wrap {
  container: facility-ledger/inline-size;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}
.facility-table-scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  background:
    linear-gradient(
      to right,
      #fff 30%,
      rgba(255, 255, 255, 0)) left/32px 100% no-repeat local,
    linear-gradient(
      to left,
      #fff 30%,
      rgba(255, 255, 255, 0)) right/32px 100% no-repeat local,
    radial-gradient(
      farthest-side at 0 50%,
      rgba(12, 23, 38, .16),
      rgba(12, 23, 38, 0)) left/12px 100% no-repeat scroll,
    radial-gradient(
      farthest-side at 100% 50%,
      rgba(12, 23, 38, .16),
      rgba(12, 23, 38, 0)) right/12px 100% no-repeat scroll;
}
.facility-table-scroll:focus-visible {
  outline: 3px solid var(--teal-700);
  outline-offset: -3px;
}
.facility-table {
  width: 100%;
  min-width: 56rem;
  border-collapse: collapse;
}
.facility-table th {
  height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
  color: var(--ink-600);
  font-size: .75rem;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1.3;
  white-space: normal;
}
.facility-table td {
  padding: 12px;
  border-bottom: 1px solid #e7ecf0;
  font-size: .8125rem;
  line-height: 1.45;
  vertical-align: top;
}
.facility-table tr:last-child td {
  border-bottom: 0;
}
.facility-table td[data-column=resident] {
  min-width: 10rem;
}
.facility-table td:is([data-column=applicantAction], [data-column=facilityAction]) {
  min-width: 9rem;
}
.facility-days {
  white-space: nowrap;
}
.resident-name > .badge {
  margin-top: 6px;
}
.action-callout .facility-action-task {
  display: block;
}
.action-callout .facility-due {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 4px;
  color: var(--ink-600);
}
.facility-due[data-overdue] {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.resident-name > strong {
  display: block;
  font-size: .875rem;
  white-space: nowrap;
}
.resident-name .masked-value {
  flex-wrap: nowrap;
}
.facility-table td[data-column] .badge {
  white-space: nowrap;
}
.resident-name .mono {
  display: block;
  margin-top: 3px;
  color: var(--ink-600);
  font-size: .75rem;
}
.facility-progress {
  display: grid;
  gap: 6px;
}
.stage-rail {
  width: 120px;
  max-width: 100%;
  height: 6px;
  background: #e8edf1;
}
.stage-rail span {
  display: block;
  height: 100%;
  background: var(--teal-700);
}
.stage-rail.warn span {
  background: var(--amber-700);
}
.stage-rail.block span {
  background: var(--coral-700);
}
.action-callout {
  padding: 8px 9px;
  border-left: 3px solid var(--amber-700);
  background: #fffaf0;
  color: var(--ink-700);
  font-size: .8125rem;
  line-height: 1.45;
}
@container facility-ledger (max-width:56rem) {
  .facility-table {
    min-width: 0;
  }
  .facility-table,
  .facility-table tbody {
    display: block;
  }
  .facility-table thead {
    display: none;
  }
  .facility-table tr {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 12px 16px;
    padding: 14px 16px;
    border-bottom: 1px solid #e7ecf0;
  }
  .facility-table tr:last-child {
    border-bottom: 0;
  }
  .facility-table td,
  .facility-table tr:last-child td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
  }
  .facility-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--ink-600);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .facility-table td[data-column=resident] {
    grid-column: 1/-1;
    min-width: 0;
  }
  .facility-table td[data-column=resident]::before {
    content: none;
  }
  .facility-table td:is([data-column=applicantAction], [data-column=facilityAction]) {
    min-width: 0;
  }
}
.facility-portfolio {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
:scope .facility-table-wrap > .ledger-header.ledger-header {
  flex-wrap: wrap;
}
.facility-table-wrap > .portfolio-toolbar {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.facility-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.facility-rows > * {
  padding-inline: 0;
}
.facility-rows > .deadline-row {
  padding-block: 12px;
}
.deadline-date {
  white-space: nowrap;
}
.awaiting-row {
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: start;
}
:scope .awaiting-row > div > .button.small.ghost {
  min-height: 28px;
  padding: 2px 0;
}
.awaiting-row > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
@container workflow (max-width:560px) {
  .facility-rows > .deadline-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .facility-rows > .deadline-row > :is(.deadline-date, .badge) {
    grid-column: 2;
    justify-self: start;
  }
}
dl.facility-rows {
  display: grid;
  grid-template-columns: minmax(6rem, max-content) minmax(0, 1fr);
}
.kv-row {
  display: grid;
  grid-column: 1/-1;
  grid-template-columns: subgrid;
  gap: 16px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid #e7ecf0;
  font-size: .875rem;
  line-height: 1.5;
}
.kv-row:last-child {
  border-bottom: 0;
}
.kv-row dt {
  color: var(--ink-600);
  font-weight: 600;
}
.kv-row dd {
  min-width: 0;
  margin: 0;
  color: var(--ink-900);
}
.kv-row dd > .badge {
  white-space: normal;
}
.aging-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #e7ecf0;
  font-size: .875rem;
}
.aging-row:last-child {
  border-bottom: 0;
}
.aging-swatch {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--ink-400);
}
.aging-swatch.warn {
  background: var(--amber-700);
}
.aging-swatch.block {
  background: var(--coral-700);
}
.facility-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.facility-tiles .facility-tile {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.facility-tile .tile-count {
  flex: none;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}
.facility-task {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 12px 20px;
  align-items: start;
}
.facility-task-title strong {
  display: block;
  font-size: .875rem;
  line-height: 1.45;
}
.facility-task-title .mono {
  display: block;
  margin-top: 4px;
  color: var(--ink-600);
  font-size: .8125rem;
}
.facility-task-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
}
.facility-task-dates dt {
  color: var(--ink-600);
  font-size: .75rem;
  font-weight: 600;
}
.facility-task-dates dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0;
  font-size: .875rem;
}
.facility-task > .badge {
  justify-self: start;
  align-self: start;
}
.facility-task > .button-row {
  grid-column: 1/-1;
}
.facility-identity .resident-name {
  font-size: 1rem;
}
.applicant-shell {
  min-height: 100vh;
  background: #f3f6f7;
}
.applicant-top {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.applicant-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  font-size: 1rem;
  letter-spacing: .08em;
}
.applicant-brand small {
  display: block;
  margin-top: 3px;
  color: var(--ink-500);
  font-size: .75rem;
  letter-spacing: .12em;
}
.applicant-top .spacer {
  flex: 1;
}
.applicant-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 22px 50px;
}
.applicant-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, .55fr);
  gap: 0;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}
.applicant-message {
  padding: 30px 32px;
}
.applicant-message .eyeline {
  color: var(--teal-700);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.applicant-message h1 {
  max-width: 690px;
  margin: 12px 0 8px;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -.04em;
}
.applicant-message p {
  max-width: 660px;
  margin: 0;
  color: var(--ink-600);
  font-size: 1rem;
  line-height: 1.65;
}
.journey-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.journey-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 12px 0 0;
  color: var(--ink-600);
  font-size: .875rem;
  line-height: 1.4;
}
.journey-label {
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 600;
}
.journey-step:before {
  content: "";
  position: absolute;
  left: 0;
  top: -5px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--ink-400);
  box-shadow: 0 0 0 1px var(--ink-400);
}
.journey-step.done:before {
  background: var(--jade-700);
  box-shadow: 0 0 0 1px var(--jade-700);
}
.journey-step.active .journey-value {
  color: var(--ink-900);
  font-weight: 650;
}
.journey-step.active:before {
  background: var(--teal-700);
  box-shadow: 0 0 0 3px rgba(20, 122, 113, .16);
}
.applicant-help {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  padding: 24px;
  border-left: 1px solid var(--line);
  background: var(--paper-warm);
}
.applicant-help h2 {
  margin: 0;
  font-size: 1rem;
}
.applicant-help-actions {
  flex-direction: column;
  align-items: stretch;
}
.gap-instruction {
  margin: 6px 0 0;
  color: var(--ink-700);
  font-size: .875rem;
  line-height: 1.5;
}
.authority-card {
  display: grid;
  gap: 8px;
}
.profile-outcome {
  margin-top: 12px;
}
.profile-outcome:empty {
  display: none;
}
.applicant-help p {
  margin: 6px 0 0;
  color: var(--ink-600);
  font-size: .8125rem;
  line-height: 1.5;
}
.case-manager {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.case-manager .avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dbe8e4;
  color: var(--teal-700);
  font-size: .875rem;
  font-weight: 850;
}
.case-manager strong {
  display: block;
  font-size: .875rem;
}
.case-manager span {
  display: block;
  margin-top: 4px;
  color: var(--ink-500);
  font-size: .75rem;
}
.applicant-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.applicant-actions {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}
.applicant-actions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.applicant-actions-head h2 {
  margin: 0;
  font-size: 1.125rem;
}
.applicant-actions-head span {
  color: var(--ink-500);
  font-size: .75rem;
}
.applicant-request {
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #e7ecf0;
}
.applicant-request > .badge {
  justify-self: start;
  white-space: nowrap;
}
.applicant-request:last-child {
  border-bottom: 0;
}
.request-symbol {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-700);
}
.request-symbol.warn {
  background: var(--amber-100);
  color: var(--amber-700);
}
.applicant-request h3 {
  margin: 0;
  font-size: .875rem;
}
.applicant-request p {
  margin: 0;
  color: var(--ink-700);
  font-size: .875rem;
  line-height: 1.5;
}
.request-details {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}
.detail-tag {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fafbfc;
  color: var(--ink-600);
  font-size: .75rem;
}
.applicant-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.plain-panel {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}
.document-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e7ecf0;
  font-size: .8125rem;
}
.document-item:last-child {
  border-bottom: 0;
}
.gap-group {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}
.gap-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.gap-group-head h2 {
  margin: 0;
  font-size: 1rem;
}
.gap-group-head p {
  margin: 0;
  color: var(--ink-600);
  font-size: .8125rem;
}
.gap-request {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid #e7ecf0;
}
.gap-group-head + .gap-request {
  border-top: 0;
}
.gap-request-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.gap-request-head h3 {
  margin: 0 4px 0 0;
  font-size: .875rem;
}
.gap-request p {
  margin: 0;
  color: var(--ink-900);
  font-size: .875rem;
  line-height: 1.55;
  max-width: 70ch;
}
.notice {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}
.notice p {
  margin: 0;
  font-size: .875rem;
  line-height: 1.55;
}
.notice-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.notice-head h2 {
  margin: 0;
  font-size: 1rem;
}
.notice-head p {
  color: var(--ink-600);
}
.notice-quote {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.notice-quote figcaption {
  color: var(--ink-600);
  font-size: .75rem;
  font-weight: 600;
}
.notice-quote blockquote {
  margin: 0;
  padding: 10px 14px;
  border-left: 3px solid var(--line-strong);
  background: var(--paper-warm);
  font-size: .875rem;
  line-height: 1.55;
  max-width: 70ch;
}
.notice-deadline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.notice-conflict {
  padding: 10px 14px;
  border-left: 3px solid var(--amber-700);
  background: var(--amber-100);
}
.agreement-provenance {
  margin: 8px 0 0;
  color: var(--ink-600);
  font-size: .8125rem;
}
.agreement-provenance dl {
  margin: 8px 0 0;
}
.plain-panel-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.plain-panel-head h2 {
  margin: 0;
  font-size: 1rem;
}
.plain-panel-body {
  padding: 14px 16px;
}
.privacy-line {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid #e7ecf0;
  font-size: .75rem;
  line-height: 1.45;
}
.privacy-line:last-child {
  border-bottom: 0;
}
.privacy-line strong {
  display: block;
  font-size: .75rem;
}
.privacy-line span {
  display: block;
  margin-top: 3px;
  color: var(--ink-500);
}
.message-preview {
  padding: 10px 0;
  border-bottom: 1px solid #e7ecf0;
}
.message-preview:last-child {
  border-bottom: 0;
}
.message-preview strong {
  display: block;
  font-size: .75rem;
}
.message-preview span {
  display: block;
  margin-top: 4px;
  color: var(--ink-500);
  font-size: .75rem;
  line-height: 1.45;
}
.modal-backdrop {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 23, 38, .55);
  backdrop-filter: blur(4px);
}
.modal {
  width: min(620px, 100%);
  max-height: 86vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-float);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  margin: 0;
  font-size: 15px;
}
.modal-head p {
  margin: 5px 0 0;
  color: var(--ink-500);
  font-size: .8125rem;
}
.modal-body {
  padding: 18px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}
.upload-zone {
  padding: 34px 22px;
  border: 1px dashed var(--line-strong);
  background: #fafbfc;
  text-align: center;
}
.upload-zone h3 {
  margin: 10px 0 5px;
  font-size: 1rem;
}
.upload-zone p {
  margin: 0;
  color: var(--ink-500);
  font-size: .8125rem;
}
.toast {
  position: fixed;
  z-index: 250;
  right: 18px;
  bottom: 18px;
  max-width: 390px;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 13px 14px;
  border: 1px solid #24384e;
  border-radius: 7px;
  background: var(--ink-950);
  color: #fff;
  box-shadow: var(--shadow-float);
}
.toast strong {
  display: block;
  font-size: .8125rem;
}
.toast span {
  display: block;
  margin-top: 4px;
  color: #b5c2cf;
  font-size: .75rem;
  line-height: 1.4;
}
.deadline-worklist-records {
  display: block;
  margin: 0;
  padding: 0;
}
.deadline-worklist-row {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr) 7.5rem 11rem;
  gap: 8px 16px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.deadline-worklist-row:last-child {
  border-bottom: 0;
}
.deadline-worklist-case {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.deadline-worklist-case > .button {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
}
.help-text {
  margin: 4px 0 0;
  color: var(--ink-600);
  font-size: .875rem;
  line-height: 1.45;
}
.case-loading {
  margin: 0;
  padding: 12px 16px;
  color: var(--ink-600);
}
.deadline-worklist-name {
  color: var(--ink-600);
  font-size: .8125rem;
  overflow-wrap: anywhere;
}
.deadline-worklist-row > .state-statement {
  min-width: 0;
  flex-wrap: wrap;
}
.deadline-worklist-date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.deadline-worklist-row > .badge {
  justify-self: start;
  align-self: center;
  white-space: nowrap;
}
:scope.role-content .deadline-worklist > .ledger-header > .badge {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .deadline-worklist-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .deadline-worklist-case,
  .deadline-worklist-row > .state-statement {
    grid-column: 1/-1;
  }
}
@media screen {
  :scope.role-content .workspace-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -.01em;
  }
  :scope.role-content .workspace-header p {
    margin: 8px 0 0;
    color: var(--ink-500);
  }
  :scope.role-content .workspace-header p,
  :scope.role-content .section-heading p {
    font-size: .875rem;
    line-height: 1.5;
  }
  :scope.role-content .ledger-header h2 {
    font-size: 1rem;
    line-height: 1.4;
  }
  :scope.role-content .ledger-header span {
    font-size: .8125rem;
    line-height: 1.5;
    color: var(--ink-600);
  }
  :scope.role-content .badge {
    font-size: .75rem;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  :scope.role-content .badge.warn {
    color: #805313;
  }
  :scope.role-content .badge:before {
    flex-shrink: 0;
  }
  :scope.role-content .workstream-ledger th,
  :scope.role-content .coverage-table th,
  :scope.role-content .issue-table th {
    font-size: .75rem;
    line-height: 1.5;
    color: var(--ink-600);
  }
  :scope.role-content .workstream-ledger td,
  :scope.role-content .coverage-table td,
  :scope.role-content .issue-table td {
    font-size: .875rem;
    line-height: 1.5;
  }
}

/* ../../packages/design-system/styles/extensions.css */
.document-row em.fact-state.good {
  color: var(--jade-700);
}
.document-row em.fact-state.warn {
  color: var(--amber-700);
}
.document-row em.fact-state.block {
  color: var(--coral-700);
}
.document-row em.fact-state.neutral {
  color: var(--ink-500);
}
.extract-field .confidence.conflict {
  color: var(--coral-700);
}
.masked-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.masked-value-toggle {
  flex: none;
  display: inline-grid;
  width: 25px;
  height: 25px;
  vertical-align: middle;
}
.masked-value-text[data-masked=true] {
  letter-spacing: .04em;
}
.state-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 44px 24px;
  text-align: center;
  color: var(--ink-600);
}
.state-panel h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-900);
}
.state-panel p {
  max-width: 520px;
  margin: 0;
  font-size: .8125rem;
  line-height: 1.6;
}
.state-panel .state-glyph {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-700);
}
.state-panel.empty {
  color: var(--ink-500);
}
.state-panel.empty .state-glyph {
  background: var(--teal-100);
  color: var(--ink-500);
}
.state-panel.error .state-glyph {
  background: var(--coral-100);
  color: var(--coral-700);
}
.state-panel.loading {
  color: var(--ink-500);
}
.state-panel.loading .state-glyph {
  background: var(--canvas);
  color: var(--ink-500);
}
.state-panel .state-actions {
  display: flex;
  gap: 8px;
}
.data-posture-banner {
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
}
.data-posture-banner h2,
.data-posture-banner p {
  margin: 0;
}
.data-posture-banner h2 {
  font-size: .875rem;
}
.data-posture-banner p {
  margin-top: 3px;
  font-size: .8125rem;
  line-height: 1.45;
}
.data-posture-banner.synthetic-only {
  background: var(--amber-100);
  color: var(--amber-700);
}
.data-posture-banner.live {
  background: var(--jade-100);
  color: var(--jade-700);
}
.signin-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--canvas);
}
.signin-panel {
  width: min(430px, 100%);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.signin-head {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--line);
}
.signin-head h1 {
  margin: 10px 0 0;
  font-size: 20px;
  letter-spacing: -.02em;
}
.product-brandmark,
.signin-head .product-brandmark {
  margin: 0;
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.signin-head p {
  margin: 7px 0 0;
  color: var(--ink-600);
  font-size: .8125rem;
  line-height: 1.6;
}
.signin-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px 24px;
}
.signin-body .signin-note {
  color: var(--ink-500);
  font-size: .75rem;
  line-height: 1.5;
}
.session-dialog .session-countdown {
  font-size: 22px;
  font-weight: 880;
  letter-spacing: -.02em;
}
.session-dialog p {
  margin: 8px 0 0;
  color: var(--ink-600);
  font-size: .8125rem;
  line-height: 1.6;
}
.portfolio-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.portfolio-toolbar label {
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.portfolio-toolbar select {
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  font-size: .8125rem;
}
.portfolio-view,
.upload-input {
  min-height: 24px;
}
.facility-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.task-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.ledger-header + .task-row {
  border-top: 0;
}
.task-history {
  font-size: .75rem;
}
.task-history summary {
  padding: 8px 0;
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.task-history ol {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: .75rem;
  line-height: 1.5;
}
.upload-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}
.upload-panel h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-900);
}
.upload-panel p {
  margin: 0;
  color: var(--ink-500);
  font-size: .8125rem;
  line-height: 1.6;
}
.upload-panel label {
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.upload-state {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}
.upload-input {
  max-width: 100%;
  font-size: .875rem;
}
.task-upload > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--teal-700);
  font-size: .875rem;
  font-weight: 600;
}
.task-upload > .upload-panel {
  padding: 4px 0 0;
  border-top: 0;
}
.upload-input::file-selector-button {
  min-height: 36px;
  margin-right: 10px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-900);
  font: inherit;
  font-weight: 600;
}
.attorney-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink-950);
  font-family:
    Inter,
    "IBM Plex Sans",
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 16px;
}
.attorney-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.attorney-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}
.attorney-brandmark {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--ink-950);
  color: #fff;
  font-size: .875rem;
  letter-spacing: .08em;
}
.attorney-brand span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.attorney-brand small {
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
}
.attorney-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.attorney-user {
  display: inline-flex;
  align-items: center;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  font-size: .875rem;
}
.attorney-shell nav {
  padding: 8px 24px;
  border-bottom: 1px solid var(--line);
}
.attorney-shell nav ul {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 14px;
}
.attorney-shell nav li {
  display: flex;
  align-items: center;
}
.attorney-main {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 0 40px;
}
.attorney-workspace-head {
  margin-bottom: 24px;
}
.attorney-workspace-head h1 {
  margin: 8px 0 0;
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.3;
}
.attorney-workspace-head .section-kicker + h1 {
  margin-top: 4px;
}
.attorney-workspace-head p {
  max-width: 68ch;
  margin: 8px 0 0;
  color: var(--ink-600);
  font-size: .875rem;
  line-height: 1.6;
}
.attorney-separation-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid var(--amber-700);
  border-radius: 6px;
  background: var(--amber-100);
  color: var(--amber-700);
}
.attorney-separation-banner div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: .8125rem;
  line-height: 1.45;
}
.independent-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--jade-700);
  border-radius: 999px;
  background: var(--jade-100);
  color: var(--jade-700);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .04em;
}
.scope-line {
  display: grid;
  grid-template-columns: minmax(8rem, .4fr) minmax(0, 1fr);
  gap: 4px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: .875rem;
  line-height: 1.5;
}
.scope-line:last-child {
  border-bottom: 0;
}
.scope-line > span {
  color: var(--ink-600);
}
@container workflow (max-width:30rem) {
  .scope-line {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}
.scope-exclusion {
  margin: 14px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  color: var(--ink-500);
  font-size: .8125rem;
  line-height: 1.6;
}
.attorney-disposition-options {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 12px 16px;
  padding: 0;
  border: 0;
}
.disposition-option {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.disposition-option:hover {
  border-color: var(--teal-700);
}
.disposition-option:has(input:checked) {
  border-color: #087557;
  background: #e3f5ef;
}
.disposition-option:has(input:focus-visible) {
  outline: 3px solid var(--teal-700);
  outline-offset: 2px;
}
.disposition-option input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #087557;
}
.disposition-option label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.disposition-option label::after {
  content: "";
  position: absolute;
  inset: 0;
}
.disposition-option strong {
  font-size: .875rem;
  line-height: 1.4;
}
.disposition-option .disposition-detail {
  color: var(--ink-600);
  font-size: .8125rem;
  line-height: 1.5;
}
.attorney-closed {
  width: min(620px, calc(100% - 32px));
  margin: 40px auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}
.attorney-closed .scope-line {
  text-align: left;
}
.attorney-referral-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  width: 100%;
  margin-bottom: 4px;
}
.attorney-referral-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.attorney-referral {
  display: grid;
  gap: 0;
  width: 100%;
  min-height: 44px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-900);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.attorney-referral:hover {
  border-color: var(--teal-700);
}
.attorney-referral:focus-visible {
  outline: 3px solid var(--teal-700);
  outline-offset: 2px;
}
.attorney-referral-title {
  font-size: 1rem;
  line-height: 1.4;
}
.attorney-referral .scope-line {
  padding: 6px 0;
  border-bottom: 0;
}
.attorney-referral .scope-line time {
  font-weight: 700;
}
.attorney-referral-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-self: end;
  margin-top: 8px;
  color: var(--teal-700);
  font-size: .875rem;
  font-weight: 600;
}
.attorney-prose {
  max-width: 68ch;
}
.attorney-prose p {
  margin: 0;
  font-size: .875rem;
  line-height: 1.6;
}
.attorney-prose p + p {
  margin-top: 12px;
}
.attorney-main > :is(.ledger-section, .attorney-notes-slot) + :is(.ledger-section, .attorney-notes-slot) {
  margin-top: 20px;
}
.attorney-notes-slot {
  min-width: 0;
}
.attorney-facts {
  display: block;
}
.attorney-note {
  color: var(--ink-600);
  font-size: .875rem;
  line-height: 1.6;
}
.attorney-identifier summary {
  color: var(--teal-700);
  font-size: .8125rem;
  font-weight: 600;
}
.attorney-identifier code {
  display: block;
  margin-top: 6px;
  font-size: .8125rem;
}
.attorney-back {
  margin-top: 16px;
}
.attorney-messages:empty {
  display: none;
}
:scope .attorney-dialog .modal-head > .icon-button.icon-button {
  flex: none;
  width: 44px;
  height: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
}
.attorney-dialog .modal-head p {
  font-size: .875rem;
  line-height: 1.5;
}
.attorney-dialog-fields {
  display: grid;
  gap: 16px;
}
.attorney-dialog-fields .field {
  gap: 6px;
  margin: 0;
}
.attorney-dialog-fields select {
  width: 100%;
}
.attorney-date-field input {
  width: 100%;
  max-width: 14rem;
  min-width: 12rem;
}
.attorney-dialog-fields p {
  margin: 0;
  color: var(--ink-600);
  font-size: .875rem;
  line-height: 1.6;
}
.attorney-dialog .modal-foot {
  flex-wrap: wrap;
}
@media (max-width: 720px) {
  .modal-backdrop:has(> .attorney-dialog) {
    place-items: end stretch;
    align-content: end;
    padding: 0;
  }
  .attorney-dialog {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 90vh;
    transform: none;
    animation: none;
    border-radius: 12px 12px 0 0;
  }
}
.field {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}
.field-error {
  margin: 0;
  color: var(--coral-700);
  font-size: .875rem;
  line-height: 1.5;
}
.field input[aria-invalid=true] {
  border-color: var(--coral-700);
}
.field label {
  color: var(--ink-500);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.field input,
.field select,
.field textarea {
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: .8125rem;
}
.field.attestation {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}
.field.attestation input {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 3px;
  justify-self: start;
}
.field.attestation label {
  color: var(--ink-700);
  font-size: .8125rem;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.6;
  text-transform: none;
}
.referral-form {
  display: flex;
  flex-direction: column;
  max-width: 40rem;
  padding: 0;
}
.referral-form > .button {
  align-self: flex-start;
}
.error-summary:not([hidden]) {
  display: block;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--coral-700);
  background: var(--coral-100);
  color: var(--coral-700);
}
.stage-rail span.rail-0 {
  width: 0;
}
.stage-rail span.rail-20 {
  width: 20%;
}
.stage-rail span.rail-40 {
  width: 40%;
}
.stage-rail span.rail-60 {
  width: 60%;
}
.stage-rail span.rail-80 {
  width: 80%;
}
.stage-rail span.rail-100 {
  width: 100%;
}
.badge.channel-ai {
  border-color: var(--violet-700);
  box-shadow: inset 2px 0 0 var(--violet-700);
}
.appr-block {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}
.appr-block h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}
.appr-block h4 {
  margin: 10px 0 6px;
  font-size: .875rem;
}
.appr-block p,
.appr-block li {
  font-size: .875rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.appr-block .fact {
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.appr-block .button {
  margin: 4px 8px 4px 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}
[data-region=approval-queue] [data-bulk] {
  padding: 0 18px;
  font-size: .875rem;
}
[data-region=approval-envelope] .callout {
  margin: 14px 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  font-size: .875rem;
  line-height: 1.6;
}
[data-region=approval-envelope] .callout.red {
  border-color: var(--coral-700);
  background: var(--coral-100);
}
[data-region=approval-envelope] .callout.grey {
  border-color: var(--ink-400);
  background: var(--canvas);
}
@media screen {
  :scope.role-content .state-panel h2 {
    font-size: 1rem;
    line-height: 1.4;
  }
  :scope.role-content .state-panel p {
    font-size: .875rem;
    line-height: 1.6;
  }
  :scope.role-content .muted,
  :scope.role-content .state-panel :is(p, h3),
  :scope.role-content .field label {
    color: var(--ink-600);
  }
  :scope.role-content .field label {
    font-size: .8125rem;
    line-height: 1.5;
  }
  :scope.role-content .field.attestation label {
    font-size: .875rem;
  }
  :scope.role-content .appr-block :is(p, li),
  :scope.role-content [data-region=approval-envelope] .callout {
    font-size: .875rem;
  }
}
.administrative-notes {
  min-width: 0;
}
.administrative-notes .section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.notes-composer {
  display: grid;
  gap: 10px;
  padding: 16px;
}
.notes-composer textarea,
.notes-composer select {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
}
.notes-composer textarea {
  min-height: 148px;
  resize: vertical;
  line-height: 1.5;
}
.administrative-note-list {
  padding: 0 16px;
  list-style: none;
}
.administrative-note-list > li {
  padding: 16px 0;
  border-top: 1px solid var(--color-border,#d6dedb);
  min-width: 0;
}
.administrative-note-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.administrative-notes details p {
  overflow-wrap: anywhere;
}
.counsel-conversation {
  border-top: 1px solid var(--color-border,#d6dedb);
  padding: 12px 16px;
  min-width: 0;
}
.counsel-conversation-toggle {
  min-height: 44px;
  min-width: 44px;
  align-content: center;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.counsel-conversation [data-message-row] {
  padding: 14px;
  border: 1px solid var(--color-border,#d6dedb);
  border-radius: 10px;
  margin: 12px 0;
  min-width: 0;
}
.counsel-conversation [data-message-body] {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.counsel-conversation [data-message-row] time {
  font-size: .875rem;
  color: var(--color-text-secondary,#52635b);
}
.counsel-conversation [data-reply-composer] {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}
.counsel-conversation textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 120px;
  resize: vertical;
}
.counsel-conversation [data-send-message] {
  justify-self: start;
  min-height: 44px;
}

/* ../../packages/design-system/styles/console.css */
.console-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
}
.console-surface {
  display: block;
  width: 100%;
  min-width: 0;
}
.console-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}
.console-layout .left-stack,
.console-layout .right-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.filter-bar label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink-700);
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.filter-bar input,
.filter-select {
  min-height: 24px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink-900);
  font: inherit;
}
.lookup-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  padding: 14px 18px;
}
.console-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 620px;
  padding: 14px 18px;
}
.console-form > button {
  align-self: flex-start;
  margin-top: 4px;
}
.ledger-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}
.ledger-row .fact {
  flex: 0 1 180px;
}
.fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}
.fact-label {
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.fact-value {
  color: var(--ink-900);
}
.case-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}
.case-row-identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}
.case-row-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  flex: 1;
}
.state-statement {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.attribution-note {
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.sourced-fact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
}
.sourced-fact .fact-label {
  min-width: 170px;
}
.sourced-fact .fact-value {
  flex: 1;
}
.tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.tab {
  min-height: 24px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--ink-600);
  font: inherit;
  cursor: pointer;
}
.tab.active {
  color: var(--ink-950);
  border-bottom-color: var(--teal-600);
}
.queue-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 12px 16px 16px;
  list-style: none;
}
.queue-list li {
  display: flex;
  min-width: 0;
}
.queue-list .queue-tile {
  flex: 1;
  justify-content: flex-start;
  align-items: center;
  min-width: 0;
  padding-block: 10px;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
}
.queue-picker-compact {
  display: none;
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 14px 18px;
  list-style: none;
}
.band-list {
  margin: 0;
  padding: 0 18px;
  list-style: none;
}
.queue-rows {
  display: flex;
  flex-direction: column;
}
.queue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.queue-row > :not(.queue-row-action) {
  grid-column: 1;
}
.queue-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.queue-row-action {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
}
@media (max-width: 600px) {
  .queue-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .queue-row-action {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}
.queue-row-head > .badge {
  align-self: center;
}
.queue-legend:empty {
  display: none;
}
.queue-legend > p {
  margin: 0;
}
.queue-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
}
.order-factors {
  margin: 0;
  font-size: .8125rem;
  color: var(--ink-600);
}
.order-factors[open] {
  flex-basis: 100%;
}
.order-factors > summary {
  min-height: 24px;
  padding-block: 2px;
  width: max-content;
  max-width: 100%;
}
.order-factors > dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 10px 20px;
  margin: 8px 0 0;
}
.order-factors .fact-label {
  letter-spacing: normal;
  text-transform: none;
}
.order-factors dd,
.queue-counts dd {
  margin: 0;
}
.queue-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.queue-counts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin: 0;
}
.queue-count {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.queue-count .fact-label {
  letter-spacing: normal;
  text-transform: none;
}
.queue-count .fact-label::after {
  content: ":";
}
.queue-count .fact-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
@container workflow (max-width:62rem) {
  .queue-list {
    display: none;
  }
  .queue-picker-compact {
    display: grid;
  }
  .queue-picker-compact select {
    width: 100%;
    max-width: 24rem;
  }
}
@container workflow (max-width:600px) {
  .queue-counts {
    flex-direction: column;
    gap: 2px;
  }
}
.claim-statement {
  color: var(--ink-600);
  font-size: .8125rem;
  letter-spacing: normal;
  text-transform: none;
}
.queue-capacity {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.queue-capacity-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.queue-capacity-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
}
.deadline {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--ink-900);
  font-size: .875rem;
}
.deadline.internal {
  color: var(--ink-500);
}
.ledger-subsection {
  margin-left: 18px;
  padding: 12px 18px;
  border-left: 1px solid var(--line);
}
.ledger-subsection h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.pairing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
}
.pairing-half {
  padding: 16px 18px;
  background: var(--paper);
}
.pairing-half p {
  max-width: 72ch;
}
.pairing-half h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.pairing-half[data-half=verified] {
  background: var(--teal-100);
}
.signin {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
  padding: 64px 24px;
}
.signin-failure {
  color: var(--coral-700);
}
@media screen {
  :scope.role-content :is(.fact-label, .attribution-note, .claim-statement, .deadline) {
    font-size: .75rem;
    line-height: 1.5;
    color: var(--ink-600);
  }
  :scope.role-content .filter-bar label {
    line-height: 1.5;
  }
}
@media screen {
  :scope.role-content .ledger-section > :is(.queue-rows, .record-list, .region-failure, .region-state) {
    margin: 0;
  }
  :scope.role-content .workspace-header + .console-body {
    padding-top: 0;
  }
  :scope.role-content .ledger-header > .badge {
    flex: 0 0 auto;
    align-self: flex-start;
    min-width: 0;
    max-width: 50%;
  }
  .region-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
  }
  .region-stack:empty,
  [data-workforce-form]:empty,
  [data-workforce-drawer]:empty {
    display: none;
  }
  .state-panel:is(.region-failure, .region-state) {
    align-items: flex-start;
    gap: 8px;
    padding: 20px 16px;
    text-align: left;
  }
  .state-panel:is(.region-failure, .region-state) :is(h2, h3) {
    margin: 0;
    font-size: .875rem;
    font-weight: 600;
  }
  .state-panel:is(.region-failure, .region-state) p {
    max-width: 72ch;
    font-size: .875rem;
  }
  .state-panel:is(.region-failure, .region-state) .state-glyph {
    width: 32px;
    height: 32px;
  }
  .failure-reference {
    margin: 0;
    font-size: .8125rem;
  }
  .failure-violations {
    margin: 0;
    padding-left: 20px;
  }
  .fact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 12px 20px;
    align-items: start;
    min-width: 0;
  }
  .fact-grid .fact {
    min-width: 0;
  }
  .fact-value {
    overflow-wrap: break-word;
  }
  .fact-grid[data-account-facts] {
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  }
  .identifier-details {
    font-size: .8125rem;
    color: var(--ink-600);
  }
  .identifier-details summary {
    cursor: pointer;
    width: max-content;
    max-width: 100%;
    font-weight: 600;
  }
  .identifier-details dl {
    display: grid;
    grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr);
    gap: 4px 12px;
    margin: 8px 0 0;
  }
  .identifier-details dd {
    margin: 0;
  }
  .fact-table {
    width: 100%;
    min-width: 0;
    max-width: 40rem;
    border-collapse: collapse;
    table-layout: auto;
    font-size: .875rem;
  }
  .fact-table caption {
    padding: 0 0 6px;
    text-align: left;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ink-900);
  }
  .fact-table :is(th, td) {
    white-space: normal;
    padding: 6px 12px 6px 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
  }
  .fact-table thead th {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-600);
  }
  .fact-table td {
    font-size: .875rem;
  }
  .fact-table tbody th {
    font-size: .875rem;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    color: var(--ink-900);
    background: none;
  }
  .fact-table thead th {
    background: none;
    overflow-wrap: break-word;
  }
  .fact-table .numeric,
  .fact-value.numeric {
    font-variant-numeric: tabular-nums;
  }
  :scope.role-content :is([data-region=extraction-candidate-summary], [data-case-group], .extraction-document) > .fact-grid {
    align-items: end;
  }
  .extraction-document {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }
  .extraction-document h3 {
    margin: 0;
    font-size: 1rem;
  }
  .extraction-candidate {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
  }
  .extraction-candidate > p {
    margin: 0;
  }
  .extraction-candidate-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .extraction-candidate-head h4 {
    margin: 0;
    font-size: .875rem;
    font-weight: 600;
  }
  .extraction-evidence {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .extraction-evidence p {
    margin: 0;
  }
  .review-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .review-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
    gap: 12px 16px;
  }
  .review-fields .field {
    margin: 0;
  }
  .review-fields input {
    width: 100%;
    box-sizing: border-box;
  }
  .field-hint {
    font-size: .75rem;
    color: var(--ink-600);
  }
  .review-actions {
    justify-content: flex-end;
  }
  .review-controls [role=alert]:empty {
    display: none;
  }
  :scope.role-content .ledger-row.record-row {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
  }
  :scope.role-content .ledger-row.record-row > .record-actions {
    align-self: stretch;
    justify-self: auto;
  }
  .record-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-width: 0;
  }
  .record-title {
    font-weight: 600;
    overflow-wrap: break-word;
  }
  .record-actions {
    justify-content: flex-start;
  }
  .record-row > p {
    margin: 0;
    max-width: 72ch;
  }
  .record-row > .field {
    max-width: 32rem;
    margin: 0;
  }
  .field.field-inline {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin: 0;
    min-height: 44px;
  }
  .field.field-inline input {
    width: 20px;
    height: 20px;
    min-height: 20px;
    padding: 0;
    margin: 0;
    accent-color: #087557;
  }
  :scope.role-content .field.field-inline label {
    letter-spacing: normal;
    text-transform: none;
    font-size: .875rem;
    font-weight: 500;
    color: var(--ink-900);
  }
  [data-document-request] > .button-row {
    margin-top: 12px;
  }
  :scope.role-content .record-list[data-fact-columns] > .ledger-row.record-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px 16px;
  }
  :scope.role-content .record-list[data-fact-columns] > .record-row > * {
    grid-column: 1/-1;
  }
  :scope.role-content .record-list[data-fact-columns] > .record-row > .record-head {
    grid-column: 1/-2;
    grid-row: 1;
    align-self: center;
  }
  :scope.role-content .record-list[data-fact-columns] > .record-row > .record-actions {
    grid-column: -2/-1;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    flex-wrap: nowrap;
  }
  @container workflow (min-width:56rem) {
    :scope.role-content .record-list[data-fact-columns] {
      display: grid;
      column-gap: 24px;
    }
    :scope.role-content .record-list[data-fact-columns="2"] {
      grid-template-columns: repeat(2, auto);
    }
    :scope.role-content .record-list[data-fact-columns="3"] {
      grid-template-columns: repeat(3, auto);
    }
    :scope.role-content .record-list[data-fact-columns="4"] {
      grid-template-columns: repeat(4, auto);
    }
    :scope.role-content .record-list[data-fact-columns="5"] {
      grid-template-columns: repeat(5, auto);
    }
    :scope.role-content .record-list[data-fact-columns="6"] {
      grid-template-columns: repeat(6, auto);
    }
    :scope.role-content .record-list[data-fact-columns="7"] {
      grid-template-columns: repeat(7, auto);
    }
    :scope.role-content .record-list[data-fact-columns] > .ledger-row.record-row {
      grid-column: 1/-1;
      grid-template-columns: subgrid;
      column-gap: 24px;
    }
    :scope.role-content .record-list[data-fact-columns] > .record-row > .fact-grid {
      grid-template-columns: subgrid;
      column-gap: 24px;
    }
    :scope.role-content .record-list[data-fact-columns] .fact-label {
      white-space: nowrap;
    }
  }
  .qa-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(max(min(20rem, 100%), calc(50% - 4px)), 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .qa-checklist li {
    display: flex;
    min-width: 0;
  }
  :scope.role-content .qa-checklist .button.qa-item {
    flex: 1;
    display: grid;
    grid-template-columns: 3ch minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    justify-content: stretch;
    min-width: 0;
    text-align: left;
    font-weight: 500;
    white-space: normal;
  }
  :scope.role-content .qa-checklist .button.qa-item[aria-current=true] {
    background: #e3f5ef;
    border-color: #087557;
    box-shadow: inset 0 0 0 1px #087557;
  }
  .qa-item-ordinal {
    color: var(--ink-600);
    font-variant-numeric: tabular-nums;
    text-align: right;
  }
  .qa-item-description {
    overflow-wrap: break-word;
  }
  :scope.role-content .state-statement .attribution-note {
    font-size: .8125rem;
    letter-spacing: normal;
    text-transform: none;
    color: var(--ink-600);
  }
  .subsection-title {
    font-size: .875rem;
    font-weight: 600;
    color: var(--ink-900);
  }
  .fact-list {
    margin: 2px 0 0;
    padding-left: 20px;
  }
  .record-list > .record-row:first-child {
    border-top: 0;
  }
  .queue-row-reference {
    color: var(--ink-600);
    font-variant-numeric: tabular-nums;
  }
  .impact-case-list {
    margin: 4px 0 0;
    padding-left: 20px;
  }
  .impact-case-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    padding: 2px 0;
  }
  .filter-bar.page-filters {
    padding: 0;
    border: 0;
    background: none;
    align-items: flex-end;
  }
  .filter-bar.page-filters[data-case-filters] {
    align-items: flex-start;
  }
  .page-filters[data-case-filters] .filter-field {
    width: 18rem;
    max-width: 100%;
  }
  .page-filters .filter-field {
    min-width: 0;
  }
  .page-filters :is(select, input[type=text], input[type=search]) {
    width: 18rem;
    max-width: 100%;
    box-sizing: border-box;
  }
  .filter-field.checkbox-field {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-height: 44px;
  }
  .filter-field.checkbox-field input {
    width: 20px;
    height: 20px;
    min-height: 20px;
    margin: 0;
    accent-color: #087557;
  }
  .filter-bar .filter-check-field {
    min-width: 0;
  }
  .filter-bar .filter-spacer {
    display: block;
    font-size: .8125rem;
    line-height: 1.5;
    visibility: hidden;
  }
  .filter-bar .filter-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    cursor: pointer;
  }
  .filter-bar .filter-check input {
    width: 20px;
    height: 20px;
    min-height: 20px;
    margin: 0;
    accent-color: #087557;
  }
  :scope.role-content .filter-bar .filter-field.checkbox-field label {
    font-size: .875rem;
    letter-spacing: normal;
    text-transform: none;
    color: var(--ink-900);
  }
  .facet-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .attest-control {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 12px;
  }
  .attest-control .field {
    margin: 0;
  }
  .attest-control input {
    width: 8rem;
  }
  .chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .pair-legs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
    gap: 12px 24px;
  }
  .pair-leg h3 {
    margin: 0 0 6px;
    font-size: .875rem;
    font-weight: 600;
  }
  .period-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-variant-numeric: tabular-nums;
  }
  .inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 12px;
  }
  .inline-form .field {
    margin: 0;
  }
  .inline-form select {
    min-width: 14rem;
  }
  .nested-records {
    padding-left: 12px;
    border-left: 3px solid var(--line);
  }
  :scope.role-content .nested-records > .ledger-row.record-row {
    padding: 10px 0;
    border-top: 1px solid var(--line);
  }
  :scope.role-content .nested-records > .ledger-row.record-row:first-child {
    border-top: 0;
  }
  .transaction-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
  }
  .transaction-toolbar .checkbox-field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
  }
  .transaction-toolbar .checkbox-field input {
    width: 20px;
    height: 20px;
    min-height: 20px;
    margin: 0;
    accent-color: var(--teal-700);
  }
  .transaction-toolbar .checkbox-field label {
    font-size: .875rem;
    color: var(--ink-900);
  }
  .transaction-count {
    font-size: .8125rem;
    color: var(--ink-600);
  }
  .transaction-count:empty {
    display: none;
  }
  .transaction-more[hidden] {
    display: none;
  }
  .transaction-table-scroll {
    max-width: 100%;
    overflow-x: auto;
  }
  :scope.role-content .transaction-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    font-size: .875rem;
  }
  :scope.role-content .transaction-table :is(th, td) {
    padding: 6px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
  }
  :scope.role-content .transaction-table tbody tr:last-child td {
    border-bottom: 1px solid var(--line);
  }
  :scope.role-content .transaction-table :is(th, td).numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  :scope.role-content .transaction-table .transaction-date {
    white-space: nowrap;
  }
  :scope.role-content .transaction-table .transaction-description {
    min-width: 12rem;
  }
  :scope.role-content .transaction-table .transaction-description .badge {
    margin-left: 8px;
  }
  :scope.role-content .transaction-table .transaction-action {
    text-align: right;
    white-space: nowrap;
  }
  :scope.role-content .transaction-table .transaction-details > td {
    padding: 12px 16px 16px;
    background: var(--paper-warm);
  }
  .transaction-details-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
  }
  @container workflow (max-width:640px) {
    :scope.role-content .transaction-table thead {
      display: none;
    }
    :scope.role-content .transaction-table :is(tbody:not([hidden]), tr:not([hidden]), td) {
      display: block;
    }
    :scope.role-content .transaction-table tr.transaction-row {
      display: grid;
      grid-template-columns: auto auto minmax(0, 1fr);
      grid-template-areas: "description description amount" "date type balance" "disposition disposition action";
      gap: 2px 12px;
      align-items: center;
      padding: 12px 0;
      border-bottom: 1px solid var(--line);
    }
    :scope.role-content .transaction-table tr.transaction-row > td {
      min-width: 0;
      padding: 0;
      border: 0;
      text-align: left;
    }
    :scope.role-content .transaction-table tr.transaction-row > .transaction-description {
      grid-area: description;
    }
    :scope.role-content .transaction-table tr.transaction-row > .transaction-amount {
      grid-area: amount;
      text-align: right;
      font-weight: 600;
    }
    :scope.role-content .transaction-table tr.transaction-row > .transaction-date {
      grid-area: date;
      color: var(--ink-600);
    }
    :scope.role-content .transaction-table tr.transaction-row > .transaction-type {
      grid-area: type;
      color: var(--ink-600);
    }
    :scope.role-content .transaction-table tr.transaction-row > .transaction-balance {
      grid-area: balance;
      text-align: right;
      color: var(--ink-600);
      font-size: .8125rem;
    }
    :scope.role-content .transaction-table tr.transaction-row > .transaction-balance:not(:empty)::before {
      content: attr(data-label) " ";
    }
    :scope.role-content .transaction-table tr.transaction-row > .transaction-disposition {
      grid-area: disposition;
    }
    :scope.role-content .transaction-table tr.transaction-row > .transaction-action {
      grid-area: action;
      justify-self: end;
    }
  }
  .evidence-matrix-layout {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
  }
  .matrix-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    min-width: 0;
  }
  .matrix-caption {
    margin: 0;
    font-size: .8125rem;
    color: var(--ink-600);
  }
  .evidence-matrix-layout .coverage-wrap {
    max-width: 100%;
    overflow-x: auto;
    background:
      linear-gradient(
        to right,
        var(--paper) 30%,
        transparent) left center/40px 100% no-repeat local,
      linear-gradient(
        to left,
        var(--paper) 30%,
        transparent) right center/40px 100% no-repeat local,
      radial-gradient(
        farthest-side at 0 50%,
        color-mix(in srgb, var(--ink-900) 18%, transparent),
        transparent) left center/14px 100% no-repeat scroll,
      radial-gradient(
        farthest-side at 100% 50%,
        color-mix(in srgb, var(--ink-900) 18%, transparent),
        transparent) right center/14px 100% no-repeat scroll;
  }
  .evidence-matrix-layout .coverage-wrap:focus-visible {
    outline: 3px solid var(--teal-700);
    outline-offset: 2px;
  }
  :scope.role-content .coverage-table.evidence-matrix {
    min-width: 0;
    border: 0;
  }
  :scope.role-content .coverage-table.evidence-matrix th:first-child {
    width: auto;
    min-width: 12rem;
    max-width: 16rem;
    padding: 8px 12px;
    text-align: left;
    white-space: normal;
  }
  :scope.role-content .coverage-table.evidence-matrix td {
    min-width: 3.25rem;
    padding: 6px 4px;
  }
  :scope.role-content .coverage-table.evidence-matrix thead th {
    white-space: nowrap;
    padding: 8px;
  }
  .evidence-matrix :is(.matrix-month, .matrix-year) {
    display: block;
    line-height: 1.3;
  }
  :scope.role-content .coverage-table.evidence-matrix thead th.matrix-span-head {
    white-space: normal;
    min-width: 7rem;
    max-width: 10rem;
    line-height: 1.3;
  }
  :scope.role-content .coverage-table.evidence-matrix td.matrix-span-cell {
    min-width: 7rem;
    max-width: 10rem;
    padding: 8px 12px;
    background: var(--canvas);
    color: var(--ink-600);
    font-size: .8125rem;
    line-height: 1.4;
    white-space: normal;
  }
  :scope.role-content .ledger-section > .matrix-legend-block {
    margin-top: 24px;
  }
  .matrix-legend-block h3 {
    margin: 0 0 8px;
    font-size: .875rem;
    font-weight: 600;
  }
  .matrix-legend-block h4 {
    margin: 12px 0 6px;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--ink-600);
  }
  .matrix-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .matrix-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .875rem;
    white-space: nowrap;
  }
  .matrix-cell.legend-glyph {
    flex-shrink: 0;
    cursor: default;
  }
  [data-matrix-detail] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }
  [data-matrix-detail] :is(h3, h4) {
    margin: 0;
    font-size: .875rem;
    font-weight: 600;
  }
  .count-list {
    margin: 0;
    padding: 0;
    list-style: none;
    columns: 2 20rem;
    column-gap: 32px;
  }
  .count-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    break-inside: avoid;
  }
  .count-list .count-row:first-child {
    border-top: 0;
  }
  :scope.role-content .ledger-section > .count-list.record-list {
    margin-top: -1px;
  }
  .count-row-label {
    font-size: .875rem;
    color: var(--ink-900);
  }
  .count-row-value {
    font-size: 1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink-900);
  }
  .scope-notice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .scope-notice > p {
    margin: 0;
    max-width: 72ch;
  }
  .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
    gap: 12px 16px;
    align-items: start;
    max-width: 64rem;
  }
  .form-grid .field {
    margin: 0;
    min-width: 0;
  }
  .form-grid .field :is(input, select, textarea) {
    width: 100%;
    box-sizing: border-box;
  }
  .form-grid > .form-actions,
  .form-grid > .full-width {
    grid-column: 1/-1;
  }
  .form-grid > .full-width:empty {
    display: none;
  }
  .measure {
    max-width: 72ch;
  }
  :scope.role-content [data-export-form] .field label {
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    color: var(--ink-700);
  }
  .export-manifest {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .export-manifest :is(h3, h4) {
    margin: 0;
    font-size: .875rem;
    font-weight: 600;
  }
  .export-manifest p {
    margin: 0;
  }
}
@container workflow (min-width:1024px) {
  .retention-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@container workflow (max-width:600px) {
  :scope.role-content .coverage-table.evidence-matrix th:first-child {
    min-width: 7.5rem;
    max-width: 9rem;
  }
}
@container workflow (max-width:520px) {
  :scope.role-content .qa-checklist .button.qa-item {
    grid-template-columns: 3ch minmax(0, 1fr);
  }
  :scope.role-content .qa-checklist .button.qa-item > .badge {
    grid-column: 2;
    justify-self: start;
  }
  .fact-grid {
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    gap: 10px 16px;
  }
  :scope.role-content .ledger-header {
    flex-wrap: wrap;
  }
  :scope.role-content .ledger-header:has(> .badge) {
    flex-wrap: nowrap;
  }
  .page-filters .filter-field {
    flex: 1 1 100%;
  }
  .page-filters :is(select, input[type=text], input[type=search]) {
    width: 100%;
  }
}
.queue-picker-select {
  width: 100%;
  max-width: 24rem;
}

/* ../../packages/design-system/styles/responsive.css */
@media (max-width: 1440px) {
  .casebar {
    grid-template-columns: minmax(280px, 1.4fr) repeat(4, minmax(105px, .6fr)) auto;
  }
  .case-fact:nth-of-type(5) {
    display: none;
  }
  .case-grid {
    grid-template-columns: 205px minmax(560px, 1fr) 300px;
  }
  .evidence-layout {
    grid-template-columns: 240px minmax(500px, 1fr) 320px;
  }
}
@media (max-width: 1220px) {
  .track-ribbon {
    grid-template-columns: repeat(3, 1fr);
  }
  .track-cell:nth-child(3) {
    border-right: 0;
  }
  .track-cell:nth-child(-n+3) {
    border-bottom: 1px solid var(--line);
  }
  .case-grid {
    grid-template-columns: 190px minmax(520px, 1fr);
  }
  .case-inspector {
    grid-column: 2;
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .evidence-layout {
    grid-template-columns: 220px minmax(480px, 1fr);
  }
  .extraction-panel {
    grid-column: 1/-1;
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: none;
  }
  .evidence-layout {
    height: auto;
  }
  .rfi-studio {
    grid-template-columns: 1fr;
  }
  .notice-viewer {
    position: static;
    height: 760px;
  }
  .operations-grid,
  .facility-layout {
    grid-template-columns: 1fr;
  }
  .right-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 980px) {
  :scope {
    --rail:64px;
  }
  .product-name {
    min-width: auto;
  }
  .product-name small,
  .user-menu .user-meta,
  .policy-chip span {
    display: none;
  }
  .global-search {
    min-width: 180px;
  }
  .casebar {
    grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(110px, .6fr)) auto;
  }
  .case-fact:nth-of-type(n+3) {
    display: none;
  }
  .case-grid {
    grid-template-columns: 1fr;
  }
  .case-index {
    position: static;
    display: flex;
    overflow: auto;
  }
  .case-index-header {
    min-width: 155px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
  .case-index-list {
    display: flex;
  }
  .case-index-link {
    min-width: 120px;
  }
  .case-inspector {
    grid-column: auto;
  }
  .critical-ledger {
    grid-template-columns: 1fr;
  }
  .critical-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .critical-cell:last-child {
    border-bottom: 0;
  }
  .evidence-layout {
    grid-template-columns: 1fr;
  }
  .evidence-sidebar {
    max-height: 280px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .applicant-hero,
  .applicant-grid {
    grid-template-columns: 1fr;
  }
  .applicant-help {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 720px) {
  :scope {
    --rail:0px;
    --top:56px;
    --casebar:94px;
  }
  .global-rail {
    display: none;
  }
  .app-shell {
    padding-left: 0;
  }
  .topbar {
    left: 0;
    padding: 0 12px;
  }
  .product-name {
    font-size: .875rem;
  }
  .global-search {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding: 0;
    justify-content: center;
  }
  .global-search span,
  .global-search kbd {
    display: none;
  }
  .policy-chip {
    display: none;
  }
  .user-menu {
    padding-left: 0;
    border-left: 0;
  }
  .topbar-actions .icon-button:nth-child(2) {
    display: none;
  }
  .casebar {
    left: 0;
    height: var(--casebar);
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr 30px;
    padding: 8px 12px;
  }
  .case-identity {
    grid-column: 1;
  }
  .case-fact {
    display: none !important;
  }
  .casebar .case-action {
    grid-column: 2;
    grid-row: 1;
  }
  .casebar .case-action.secondary {
    display: none;
  }
  .case-identity h1 {
    font-size: 15px;
  }
  .case-identity .subline {
    flex-wrap: wrap;
  }
  .page {
    padding: calc(var(--top) + var(--casebar) + 12px) 10px 78px;
  }
  .page.no-case {
    padding-top: calc(var(--top) + 14px);
  }
  .track-ribbon {
    grid-template-columns: 1fr 1fr;
  }
  .track-cell:nth-child(odd) {
    border-right: 1px solid var(--line);
  }
  .track-cell:nth-child(even) {
    border-right: 0;
  }
  .track-cell {
    border-bottom: 1px solid var(--line);
  }
  .track-cell:nth-last-child(-n+2) {
    border-bottom: 0;
  }
  .case-grid {
    gap: 10px;
  }
  .case-index {
    display: block;
  }
  .case-index-header {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .case-index-list {
    display: flex;
    overflow: auto;
  }
  .case-index-link {
    min-width: 118px;
  }
  .case-inspector {
    display: block;
  }
  .case-inspector > * {
    margin-bottom: 10px;
  }
  .critical-ledger {
    grid-template-columns: 1fr;
  }
  .workstream-ledger {
    min-width: 760px;
  }
  .ledger-section:has(.workstream-ledger) {
    overflow: auto;
  }
  .issue-table {
    min-width: 660px;
  }
  .ledger-section:has(.issue-table) {
    overflow: auto;
  }
  .command-dock {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
  .command-dock .dock-context {
    display: none;
  }
  .command-dock .button.ghost {
    display: none;
  }
  .evidence-layout {
    min-height: 0;
  }
  .paper-stage {
    padding: 12px;
  }
  .statement-page {
    min-width: 650px;
  }
  .document-viewer {
    overflow: auto;
  }
  .extraction-panel {
    max-height: none;
  }
  .deadline-ledger {
    grid-template-columns: 1fr 1fr;
  }
  .request-item {
    grid-template-columns: 36px 1fr;
  }
  .request-state {
    grid-column: 2;
    align-items: flex-start;
  }
  .pulse-strip {
    grid-template-columns: 1fr 1fr;
  }
  .pulse-item {
    border-bottom: 1px solid var(--line);
  }
  .pulse-item:nth-child(even) {
    border-right: 0;
  }
  .operations-grid {
    gap: 10px;
  }
  .right-stack {
    display: block;
  }
  .right-stack > * {
    margin-bottom: 10px;
  }
  .queue-board {
    overflow: auto;
  }
  .queue-table {
    min-width: 760px;
  }
  .applicant-top {
    padding: 0 14px;
  }
  .applicant-main {
    padding: 18px 12px 36px;
  }
  .applicant-message {
    padding: 22px 20px;
  }
  .applicant-message h1 {
    font-size: 28px;
  }
  .journey-rail {
    grid-auto-flow: row;
    grid-template-columns: 1fr;
    border-top: 0;
  }
  .journey-step {
    padding: 10px 0 10px 20px;
    border-left: 1px solid var(--line);
    border-top: 0;
  }
  .journey-step:before {
    left: -5px;
    top: 15px;
  }
  .applicant-request {
    grid-template-columns: minmax(5.5rem, auto) 1fr;
  }
  .applicant-request > .button {
    grid-column: 2;
    justify-self: start;
  }
  .workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .workspace-actions {
    width: 100%;
  }
  .workspace-actions .button {
    flex: 1;
  }
  .modal-backdrop {
    align-items: end;
    padding: 0;
  }
  .modal {
    width: 100%;
    max-height: 90vh;
    border-radius: 10px 10px 0 0;
  }
}
@media (max-width: 420px) {
  .topbar-actions .icon-button:first-child {
    display: none;
  }
  .user-menu .rail-avatar {
    width: 34px;
    height: 34px;
  }
  .track-ribbon {
    grid-template-columns: 1fr;
  }
  .track-cell {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .track-cell:last-child {
    border-bottom: 0 !important;
  }
  .pulse-strip {
    grid-template-columns: 1fr;
  }
  .pulse-item {
    border-right: 0;
  }
  .deadline-ledger {
    grid-template-columns: 1fr;
  }
  .applicant-message h1 {
    font-size: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ../../packages/design-system/styles/index.css */

/* Applicant destinations remain in normal flow at every viewport and zoom. */
.applicant-shell .applicant-top {
  height: auto;
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  padding: 12px 22px;
}
.applicant-top > nav { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
.applicant-top > .applicant-signout { grid-column: 2; grid-row: 1; }
.applicant-top ul { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.applicant-top ul[hidden] { display: none; }
.applicant-top li { min-width: 0; max-width: 100%; }
.applicant-top nav a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; box-sizing: border-box; border-radius: 6px; overflow-wrap: anywhere; }
.applicant-top nav a[aria-current="page"] { background: var(--teal-100); font-weight: 700; }
.applicant-top button { min-height: 44px; }
.applicant-top nav button { margin-bottom: 4px; }
@media (max-width: 700px) {
  .applicant-shell .applicant-top { padding: 10px 12px; }
  .applicant-top nav li { flex: 1 1 150px; }
}

.applicant-main [data-answer-controls] { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.applicant-main [data-answer-controls] > .button-row { width: 100%; }
.applicant-main [data-primary-answers] { margin-bottom: 8px; }
.applicant-main [data-answer-controls] label { flex-basis: 100%; }
.applicant-main [data-answer-controls] input,
.applicant-main [data-answer-controls] select { min-width: 0; max-width: 100%; min-height: 44px; padding: 8px 12px; box-sizing: border-box; border: 1px solid var(--line-strong); border-radius: 6px; }
.applicant-main [data-answer-controls] button { min-height: 44px; }

/* Keep the synthetic-data notice readable at its compact text sizes. */
.data-posture-banner.synthetic-only { color: var(--ink-700); }
.applicant-main .modal-head p { color: var(--ink-700); font-size: 1rem; }

/* Keep the real application review, receipts and consent readable in normal flow. */
.applicant-main[data-screen="AP-08"] .plain-panel { border-radius: 10px; }
.applicant-main[data-screen="AP-08"] p { overflow-wrap: anywhere; }
.applicant-main[data-screen="AP-08"] .review-module { padding: 16px 0; border-bottom: 1px solid var(--line); }
.applicant-main[data-screen="AP-08"] .review-module h3 { margin-top: 0; }
.applicant-main[data-screen="AP-08"] label { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin: 12px 0; }
.applicant-main[data-screen="AP-08"] textarea { display: block; flex-basis: 100%; width: 100%; min-height: 112px; padding: 12px; box-sizing: border-box; border: 1px solid var(--line-strong); border-radius: 6px; font: inherit; }
.applicant-main[data-screen="AP-08"] input[type="checkbox"] { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; }
.applicant-main[data-screen="AP-08"] button { min-height: 44px; font-size: 0.875rem; }
.applicant-main[data-screen="AP-08"] > button { align-self: flex-start; }
.applicant-main[data-screen="AP-08"] .modal-head p { line-height: 1.5; }

/* Launch polish (ADR-0580): one rhythm, width and fact grammar for every applicant screen.
   `#main` outranks the shell's `main { margin:0; padding:0 }` reset and the shared heading
   scale, which load after this file; nothing here restyles a shared primitive. */
:scope.applicant-content > :is(.data-posture-banner, .applicant-case-bar, main) { width: 100%; max-width: 1180px; margin-inline: auto; box-sizing: border-box; }
/* Whose application is open, above every page; the switch only when there is more than one (R5-17). */
:scope.applicant-content > .applicant-case-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.applicant-case-bar .applicant-case-bar-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; margin: 0; color: var(--ink-700); font-size: .875rem; }
.applicant-case-bar .applicant-case-bar-name { color: var(--ink-900); font-size: 1rem; font-weight: 650; overflow-wrap: anywhere; }
.applicant-case-bar .applicant-case-bar-reference { color: var(--ink-600); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8125rem; white-space: nowrap; }
.applicant-case-bar .applicant-case-bar-stage { color: var(--ink-700); font-size: .875rem; font-weight: 600; }
.applicant-case-bar > .button { flex: none; }
#main.applicant-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
#main.applicant-main > :is(h1, p) { margin: 0; }
#main.applicant-main > h2 { margin: 8px 0 0; }
#main.applicant-main h1 { font-size: 1.5rem; font-weight: 650; line-height: 1.25; letter-spacing: -.01em; }
#main.applicant-main :is(p, li, dd, blockquote) { max-width: 70ch; }
#main.applicant-main > .plain-panel,
#main.applicant-main > .applicant-group > .plain-panel { display: flex; flex-direction: column; gap: 12px; }
#main.applicant-main .plain-panel :is(h2, h3, p, ul, ol, dl, fieldset) { margin: 0; }
#main.applicant-main .plain-panel h2 { font-size: 1rem; }
#main.applicant-main :is(.state-panel, .capability-note) { margin: 0; }
#main.applicant-main .button-row { margin: 0; }
#main.applicant-main .button-row .button { justify-content: center; }
#main.applicant-main .applicant-group { display: flex; flex-direction: column; gap: 12px; }
#main.applicant-main .applicant-group > h2 { margin: 8px 0 0; font-size: 1rem; }
#main.applicant-main .applicant-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* A label and its value: stacked pairs in a grid, never "Label:value" run together (A3). */
#main.applicant-main .applicant-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 10px 24px; margin: 0; }
#main.applicant-main .applicant-fact { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#main.applicant-main .applicant-fact dt { color: var(--ink-600); font-size: .75rem; font-weight: 600; }
#main.applicant-main .applicant-fact dd { margin: 0; color: var(--ink-900); font-size: .875rem; overflow-wrap: break-word; }

/* A service that is not offered yet: one compact line and its next step (UX-85). */
#main.applicant-main .capability-note { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 8px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fa; }
#main.applicant-main .capability-note-glyph { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--teal-100); color: var(--teal-700); }
#main.applicant-main .capability-note-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#main.applicant-main .capability-note-text p { margin: 0; color: var(--ink-700); font-size: .8125rem; line-height: 1.5; }
#main.applicant-main .capability-note-text .capability-note-title { color: var(--ink-900); font-size: .875rem; font-weight: 650; }
#main.applicant-main .capability-note > .button { grid-column: 2; justify-self: start; }

/* Home (AP-03). */
#main.applicant-main .applicant-hero { align-items: stretch; border-radius: 10px; overflow: hidden; }
#main.applicant-main .applicant-message { display: flex; flex-direction: column; gap: 0; padding: 24px; }
#main.applicant-main .applicant-message h1 { margin: 0; max-width: none; }
#main.applicant-main .journey-rail[data-steps="1"] { border-top: 0; margin-top: 16px; }
#main.applicant-main .journey-rail[data-steps="1"] .journey-step { padding: 0 0 0 20px; border-left: 0; }
#main.applicant-main .journey-rail[data-steps="1"] .journey-step:before { left: 0; top: 4px; }
#main.applicant-main .applicant-next { margin-top: 24px; }
#main.applicant-main .applicant-next h2 { margin: 0 0 4px; font-size: 1rem; }
#main.applicant-main .applicant-next p { color: var(--ink-900); font-size: 1rem; }
/* The next step names the request and links to it (R5-11). */
#main.applicant-main .applicant-next { display: flex; flex-direction: column; gap: 6px; }
#main.applicant-main .applicant-next .applicant-next-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--ink-700); font-size: .875rem; }
#main.applicant-main .applicant-help .button-row { flex-direction: column; align-items: stretch; }
#main.applicant-main .applicant-callout { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid #e3ca93; border-left: 4px solid var(--amber-700); border-radius: 8px; background: var(--amber-100); }
#main.applicant-main .applicant-callout h2 { margin: 0; font-size: .875rem; color: #805313; }
#main.applicant-main .applicant-callout .applicant-callout-value { margin: 0; color: var(--ink-950); font-size: 1.125rem; font-weight: 650; }
#main.applicant-main .applicant-grid { margin-top: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
#main.applicant-main .applicant-actions { border-radius: 10px; overflow: hidden; }
#main.applicant-main .applicant-checks { list-style: none; margin: 0; padding: 0; }
#main.applicant-main .applicant-checks li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; max-width: none; padding: 10px 0; border-bottom: 1px solid #e7ecf0; font-size: .875rem; }
#main.applicant-main .applicant-checks li:last-child { border-bottom: 0; }

/* Documents and tasks (AP-05). */
#main.applicant-main .gap-group { margin-top: 0; border-radius: 10px; overflow: hidden; }
#main.applicant-main .applicant-documents .document-list { list-style: none; margin: 0; padding: 0; }
#main.applicant-main .applicant-documents .document-item { max-width: none; padding: 10px 0; font-size: .875rem; }
#main.applicant-main .document-name { min-width: 0; overflow-wrap: anywhere; }

/* The upload dialog (AP-06): labelled pickers above one another, inside real padding. */
.modal.capture-dialog .modal-body { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.modal.capture-dialog .modal-body > * { margin: 0; }
.modal.capture-dialog .modal-body p { font-size: .875rem; line-height: 1.5; }
.modal.capture-dialog .modal-head h2 { font-size: 1rem; }
.modal.capture-dialog .capture-picker { display: flex; flex-direction: column; gap: 6px; }
.modal.capture-dialog .capture-picker label { font-size: .875rem; font-weight: 600; color: var(--ink-900); text-transform: none; letter-spacing: 0; }
.modal.capture-dialog input[type="file"] { max-width: 100%; font-size: .875rem; color: var(--ink-700); }
.modal.capture-dialog input[type="file"]::file-selector-button { min-height: 40px; margin-right: 12px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink-900); font: inherit; font-weight: 600; cursor: pointer; }
.modal.capture-dialog input[type="file"]:focus-visible { outline: 3px solid var(--teal-700); outline-offset: 2px; border-radius: 8px; }
.modal.capture-dialog .capture-hint { color: var(--ink-600); font-size: .8125rem; }
.modal.capture-dialog .capture-review { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.modal.capture-dialog .capture-review[hidden] { display: none; }
.modal.capture-dialog .capture-review h3 { margin: 0; font-size: .875rem; }
.modal.capture-dialog .capability-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fa; }
.modal.capture-dialog .capability-note-glyph { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--teal-100); color: var(--teal-700); }
.modal.capture-dialog .capability-note-text p { margin: 0; font-size: .8125rem; }
.modal.capture-dialog .capability-note-title { font-weight: 650; }
.modal.capture-dialog .applicant-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 8px 16px; margin: 0; }
.modal.capture-dialog .applicant-fact dt { color: var(--ink-600); font-size: .75rem; font-weight: 600; }
.modal.capture-dialog .applicant-fact dd { margin: 0; font-size: .875rem; overflow-wrap: anywhere; }

/* Notices (AP-10) and the notice as a page of its own (UX-81). */
#main.applicant-main .notice-deadline { align-items: stretch; }
#main.applicant-main .notice-deadline > .badge { align-self: flex-start; }
#main.applicant-main .notice-quote blockquote { max-width: none; }
#main.applicant-main .notice-quote { max-width: 70ch; }
#main.applicant-main .applicant-back { margin: 0; }
#main.applicant-main .applicant-page-head { display: flex; flex-direction: column; gap: 8px; }
#main.applicant-main .applicant-page-head p { margin: 0; color: var(--ink-600); font-size: .875rem; }
#main.applicant-main .notice-request-count { color: var(--ink-600); font-size: .875rem; }
#main.applicant-main .notice-request-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
#main.applicant-main .notice-request { max-width: none; display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
#main.applicant-main .notice-request-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; }
#main.applicant-main .notice-request-head h3 { margin: 0; font-size: .875rem; line-height: 1.5; }
#main.applicant-main .notice-request p { margin: 0; font-size: .875rem; }
#main.applicant-main .notice-help { display: flex; flex-direction: column; gap: 12px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-warm); }
#main.applicant-main .notice-help h2 { margin: 0; font-size: 1rem; }
#main.applicant-main .notice-help p { margin: 0; font-size: .875rem; }

/* Questions (AP-04): one figure, a branded bar and the question as the card's heading (A12). */
#main.applicant-main .interview-progress { gap: 8px; }
#main.applicant-main .interview-progress-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
#main.applicant-main .interview-progress-figure { color: var(--ink-900); font-size: .875rem; font-weight: 650; }
#main.applicant-main .interview-progress-count { color: var(--ink-600); font-size: .8125rem; }
#main.applicant-main progress.stage-rail { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; background: var(--teal-100); color: var(--teal-700); accent-color: var(--teal-700); overflow: hidden; }
#main.applicant-main progress.stage-rail::-webkit-progress-bar { background: var(--teal-100); border-radius: 999px; }
#main.applicant-main progress.stage-rail::-webkit-progress-value { background: var(--teal-700); border-radius: 999px; }
#main.applicant-main progress.stage-rail::-moz-progress-bar { background: var(--teal-700); border-radius: 999px; }
#main.applicant-main .question-card { gap: 14px; }
#main.applicant-main .question-section { color: var(--ink-600); font-size: .8125rem; font-weight: 600; }
#main.applicant-main .question-card h2[data-question-prompt] { font-size: 1.125rem; line-height: 1.4; }
#main.applicant-main .question-why { padding: 10px 14px; border-left: 3px solid var(--teal-700); background: #f3f8f7; }
#main.applicant-main .question-why p { margin: 0; font-size: .875rem; }
#main.applicant-main .question-why .question-why-title { font-weight: 650; font-size: .8125rem; color: var(--teal-700); }
#main.applicant-main .question-help { color: var(--ink-700); font-size: .875rem; }

/* Choices: the control and its words on one line with a 44px target (A11). */
#main.applicant-main fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#main.applicant-main fieldset legend { margin-bottom: 8px; padding: 0; font-size: .875rem; font-weight: 650; }
#main.applicant-main .choice-option { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 44px; }
#main.applicant-main .choice-option input:is([type="radio"], [type="checkbox"]) { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: var(--teal-700); }
#main.applicant-main .choice-option label { flex: 1 1 12rem; min-width: 0; font-size: .875rem; line-height: 1.45; cursor: pointer; }
#main.applicant-main .choice-option label { padding: 10px 0; }
/* A consent row: the box and its title share one 44px line; everything else sits under the title. */
#main.applicant-main .consent-control { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 10px; row-gap: 6px; align-items: center; padding: 12px 0; border-top: 1px solid #e7ecf0; }
#main.applicant-main .consent-control > input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--teal-700); }
#main.applicant-main .consent-control > label { min-height: 44px; display: flex; align-items: center; font-size: .875rem; font-weight: 650; cursor: pointer; }
#main.applicant-main .consent-control > :not(input, label) { grid-column: 2; margin: 0; }
#main.applicant-main .consent-control > .badge { justify-self: start; }
#main.applicant-main .consent-control > p { font-size: .875rem; color: var(--ink-700); }

/* Welcome (AP-02). */
#main.applicant-main .agreement-item { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: 1px solid #e7ecf0; }
#main.applicant-main .agreement-item p { margin: 0; font-size: .875rem; }
#main.applicant-main .agreement-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#main.applicant-main .agreement-head h3 { margin: 0 4px 0 0; font-size: .875rem; }
#main.applicant-main .agreement-provenance summary { min-height: 24px; line-height: 24px; font-weight: 600; cursor: pointer; }
#main.applicant-main .agreement-signature { color: var(--ink-700); font-size: .875rem; }

/* Forms: a label above its control; two columns when the workflow is wide enough (first report #10). */
#main.applicant-main .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
#main.applicant-main .field > label { font-size: .875rem; font-weight: 600; color: var(--ink-900); text-transform: none; letter-spacing: 0; }
#main.applicant-main .field :is(input:not([type="checkbox"], [type="radio"], [type="file"]), select, textarea) { width: 100%; max-width: 28rem; box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--control-line); border-radius: 6px; background: #fff; font: inherit; font-size: 1rem; }
#main.applicant-main .field textarea { max-width: none; min-height: 112px; }
#main.applicant-main .profile-fields { max-width:58rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px 24px; }
@container workflow (min-width: 700px) { #main.applicant-main .profile-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Messages. */
#main.applicant-main .message-list { display: flex; flex-direction: column; gap: 12px; }
#main.applicant-main .message-row { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid #e7ecf0; }
#main.applicant-main .message-row p, #main.applicant-main .message-row time { margin: 0; font-size: .875rem; }
#main.applicant-main .message-row time { color: var(--ink-600); font-size: .8125rem; }
#main.applicant-main .message-thread-link { display: flex; flex-direction: column; gap: 4px; }
#main.applicant-main .message-thread-link p { margin: 0; font-size: .8125rem; color: var(--ink-600); }

/* People. */
#main.applicant-main .authority-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
#main.applicant-main .authority-head h3 { margin: 0; font-size: .875rem; }
#main.applicant-main .applicant-link-line { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
#main.applicant-main .applicant-link-line p { margin: 0; font-size: .875rem; }

/* Accounts (UX-42): a table while the workflow is wide, labelled cards below 600px of it. */
#main.applicant-main .applicant-accounts { width: 100%; border-collapse: collapse; font-size: .875rem; }
#main.applicant-main .applicant-accounts :is(th, td) { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
#main.applicant-main .applicant-accounts th { color: var(--ink-600); font-size: .75rem; font-weight: 650; text-transform: none; letter-spacing: 0; }
#main.applicant-main .applicant-accounts td { font-size: .875rem; }
#main.applicant-main .applicant-accounts .account-type { margin: 0 0 6px; font-weight: 650; }
#main.applicant-main .applicant-accounts .applicant-facts { grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: 6px 16px; }
@container workflow (max-width: 600px) {
  /* Each cell carries its own label below this width, so the column header row is not drawn. */
  #main.applicant-main .applicant-accounts thead { display: none; }
  #main.applicant-main .applicant-accounts :is(tbody, tr, td) { display: block; }
  #main.applicant-main .applicant-accounts tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  #main.applicant-main .applicant-accounts td { padding: 4px 0; border: 0; }
  #main.applicant-main .applicant-accounts td::before { content: attr(data-label); display: block; color: var(--ink-600); font-size: .75rem; font-weight: 600; }
  #main.applicant-main .applicant-accounts td[data-label]:first-child { font-weight: 650; }
}

/* Narrow workflow: the home hero and grid stack; help actions fill the width. */
@container workflow (max-width: 760px) {
  #main.applicant-main .applicant-hero, #main.applicant-main .applicant-grid { grid-template-columns: minmax(0, 1fr); }
  #main.applicant-main .applicant-help { border-left: 0; border-top: 1px solid var(--line); }
  #main.applicant-main :is(.notice, .notice-help) { padding: 16px; }
  #main.applicant-main .applicant-message { padding: 20px 16px; }
  #main.applicant-main .applicant-help { padding: 16px; }
}

/* A disabled primary reads as unavailable at full contrast: grey with dark text instead of a
   half-transparent green whose white label falls below 4.5:1 (A16). The shared
   foundation also uses opaque neutral disabled controls; this portal keeps its established palette. */
#main.applicant-main .button.primary:disabled { opacity: 1; background: #e9eef1; border-color: #cbd5db; color: #3d4b55; cursor: not-allowed; }

/* Home names the next request itself; People gives the helper's contact path once. */
:scope.applicant-content .applicant-next-item { margin: 4px 0 0; color: var(--ink-900); font-size: 1rem; line-height: 1.5; }
:scope.applicant-content .applicant-helper-contact { margin: 0 0 12px; max-width: 72ch; color: var(--ink-700); font-size: .875rem; line-height: 1.5; }

#main.applicant-main .contact-information-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:16px; }
#main.applicant-main .contact-information-card { display:flex; flex-direction:column; gap:8px; min-width:0; padding:16px; border:1px solid var(--line); border-radius:6px; }
#main.applicant-main .contact-information-card > :is(h3,p) { margin:0; }
#main.applicant-main .contact-information-card > .button { align-self:flex-start; margin-top:auto; }
#main.applicant-main .contact-information-form { display:grid; gap:16px; }
#main.applicant-main .contact-information-form > p { margin:0; }
#main.applicant-main .contact-information-card:has(form) { grid-column:1 / -1; }

#main.applicant-main .case-stage-tracker .journey-rail { grid-auto-flow:row; grid-template-columns:1fr; border-top:0; margin:16px 0; }
#main.applicant-main .case-stage-tracker .journey-step { min-width:0; padding:8px 0 8px 24px; border-left:1px solid var(--line); }
#main.applicant-main .case-stage-tracker .journey-step:before { left:-5px; top:14px; background:var(--ink-400); box-shadow:0 0 0 1px var(--ink-400); }
#main.applicant-main .case-stage-tracker .journey-step.active:before { background:var(--jade-700); box-shadow:0 0 0 3px var(--jade-100); }
#main.applicant-main .case-progress-status { margin-bottom:0; }
@container workflow (min-width:900px) {
  #main.applicant-main .case-stage-tracker .journey-rail { grid-auto-flow:column; grid-template-columns:none; grid-auto-columns:minmax(0,1fr); border-top:1px solid var(--line); margin:24px 0 16px; }
  #main.applicant-main .case-stage-tracker .journey-step { padding:16px 12px 0 0; border-left:0; }
  #main.applicant-main .case-stage-tracker .journey-step:before { left:0; top:-5px; }
}

#main.applicant-main nav[aria-label="Message threads"] { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0; }
#main.applicant-main nav[aria-label="Message threads"] > .record-pagination { grid-column:1/-1; }
#main.applicant-main .message-thread-link { padding:12px;border:1px solid #d6dedb;border-radius:10px;min-width:0; }
#main.applicant-main .message-thread-link button { width:100%;text-align:left;overflow-wrap:anywhere; }
#main.applicant-main .message-thread-link button[aria-pressed="true"] { border-color:var(--color-brand-primary,#156047);background:#eef7f2; }
#main.applicant-main [data-thread-detail] { min-width:0; }
#main.applicant-main [data-message-body] { white-space:pre-wrap;overflow-wrap:anywhere; }
@media(max-width:600px) { #main.applicant-main nav[aria-label="Message threads"] { grid-template-columns:minmax(0,1fr); } }

#main.applicant-main [data-selected-thread] > h2 { scroll-margin-top:80px; }
#main.applicant-main .record-pagination { scroll-margin-top:80px; }

}
.workflow-shell .sidebar a { text-decoration:none; }
:is(.workflow-shell,.live-shell) [hidden] {display:none!important;}
.live-shell .live-state {display:flex;flex-direction:column;align-items:center;gap:10px;padding:28px 16px;text-align:center;}
.live-shell .live-state :is(h2,h3,p) {margin:0;max-width:52ch;}
.live-shell .live-state p {color:var(--muted);line-height:1.6;}
.live-shell .live-state-actions {display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:6px;}
.workflow-shell .sidebar-head img { height:40px; object-fit:contain; }
.workflow-shell .topbar-actions button { min-width:44px; min-height:44px; }
.workflow-shell .role-content { min-width:0; overflow-wrap:break-word; }
.workflow-shell .role-content main { margin:0; padding:0; min-width:0; }
.workflow-shell .role-content:has(> .attorney-main) {width:100%;max-width:calc(1180px + var(--live-gutter,22px) + var(--live-gutter,22px));margin-inline:auto;}
.workflow-shell .role-content h1 { font-size:1.5rem; font-weight:650; line-height:1.25; letter-spacing:-.02em; }
:is(.workflow-shell,.live-shell) .role-content button:not(.masked-value-toggle) { min-height:44px; font-size:.875rem; }
:is(.workflow-shell,.live-shell) .role-content :is(input:not([type=checkbox],[type=radio],[type=file],[type=range]),select) { min-height:44px; font-size:1rem; }
/* Multiline fields take the same floor at zero specificity, so a surface that
   needs room for a reason (triage, QA, approvals, Ask, stage decisions) keeps it. */
:where(.workflow-shell,.live-shell) textarea { min-height:44px; font-size:1rem; }
:is(.workflow-shell,.live-shell) .role-content .button.primary { background:#087557; border-color:#087557; }
.workflow-shell .role-content .table-scroll { max-width:100%; overflow-x:auto; }
.workflow-shell .role-content .applicant-top,.workflow-shell .role-content .attorney-topbar { display:none; }
.workflow-shell .role-content .data-posture-banner { margin-bottom:20px; }
/* The posture banner is a safety control: on desktop it stays readable under the sticky header instead of sliding half beneath it (ADR-0237). */
@media(min-width:1041px){.workflow-shell .role-content .data-posture-banner{position:sticky;top:var(--header-height);z-index:40;}}
/* The applicant screens drawn before the portal shell exists (opening, choose, none, error) wear the
   sign-in card (main.live-sign-in in styles.css). The portal's own stylesheets are scoped to .role-content
   and never reach these screens, so every rule they need is here, unscoped (B7, R5-02, R5-03). */
.applicant-public { box-sizing:border-box; min-height:100vh; min-height:100svh; display:flex; flex-direction:column; background:#f4f6f5; }
.applicant-public > .data-posture-banner { padding:10px 18px; border-bottom:1px solid var(--line); background:var(--amber-pale); color:var(--ink-2); }
.applicant-public > .data-posture-banner.live { background:var(--brand-pale); }
.applicant-public > .data-posture-banner h2 { margin:0; color:var(--amber); font-size:.875rem; }
.applicant-public > .data-posture-banner.live h2 { color:var(--brand-strong); }
.applicant-public > .data-posture-banner p { margin:3px 0 0; font-size:.8125rem; line-height:1.45; }
.applicant-public > main.live-sign-in { flex:1 0 auto; min-height:0; }
.applicant-context .panel-body > .btn { width:100%; }
.applicant-context .panel-body > .applicant-context-reason { margin:-12px 0 24px; color:var(--ink-2); font-size:.9375rem; }
.applicant-context .case-choices { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.applicant-context .case-choice { box-sizing:border-box; display:flex; flex-direction:column; align-items:flex-start; gap:4px; width:100%; min-height:44px; margin:0; padding:16px 18px; border:1px solid var(--line-strong); border-radius:12px; background:#fff; color:var(--ink); font:inherit; line-height:1.4; text-align:left; cursor:pointer; }
.applicant-context .case-choice:hover { border-color:var(--brand); background:var(--brand-softer); }
.applicant-context .case-choice:focus-visible { outline:3px solid var(--brand); outline-offset:2px; }
.applicant-context .case-choice-name { font-size:1.0625rem; font-weight:650; overflow-wrap:anywhere; }
.applicant-context .case-choice-stage { color:var(--ink-2); font-size:.9375rem; }
.applicant-context .case-choice-reference { color:var(--muted); font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.8125rem; overflow-wrap:anywhere; }
@media(min-width:1041px){.workflow-shell .sidebar-head>button,.workflow-shell .topbar>button{display:none;}}
@media(max-width:1040px){.workflow-shell .workflow-title{font-size:14px;}.workflow-shell .topbar{flex-wrap:wrap;gap:8px}}
/* A phone header stays one row: the title gives way (ellipsis) before the menu and sign-out wrap under it (UX-04). */
@media(max-width:420px){.workflow-shell .topbar{flex-wrap:nowrap;}.workflow-shell .workflow-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.workflow-shell .topbar>button,.workflow-shell .topbar-actions{flex:none;}}

/* The specialist body joins the primary workspace's readable scale. Keep the
   existing 14px / 44px controls; rem permits text-size preference enlargement. */
@media screen {
  .live-shell .role-content {font-size:.875rem;line-height:1.5;min-width:0;overflow-wrap:break-word;}
  .live-shell .role-content :is(button,input,select,textarea) {font-size:.875rem;}
  .live-shell :is(.case-section-actions button,.case-section-mobile select),
  .live-shell .role-content :is(button,input,select,textarea,[tabindex]) {scroll-margin-top:calc(var(--live-header-height,72px) + 16px);scroll-margin-bottom:16px;}
  .live-shell .role-content h2:not(.statement-page *,.notice-page *) {font-size:1rem;line-height:1.4;}
  .live-shell .role-content :is(h3,h4):not(.statement-page *,.notice-page *) {font-size:.875rem;line-height:1.5;}
  .live-shell .role-content caption:not(.statement-page *,.notice-page *) {font-size:.8125rem;line-height:1.5;}
  .live-shell .role-content .ledger-section {min-width:0;max-width:100%;}
  .live-shell .role-content .ledger-header {gap:12px;flex-wrap:wrap;}
  .live-shell .role-content .ledger-header > div {min-width:0;}
  /* The directory sizes to its content; where the section is narrower, it
     scrolls inside a focusable, named region whose edges fade to show there
     is more (UX-42). Secondary facts live in one cell, not four columns. */
  .workforce-table-scroll {max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;
    background:linear-gradient(to right,#fff 30%,rgba(255,255,255,0)) left center/40px 100% no-repeat local,linear-gradient(to left,#fff 30%,rgba(255,255,255,0)) right center/40px 100% no-repeat local,radial-gradient(farthest-side at 0 50%,rgba(24,44,41,.18),rgba(24,44,41,0)) left center/14px 100% no-repeat scroll,radial-gradient(farthest-side at 100% 50%,rgba(24,44,41,.18),rgba(24,44,41,0)) right center/14px 100% no-repeat scroll;}
  .workforce-table-scroll:focus-visible {outline:3px solid var(--teal-700);outline-offset:-3px;}
  .workforce-table-scroll table {width:100%;table-layout:auto;border-collapse:collapse;}
  .workforce-table-scroll :is(th,td) {padding:10px 12px;border-bottom:1px solid var(--line);text-align:left;white-space:normal;overflow-wrap:break-word;vertical-align:top;line-height:1.5;}
  .workforce-table-scroll th {font-size:.75rem;font-weight:600;letter-spacing:normal;text-transform:none;color:var(--ink-600);}
  .workforce-table-scroll td {font-size:.875rem;}
  .workforce-table-scroll td:first-child {font-weight:600;}
  .workforce-table-scroll td .button {white-space:nowrap;}
  .workforce-table-scroll :is(th,td):first-child {padding-left:16px;}
  .workforce-table-scroll :is(th,td):last-child {padding-right:16px;}
  @media(min-width:901px){
    .workforce-table-scroll :is(th,td):last-child{position:sticky;right:0;background:#fff;box-shadow:-1px 0 var(--line);}
    .workforce-table-scroll th:last-child{z-index:1;}
  }
  .workforce-secondary {display:grid;grid-template-columns:max-content minmax(6rem,1fr);gap:2px 8px;margin:0;font-size:.8125rem;}
  .workforce-secondary dt {color:var(--ink-600);}
  .workforce-secondary dd {margin:0;overflow-wrap:anywhere;}
  /* Narrow workflows read the directory as one card per person, each value
     under its own column label, rather than scrolling ten columns sideways. */
  @container workflow (max-width:900px) {
    .workforce-table-scroll {background:none;}
    .workforce-table-scroll :is(table,tbody,tr,td) {display:block;width:auto;}
    .workforce-table-scroll thead {display:none;} /* card mode: every cell carries its own visible label (td::before) */
    .workforce-table-scroll tr {display:grid;grid-template-columns:repeat(auto-fill,minmax(9rem,1fr));gap:8px 16px;padding:14px 16px;border-bottom:1px solid var(--line);}
    .workforce-table-scroll td {padding:0;border:0;}
    .workforce-table-scroll td::before {content:attr(data-label);display:block;font-size:.75rem;font-weight:600;color:var(--ink-600);}
    .workforce-table-scroll td:first-child,.workforce-table-scroll td:nth-last-child(-n+2) {grid-column:1/-1;}
  }
}

/* Launch-polish foundations (ADR-0580). One definition for the primitives both
   component sets render, so a screen no longer changes button, padding or row
   geometry depending on which set drew it. Last in the bundle on purpose. */
@media screen {
  /* Workflows lay out against their own width (container queries), not the viewport's. */
  :is(.workflow-shell,.live-shell) .role-content {container-type:inline-size;container-name:workflow;}
  /* Buttons: the staff .btn and the workflow .button share one geometry. */
  .live-shell .btn,
  :is(.workflow-shell,.live-shell) .role-content .button {min-height:44px;padding:8px 16px;border-radius:8px;font-size:.875rem;font-weight:600;line-height:1.3;box-shadow:none;}
  /* Compact buttons are compact in padding only: every staff and workflow control keeps a 44px target and 14px type (task 375). */
  :is(.workflow-shell,.live-shell) :is(.btn,.role-content .button).small {min-height:44px;padding:6px 12px;font-size:.875rem;}
  :is(.workflow-shell,.live-shell) :is(.btn,.role-content .button).primary {background:#087557;border-color:#087557;color:#fff;}
  :is(.workflow-shell,.live-shell) :is(.btn,.role-content .button).primary:hover {background:#065f47;border-color:#065f47;}
  :is(.workflow-shell,.live-shell) :is(.btn,.role-content .button)[aria-pressed="true"] {background:#e3f5ef;border-color:#087557;color:#065f47;box-shadow:inset 0 0 0 1px #087557;}
  :is(.workflow-shell,.live-shell) :is(.btn,.role-content .button):disabled {opacity:1;background:var(--canvas);border-color:var(--line-strong);color:var(--muted);cursor:not-allowed;}
  :is(.workflow-shell,.live-shell) .role-content .button-row {display:flex;flex-wrap:wrap;align-items:center;gap:8px;}
  :is(.workflow-shell,.live-shell) .role-content .queue-tile {justify-content:space-between;gap:8px;}
  :is(.workflow-shell,.live-shell) .role-content .queue-discovery-count {flex-shrink:0;}
  :is(.workflow-shell,.live-shell) .role-content .queue-discovery-filter {display:flex;align-items:center;gap:8px;min-height:44px;}

  /* Sections: a header with real padding, and a body that never touches the border. */
  :is(.workflow-shell,.live-shell) .role-content .ledger-section {border-radius:10px;box-shadow:none;}
  :is(.workflow-shell,.live-shell) .role-content .ledger-header {min-height:52px;padding:12px 16px;gap:12px;flex-wrap:nowrap;align-items:center;}
  :is(.workflow-shell,.live-shell) .role-content .ledger-header > :first-child {min-width:0;}
  :is(.workflow-shell,.live-shell) .role-content .ledger-header > :not(:first-child) {flex-shrink:0;}
  :is(.workflow-shell,.live-shell) .role-content .ledger-section > :not(.ledger-header,.ledger-row,table,.table-scroll,.facility-table-wrap,.workforce-table-scroll,.queue-list,.lookup-form,.ledger-subsection,.state-panel,[hidden]) {margin:12px 16px;}
  :is(.workflow-shell,.live-shell) .role-content .plain-panel {padding:24px;border-radius:10px;}
  :is(.workflow-shell,.live-shell) .role-content .plain-panel > :first-child {margin-top:0;}
  :is(.workflow-shell,.live-shell) .role-content .plain-panel > :last-child {margin-bottom:0;}
  :is(.workflow-shell,.live-shell) .role-content :is(.left-stack,.right-stack) {display:flex;flex-direction:column;gap:14px;min-width:0;}

  /* The shell supplies the page gutter; a console body adds rhythm, not indent. */
  :is(.workflow-shell,.live-shell) .role-content .console-body {padding:16px 0 0;}
  :is(.workflow-shell,.live-shell) .role-content .console-body .console-body {padding:0;}

  /* Record rows: shared tracks, so a label sits at the same x in every row. */
  :is(.workflow-shell,.live-shell) .role-content .ledger-row {display:grid;grid-template-columns:repeat(auto-fill,minmax(11rem,1fr));gap:12px 20px;align-items:start;padding:14px 16px;}
  :is(.workflow-shell,.live-shell) .role-content .ledger-row > :is(button,.button,.btn,.button-row) {justify-self:start;align-self:center;}
  /* A row inside a row, or any block of its own (list, table, form, article), spans the whole row. */
  :is(.workflow-shell,.live-shell) .role-content .ledger-row > :is(.ledger-row,article,section,ul,ol,dl,table,.table-scroll,form,fieldset,details,p,h3,h4) {grid-column:1/-1;}
  :is(.workflow-shell,.live-shell) .role-content .ledger-row > .pairing-grid {grid-column:1/-1;min-width:0;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));}
  :is(.workflow-shell,.live-shell) .role-content [data-extraction-candidate] .pairing-half[data-half="verified"] {background:var(--canvas);}
  :is(.workflow-shell,.live-shell) .role-content .ledger-row .ledger-row {padding:0;border-top:0;}

  /* A grid or flex child may shrink to its container, so break-word can break a long token instead of widening the page. */
  .live-shell :is(.panel-body,.panel,.panel-header,.page-head,.page-title,.button-row,.source-review-actions) > * {min-width:0;}
  .live-shell .panel-body > p {max-width:min(72ch,100%);}
  .live-shell :is(.panel-body > details,.panel-body > div) {max-width:100%;}
  :is(.workflow-shell,.live-shell) :is(.field label,.filter-field label,.form-label,.live-filter label) {font-size:.875rem;font-weight:600;letter-spacing:normal;text-transform:none;}
  :is(.workflow-shell,.live-shell) .filter-bar .filter-spacer {font-size:.875rem;}
  /* Identifiers may break anywhere; words may not. */
  :is(.workflow-shell,.live-shell) .role-content :is(.mono,code,kbd,samp) {overflow-wrap:anywhere;}
}
@media screen and (max-width:700px) {
  :is(.workflow-shell,.live-shell) .role-content .plain-panel {padding:16px;}
  :is(.workflow-shell,.live-shell) .role-content .ledger-row {grid-template-columns:repeat(auto-fill,minmax(9rem,1fr));}
}
@media screen {
  /* The reveal target owns its space, including when a long name wraps. */
  :is(.workflow-shell,.live-shell) .role-content .masked-value {min-width:0;max-width:100%;}
  :is(.workflow-shell,.live-shell) .role-content .masked-value-text {min-width:0;overflow-wrap:break-word;}
  :is(.workflow-shell,.live-shell) .role-content .masked-value-toggle {flex:0 0 44px;min-width:44px;min-height:44px;margin:0;}
  /* Touch widths keep 44px targets for compact buttons too. */
}
.record-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-block:12px 20px;}
.record-pagination [role="status"]{font-size:14px;color:var(--muted);}
@media(max-width:600px){
  .record-pagination{display:grid;grid-template-columns:1fr 1fr;}
  .record-pagination [role="status"]{grid-column:1/-1;grid-row:1;text-align:center;}
  .record-pagination > button:first-child{grid-column:1;grid-row:2;justify-self:start;}
  .record-pagination > button:last-child{grid-column:2;grid-row:2;justify-self:end;}
}

@media(max-width:1040px){
  .live-shell .sidebar-head {flex-wrap:nowrap;gap:12px;}
  .live-shell .sidebar-head .live-brand {width:150px;min-width:0;}
  .live-shell .sidebar-head > .topbar-icon-button {width:44px;min-width:44px;min-height:44px;padding:10px;}
  .live-shell .sidebar-head .topbar-icon {display:block;}
  .live-shell .sidebar-head .topbar-label {position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
}

:is(.workflow-shell,.live-shell) .role-content :is(.fact-label,.field label) {font-size:.8125rem;font-weight:600;letter-spacing:normal;text-transform:none;color:var(--ink-600);}

.case-activity .section-heading {display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.case-activity-list {padding:0;list-style:none;margin:20px 0}
.case-activity-list > li {padding:16px 0;border-bottom:1px solid var(--border-color,#e0e5e8);overflow-wrap:anywhere}
.case-activity-list h3 {margin:0 0 8px;font-size:1rem}
.case-activity-list p {margin:6px 0}
.case-activity {overflow-wrap:anywhere}

.inbox-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:16px;align-items:end;margin-block:24px}.inbox-filters .field{display:grid;gap:8px;min-width:0}.inbox-filters select{width:100%;min-height:44px}.inbox-filter-actions{display:flex;gap:8px;flex-wrap:wrap}.inbox-mail-callout{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px;background:var(--surface-soft,#f5f8f7);border:1px solid var(--line,#dbe6e2);border-radius:12px}.document-inbox .live-work-row{gap:24px;align-items:center}.document-inbox .live-work-row>div{min-width:0;overflow-wrap:anywhere}.document-inbox .live-work-row>button{flex-shrink:0}@media(max-width:900px){.inbox-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.inbox-filter-actions{align-self:end}}@media(max-width:560px){.inbox-filters{grid-template-columns:1fr}.inbox-filter-actions .btn{flex:1}.inbox-mail-callout{align-items:stretch;flex-direction:column}.document-inbox .live-work-row{align-items:stretch;flex-direction:column;gap:12px}}
/* Counsel notes also appear in the staff case workspace, outside the portal scope. */
.administrative-notes { min-width:0; overflow-wrap:anywhere; }
.administrative-notes .section-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:16px; }
.administrative-notes .section-heading h2 { margin:0; }
.administrative-notes > p { margin:10px 0; line-height:1.5; }
.administrative-note-list { list-style:none; padding:0; margin:20px 0; display:grid; gap:12px; }
.administrative-note-list > li { padding:16px; border:1px solid var(--border-color,#d6dedb); border-radius:12px; min-width:0; background:var(--surface,#fff); }
.administrative-note-list h3 { margin:0 0 8px; font-size:1rem; }
.administrative-note-list p { margin:8px 0; line-height:1.5; }
.administrative-note-list time { display:block; color:var(--muted,#52635b); font-size:.875rem; }
.administrative-note-body { white-space:pre-wrap; overflow-wrap:anywhere; }
.administrative-notes details { margin-top:12px; }
.administrative-notes details summary { min-height:44px; display:list-item; align-content:center; cursor:pointer; }
.administrative-notes details p { overflow-wrap:anywhere; }

/* Form values are body text; decorative panel borders remain quieter than controls.
   Keep this after the workflow bridge so scoped portal defaults cannot dim focus. */
@media screen {
  :is(.live-shell,.workflow-shell) :is(input:not([type="checkbox"],[type="radio"],[type="file"],[type="range"],[type="hidden"],[type="button"],[type="submit"]),select) {
    min-height:44px;
    font-family:inherit;
    font-size:1rem;
    line-height:1.4;
    border-color:var(--control-line);
  }
  :where(.live-shell,.workflow-shell) textarea {
    min-height:44px;
    font-family:inherit;
    font-size:1rem;
    line-height:1.4;
    border-color:var(--control-line);
  }
  .facility-table-wrap > .record-pagination { margin:12px 16px 20px; }
}

/* The Caidwise UI package (ADR-1073), slice 1: the foundation.
 *
 * scripts/build.mjs appends this file last, so a rule here wins over the same
 * selector in styles.css, redesign.css and workflow-shell.css. Colours come from
 * the token layer: the application's :root in styles.css, bound to
 * packages/design-system/styles/tokens.css by tokens.test.ts.
 *
 * Five rules hold the language together (ADR-1073): clean by default; rich where
 * it decides; every status names its source; violet is only AI; unknown stays quiet.
 */

/* Rail: grouped destinations with a glyph each, and who is signed in. */
.live-shell .nav-section + .nav-section { margin-top:14px; }
.live-shell .nav-section-label { display:block; padding:0 12px 6px; font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
.live-shell .nav-item { display:flex; align-items:center; gap:10px; }
.live-shell .nav-item .nav-icon { flex:none; width:18px; height:18px; }
.live-shell .live-account { display:flex; flex-direction:column; gap:2px; margin-bottom:6px; }
.live-shell .live-account-name { color:var(--ink); font-size:13px; font-weight:600; overflow-wrap:break-word; }
.live-shell .live-account-role { color:var(--muted); font-size:12px; }

/* Top bar: Refresh and Sign out keep their names for assistive technology and show as icons. */
.live-shell .topbar .topbar-actions { gap:8px; }
/* styles.css shows these glyphs only below 720px; the package shows them at every width. */
.live-shell .topbar .topbar-icon { display:block; }
.live-shell .topbar .topbar-icon-button { width:44px; min-width:44px; padding:0; justify-content:center; }
.live-shell .topbar .topbar-icon-button .topbar-label { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
/* Ask Caidwise is a secondary control; its violet glyph marks it as AI (rule 4). */
.live-shell .topbar .topbar-ask { background:var(--surface); border:1px solid var(--line-strong); color:var(--ink); }
.live-shell .topbar .topbar-ask:hover { background:var(--surface-2); }
.live-shell .topbar .topbar-ask .topbar-icon { color:var(--ai); }

/* Case header: a breadcrumb back to the list the case came from, the record id and its stage. */
.live-shell .live-crumbs { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0 0 10px; font-size:13px; color:var(--muted); }
.live-shell .live-crumb { min-height:24px; padding:2px 0; border:0; background:none; font:inherit; font-weight:600; color:var(--brand); cursor:pointer; }
.live-shell .live-crumb:hover { color:var(--brand-ink); text-decoration:underline; }
.live-shell .live-crumb-separator { color:var(--muted); }
.live-shell .live-crumb:focus-visible { outline:2px solid var(--brand); outline-offset:2px; border-radius:4px; }
.live-shell .live-record-id { font-variant-numeric:tabular-nums; letter-spacing:.01em; }
.live-shell .live-case-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px; color:var(--muted); }
.live-shell .live-case-meta .live-stage { font-size:12px; }
/* ADR-1097: the verified deadline's due chip beside the stage. */
.live-shell .live-case-meta .live-due { font-size:.75rem; white-space:nowrap; }
.live-shell .live-case-meta .live-record-id { padding:1px 7px; border:1px solid var(--line); border-radius:6px; color:var(--ink-2); font-size:12.5px; }

/* Views inside a section: one segmented control in place of the outlined pills. */
.live-shell .live-pills { gap:2px; width:fit-content; max-width:100%; padding:3px; border-radius:10px; background:var(--surface-3); }
.live-shell .live-pills > :is(.live-pill,button) { min-height:32px; padding:0 12px; border:0; border-radius:8px; background:transparent; color:var(--ink-2); font-weight:600; }
.live-shell .live-pills > :is(.live-pill,button):hover { border:0; background:var(--surface); color:var(--ink); }
.live-shell .live-pills > :is(.live-pill,button):is([aria-current="page"],[aria-pressed="true"]) { border:0; background:var(--surface); color:var(--ink); box-shadow:0 1px 2px rgba(13,46,42,.12); }

/* Evidence: a month nobody has checked is a dashed outline, not a warning (rule 5). */
.matrix-cell[data-cell-state="NOT_EVALUATED"] { border:1.5px dashed var(--line-strong); background:transparent; color:var(--muted); }

/* Slice 2 (ADR-1074). The case brief band is the one dark surface on a case page. Child rules are
 * written under `.live-brief` so the stylesheet contrast check reads them against the band. */
.live-shell .live-brief { display:flex; flex-wrap:wrap; gap:16px 0; margin:0 0 18px; padding:20px 24px; border-radius:14px; background:var(--brief); color:#ffffff; box-shadow:0 10px 30px rgba(8,35,32,.14); }
.live-shell .live-brief .live-brief-lead { flex:1 1 300px; display:flex; flex-direction:column; gap:6px; padding-right:24px; }
.live-shell .live-brief .live-brief-eyebrow { font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--mint); }
.live-shell .live-brief .live-brief-title { margin:0; font-size:21px; line-height:1.25; font-weight:700; color:#ffffff; }
.live-shell .live-brief .live-brief-lede { margin:0; font-size:13.5px; color:var(--brief-ink-2); }
.live-shell .live-brief .live-brief-fact { flex:1 1 170px; display:flex; flex-direction:column; gap:4px; padding:2px 20px; border-left:1px solid rgba(255,255,255,.16); }
.live-shell .live-brief .live-brief-label { font-size:12px; color:var(--brief-ink-2); }
.live-shell .live-brief .live-brief-value { font-size:15px; font-weight:600; color:#ffffff; }
.live-shell .live-brief .live-brief-detail { font-size:12.5px; color:var(--brief-ink-2); }
.live-shell .live-brief .live-brief-detail.live-brief-accent { color:var(--mint); font-weight:600; }
.live-shell .live-brief .live-brief-detail.live-brief-alert { color:#ffc9c4; font-weight:600; }
.live-shell .live-brief .live-brief-meter { width:100%; height:6px; appearance:none; border:0; border-radius:99px; background:rgba(255,255,255,.18); overflow:hidden; }
.live-shell .live-brief .live-brief-meter::-webkit-progress-bar { background:rgba(255,255,255,.18); border-radius:99px; }
.live-shell .live-brief .live-brief-meter::-webkit-progress-value { background:var(--mint); border-radius:99px; }
.live-shell .live-brief .live-brief-meter::-moz-progress-bar { background:var(--mint); border-radius:99px; }
@media (max-width: 720px) {
  .live-shell .live-brief { padding:16px; }
  .live-shell .live-brief .live-brief-lead { padding-right:0; }
  .live-shell .live-brief .live-brief-fact { padding:2px 0 0 14px; }
}

/* Case overview columns: the case context leads; the deadline and record details sit beside it. */
.live-shell .live-case-columns { display:flex; flex-wrap:wrap; gap:18px; align-items:flex-start; }
.live-shell .live-case-columns > .live-case-main { flex:999 1 520px; min-width:0; margin:0; }
.live-shell .live-case-columns > .live-case-rail { flex:1 1 300px; min-width:0; display:flex; flex-direction:column; gap:18px; }
.live-shell .live-case-columns > .live-case-rail > .panel { margin:0; }

/* Slice 2b (ADR-1075): evidence coverage on the case overview, one labelled state per account and month. */
.live-shell .live-case-columns > .live-case-main { display:flex; flex-direction:column; gap:18px; }
.live-shell .live-case-main > .panel { margin:0; }
.live-shell .live-coverage-head { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:8px 16px; }
.live-shell .live-coverage-caption { margin:2px 0 0; font-size:13px; color:var(--muted); }
.live-shell .live-coverage-table { width:100%; border-collapse:collapse; font-size:13px; }
.live-shell .live-coverage-table th, .live-shell .live-coverage-table td { padding:10px 12px; text-align:left; border-top:1px solid var(--line); white-space:nowrap; }
.live-shell .live-coverage-table thead th { font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); background:var(--surface-2); }
.live-shell .live-coverage-table tbody th { min-width:180px; white-space:normal; background:transparent; font-size:13px; font-weight:600; letter-spacing:0; text-transform:none; color:var(--ink); }
.live-shell .live-ev-cell { display:inline-flex; align-items:center; gap:8px; }
.live-shell .live-ev { display:inline-flex; align-items:center; justify-content:center; flex:none; width:22px; height:22px; border-radius:50%; font-size:12px; font-weight:700; line-height:1; }
.live-shell .live-ev.live-ev-present { background:#137050; color:#ffffff; }
.live-shell .live-ev.live-ev-missing { background:#b02d35; color:#ffffff; }
.live-shell .live-ev.live-ev-anomalous { background:#f2b33d; color:#3d2600; }
.live-shell .live-ev.live-ev-excepted { border:1.5px solid #334a92; background:#ffffff; color:#334a92; }
.live-shell .live-ev.live-ev-superseded { background:#eef2f1; color:#41544f; }
.live-shell .live-ev.live-ev-not-expected { background:#f4f7f6; color:#526862; }
.live-shell .live-ev.live-ev-not-evaluated { border:1.5px dashed #a9bbb6; background:transparent; }
.live-shell .live-ev-text { color:var(--ink-2); }
.live-shell .live-coverage-summary { display:flex; flex-wrap:wrap; gap:8px; padding:12px 16px; border-top:1px solid var(--line); }


/* ADR-1091: "Go to" (⌘K / Ctrl+K), a modal list of the account's own destinations and exact-reference jumps. */
.live-palette { position:fixed; inset:0; z-index:70; display:flex; align-items:flex-start; justify-content:center; padding:12vh 16px 16px; }
.live-palette[hidden] { display:none; }
.live-palette-backdrop { position:absolute; inset:0; background:rgba(3,25,27,.42); }
.live-palette-panel { position:relative; width:min(560px,100%); max-height:70vh; display:flex; flex-direction:column; gap:8px; padding:12px; border:1px solid var(--line); border-radius:14px; background:var(--surface); box-shadow:0 18px 50px rgba(8,35,32,.22); }
.live-palette-input { width:100%; height:48px; padding:0 14px; border:1px solid var(--line-strong); border-radius:10px; background:var(--surface); color:var(--ink); font:inherit; font-size:16px; }
.live-palette-input:focus-visible { outline:2px solid var(--brand); outline-offset:1px; }
.live-palette-list { list-style:none; margin:0; padding:0; overflow-y:auto; display:flex; flex-direction:column; gap:2px; }
.live-palette-option { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; padding:8px 12px; border-radius:8px; color:var(--ink); cursor:pointer; }
.live-palette-option[aria-selected="true"] { background:var(--brand-pale); color:var(--brand-ink); }
.live-palette-label { font-weight:600; }
.live-palette-detail { color:var(--muted); font-size:13px; }
.live-palette-option[aria-selected="true"] .live-palette-detail { color:var(--brand-ink); }
.live-palette-status:empty { display:none; }
.live-palette-status { margin:0; color:var(--ink-2); font-size:14px; }
.live-palette-hint { margin:0; color:var(--muted); font-size:12px; }
@media print { .live-palette { display:none; } }

/* ADR-1091: the Verified deadlines count tiles. Each is a toggle that filters the one paged list below it. */
.deadline-filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:10px; margin:0 0 16px; }
.deadline-filter { display:flex; flex-direction:column; align-items:flex-start; gap:2px; min-height:72px; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
.deadline-filter:hover { background:var(--surface-2); }
.deadline-filter[aria-pressed="true"] { border-color:var(--brand); background:var(--brand-softer); box-shadow:inset 0 0 0 1px var(--brand); }
.deadline-filter:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
.deadline-filter-count { font-size:26px; font-weight:700; line-height:1.1; font-variant-numeric:tabular-nums; }
.deadline-filter-label { display:flex; align-items:center; gap:8px; color:var(--ink-2); font-size:13px; }
.deadline-filter[aria-pressed="true"] .deadline-filter-label { color:var(--brand-ink); }
/* ADR-1097 (train 4): a dot in the tone of the tile's due chips, and a line naming the first date the tile holds. */
.deadline-filter-dot { flex-shrink:0; width:8px; height:8px; border-radius:50%; background:var(--muted); }
.deadline-filter-dot.block { background:var(--coral-700); }
.deadline-filter-dot.warn { background:var(--amber-700); }
.deadline-filter-dot.neutral { background:var(--muted); }
.deadline-filter-dot.brand { background:var(--brand); }
.deadline-filter-hint { color:var(--ink-2); font-size:.75rem; }
.deadline-title-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; }
.deadline-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:12px 16px; border-bottom:1px solid var(--line); }
.deadline-toolbar input[type="search"] { flex:1 1 14rem; width:100%; min-width:0; max-width:320px; }
.deadline-toolbar select { min-width:0; max-width:100%; }
.deadline-worklist-body { display:block; }
.deadline-worklist-head { display:grid; grid-template-columns:minmax(10rem,14rem) minmax(0,1fr) 7.5rem 11rem; gap:8px 16px; padding:8px 16px; border-bottom:1px solid var(--line); background:var(--surface-2); color:var(--ink-2); font-size:.75rem; font-weight:600; letter-spacing:.04em; text-transform:uppercase; }
@media (max-width:900px) { .deadline-worklist-head { display:none; } }
/* On a phone the date and its due chip each take a line, so a long date is never clipped under the chip. */
@media (max-width:480px) { .deadline-worklist .deadline-worklist-row { grid-template-columns:minmax(0,1fr); } }

/* ADR-1097 (train 4): statement coverage counts every state in its window, and can narrow to months with a gap. */
.matrix-summary { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; flex:1 1 12rem; min-width:0; }
.matrix-gap-toggle { display:inline-flex; align-items:center; gap:8px; min-height:44px; color:var(--ink); font-size:1rem; cursor:pointer; }

/* ADR-1099 (owner, 2026-10-08): a button or disclosure keeps clear of the text it follows. Stacked action rows
   sit 16px below their text, a disclosure under a sentence 10px, and a case reference 6px above its name. */
.live-shell .live-home-grid .live-brief-row { gap:16px; }
.live-shell .document-upload { gap:16px; }
.live-shell .live-case-rail details { margin-top:10px; }
.deadline-worklist .deadline-worklist-case { gap:6px; }

/* ADR-1120 (owner, 2026-10-08): Home holds every queue on one screen, as one list (default) or as lanes. */
.home-attention-root { display:flex; flex-direction:column; gap:16px; }
.home-attention { margin:0; }
.home-layout-switch { display:inline-flex; align-self:flex-end; gap:2px; padding:3px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.home-layout-option { min-height:36px; padding:0 14px; border:0; border-radius:8px; background:transparent; color:var(--ink-2); font:inherit; font-size:.875rem; font-weight:600; cursor:pointer; }
.home-layout-option[aria-pressed="true"] { background:var(--surface); color:var(--ink); box-shadow:0 1px 2px rgba(13,46,42,.08); }
.home-layout-option:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
.home-filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; }
.home-filter { display:flex; flex-direction:column; align-items:flex-start; gap:4px; min-height:88px; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
.home-filter:hover { background:var(--surface-2); }
.home-filter[aria-pressed="true"] { border-color:var(--brand); background:var(--brand-softer); box-shadow:inset 0 0 0 1px var(--brand); }
.home-filter:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
.home-filter-label { display:flex; align-items:center; gap:8px; color:var(--ink-2); font-size:.8125rem; }
.home-filter-count { font-size:1.625rem; font-weight:700; line-height:1.1; font-variant-numeric:tabular-nums; }
.home-filter-hint { color:var(--ink-2); font-size:.75rem; }
.home-filter-dot { flex-shrink:0; width:8px; height:8px; border-radius:50%; background:var(--muted); }
.home-filter-dot.home-dot-brand { background:var(--brand); }
.home-filter-dot.home-dot-ai { background:var(--ai); }
.home-filter-dot.home-dot-late { background:#b02d35; }
.home-filter-dot.home-dot-evidence { background:#334a92; }
.home-filter-dot.home-dot-task { background:var(--brand-ink); }
.home-attention-head { gap:12px; }
.home-attention-head .muted { margin:4px 0 0; }
.home-attention-body { display:flex; flex-direction:column; gap:12px; }
.home-attention-columns, .home-attention-row { display:grid; grid-template-columns:6.5rem 9.5rem minmax(7rem,1fr) minmax(10rem,1.4fr) 11rem minmax(8.5rem,auto); align-items:center; gap:8px 16px; }
.home-attention-columns { padding:8px 0; border-bottom:1px solid var(--line); color:var(--ink-2); font-size:.75rem; font-weight:600; letter-spacing:.04em; text-transform:uppercase; }
.home-attention-list { margin:0; padding:0; list-style:none; }
.home-attention-row { min-height:52px; padding:8px 0; border-bottom:1px solid var(--line); }
.home-attention-row:last-child { border-bottom:0; }
.home-attention-row > .badge { align-self:center; justify-self:start; white-space:nowrap; }
.home-attention-reference { font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.home-attention-person { font-weight:600; overflow-wrap:anywhere; }
.home-attention-what { overflow-wrap:anywhere; }
.home-attention-more { color:var(--ink-2); font-size:.8125rem; }
.home-attention-action { justify-self:end; }
.home-attention-note { margin:0; }
@media (max-width:1100px) {
  .home-attention-columns { display:none; }
  .home-attention-row { grid-template-columns:minmax(0,1fr) auto; align-items:start; padding:12px 0; }
  .home-attention-row > :is(.home-attention-reference,.home-attention-person,.home-attention-what) { grid-column:1; }
  .home-attention-row > .home-attention-kind { grid-column:1; }
  .home-attention-row > .home-attention-when { grid-column:1; }
  .home-attention-row > .home-attention-action { grid-column:2; grid-row:1 / span 3; align-self:center; }
}
.home-lanes { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; align-items:stretch; }
.home-lanes[hidden] { display:none; }
.home-lane { display:flex; flex-direction:column; min-width:0; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.home-lane-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding:14px 16px 12px; border-bottom:1px solid var(--line); }
.home-lane-head h2 { margin:0; font-size:.9375rem; }
.home-lane-hint { margin:4px 0 0; color:var(--ink-2); font-size:.8125rem; }
.home-lane-count { font-size:1.625rem; font-weight:700; line-height:1; font-variant-numeric:tabular-nums; }
.home-lane-list { margin:0; padding:0; list-style:none; }
.home-lane-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; min-height:56px; padding:10px 16px; border-bottom:1px solid var(--line); }
.home-lane-main { min-width:0; }
.home-lane-what { display:block; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.home-lane-meta { display:flex; align-items:center; gap:8px; min-width:0; margin-top:6px; }
.home-lane-meta > .badge { flex:none; align-self:center; }
.home-lane-reference { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink-2); font-size:.8125rem; font-variant-numeric:tabular-nums; }
.home-lane-empty { margin:0; padding:20px 16px; color:var(--ink-2); }
.home-lane-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:auto; padding:12px 16px; border-top:1px solid var(--line); color:var(--ink-2); font-size:.8125rem; }
@media (max-width:1200px) { .home-lanes { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px) { .home-lanes { grid-template-columns:minmax(0,1fr); } .home-layout-switch { align-self:stretch; } .home-layout-option { flex:1; } }
.home-attention-what > a { color:var(--brand-ink); font-weight:600; }
.home-record-details { margin-top:4px; font-size:.8125rem; }
/* ADR-1120: Intelligence on (green) or off/down (red) beside Connected; the page carries no banner for it. */
.live-shell .topbar .topbar-intelligence-slot { display:inline-flex; align-items:center; }
.live-shell .topbar .topbar-intelligence { white-space:nowrap; }

/* ADR-1121 (owner, 2026-10-08): the production sign-in is a split screen: the brief panel beside the form. */
main.live-sign-in.sign-in-split { display:grid; grid-template-columns:minmax(380px,5fr) 7fr; place-items:stretch; padding:0; background:#f6f9f8; }
.sign-in-brand { display:flex; flex-direction:column; gap:96px; padding:44px 48px; background:var(--brief); }
.sign-in-brand > img { display:block; width:180px; height:auto; }
.sign-in-headline { margin:0; max-width:26rem; color:#fff; font-size:2.125rem; font-weight:700; line-height:1.15; letter-spacing:-.02em; }
.sign-in-pane { display:grid; place-items:center; padding:48px 24px; }
.sign-in-split .sign-in-pane > .panel { width:min(100%,460px); border:0; border-radius:0; background:transparent; box-shadow:none; }
.sign-in-split .sign-in-pane > .panel > .panel-body { padding:0; }
.sign-in-split .sign-in-pane .panel-body > p { margin:8px 0 24px; font-size:1rem; color:var(--ink-2); }
.sign-in-split .sign-in-pane .panel-body > .btn { display:flex; width:100%; min-height:52px; margin:0; padding:12px 20px; border-radius:10px; font-size:1rem; font-weight:600; }
.sign-in-split .sign-in-pane .panel-body > .btn + p { margin-top:20px; }
.sign-in-split .sign-in-pane .panel-body > .app-release-version { margin:32px 0 0; font-size:.8125rem; }
.sign-in-split .live-sign-in-brand { display:none; }
@media (max-width:900px) {
  main.live-sign-in.sign-in-split { grid-template-columns:minmax(0,1fr); }
  .sign-in-brand { display:none; }
  .sign-in-split .live-sign-in-brand { display:block; width:180px; height:auto; margin:0 0 28px; }
}
