/* Knowledge card badges (skills side panel) */
.allocation-agent-action {
  font-size: 0.6875rem;
}

.knowledge-card__badge {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--agent-bg);
  color: #475569;
  font-size: 0.63rem;
  font-weight: 800;
}

.workspace-surface {
  position: relative;
  height: 100%;
  overflow-y: auto;
  /* cqw tracks the center pane (see .app-shell__main container), not the
     viewport — so a wide side panel doesn't leave oversized gutters. */
  padding: 28px clamp(0.75rem, 4.5cqw, 8rem) 56px;
}

/* Fade-on-scroll thumb (fade-scrollbar controller) — same pattern as the
   active-session transcript. Only when the controller is wired. */
.workspace-surface[data-controller~="fade-scrollbar"] {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.workspace-surface[data-controller~="fade-scrollbar"].is-scrollbar-visible {
  scrollbar-color: color-mix(in srgb, var(--muted-foreground) 55%, transparent) transparent;
}

.workspace-surface[data-controller~="fade-scrollbar"]::-webkit-scrollbar {
  width: 8px;
}

.workspace-surface[data-controller~="fade-scrollbar"]::-webkit-scrollbar-track {
  background: transparent;
}

.workspace-surface[data-controller~="fade-scrollbar"]::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 9999px;
}

.workspace-surface[data-controller~="fade-scrollbar"].is-scrollbar-visible::-webkit-scrollbar-thumb {
  background-color: color-mix(in srgb, var(--muted-foreground) 55%, transparent);
}

/* Optimistic pending state (optimistic-session controller, hero composer):
   while the new-session submit is in flight the surface adopts the session
   page's exact anatomy — topbar strip, full-bleed transcript filling the
   pane, compact composer docked at the bottom — so the redirect render is
   visually a near-noop. The hero form stays live (never detached); these
   rules just re-dress it as the session composer. Hand-written CSS is
   unlayered, so it beats the hero card's @layer Tailwind utilities. */
.workspace-surface--optimistic {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.workspace-surface--optimistic [data-optimistic-session-target="mount"]:not([hidden]) {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* The skeleton reuses .workspace-session-layout__transcript; its grid-row
   placement means nothing inside this flex column, so grant it the growth
   the session grid's 1fr row would. */
.workspace-surface--optimistic .workspace-session-layout__transcript {
  flex: 1;
}

/* The docked composer bar, matching .workspace-session-layout__composer. */
.workspace-surface--optimistic .workspace-prompt-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  border-top: 1px solid var(--agent-line);
  background: #fff;
}

/* De-card the hero form into the session page's compact composer. */
.workspace-surface--optimistic .workspace-prompt {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 8px 8px 7px;
}

.workspace-surface--optimistic .workspace-prompt textarea {
  min-height: 22px;
  max-height: 120px;
  padding: 0 2px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.workspace-surface--optimistic .workspace-prompt [data-session-input-target="submit"] {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.workspace-surface--optimistic .workspace-prompt [data-session-input-target="submit"] svg {
  width: 16px;
  height: 16px;
}

.workspace-header {
  text-align: center;
  margin: 0 0 1rem;
}

.workspace-header h1 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--agent-text);
  font-size: 1.5rem;
  line-height: 1.17;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.workspace-header p {
  margin: 0.2rem 0 0;
  color: var(--agent-muted);
  font-size: 0.72rem;
}

/* ==========================================================================
   New household modal — opened from the topbar New menu (Client / Prospect).
   ========================================================================== */
.nh-new-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2rem;
  padding: 0 0.8rem;
  border: 1px solid var(--agent-blue);
  border-radius: 8px;
  background: var(--agent-blue);
  color: #fff;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 0.12s ease;
}

.nh-new-btn:hover {
  filter: brightness(0.93);
}

.nh-new-btn .hi {
  flex: none;
  width: 16px;
  height: 16px;
}

.nh-new-btn--block {
  width: 100%;
}

/* --- Overlay + frame --- */
.nh-modal__overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
  animation: nhOverlayIn 0.14s ease both;
}

.nh-modal__overlay[hidden] {
  display: none;
}

.nh-modal__frame {
  display: contents;
}

@keyframes nhOverlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* --- Card --- */
.nh-modal {
  width: 100%;
  max-width: 30rem;
  overflow: hidden;
  background: var(--agent-surface);
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(15, 23, 42, 0.04),
    0 24px 64px rgba(15, 23, 42, 0.28);
  animation: nhModalIn 0.16s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes nhModalIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.nh-modal--loading {
  padding: 3rem;
  text-align: center;
  color: var(--agent-faint);
  font-size: 0.875rem;
}

.nh-modal__header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 0.25rem;
}

.nh-modal__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: #eef2ff;
  color: var(--agent-blue);
}

.nh-modal__icon .hi {
  width: 18px;
  height: 18px;
}

.nh-modal__heading {
  flex: 1;
  min-width: 0;
}

.nh-modal__title {
  margin: 0;
  color: var(--agent-text);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.nh-modal__subtitle {
  margin: 0.15rem 0 0;
  color: var(--agent-muted);
  font-size: 0.8125rem;
}

.nh-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--agent-faint);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.nh-modal__close:hover {
  background: var(--agent-soft);
  color: var(--agent-text);
}

.nh-modal__body {
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem 1.35rem;
}

.nh-field {
  display: grid;
  gap: 0.35rem;
}

.nh-field > label {
  color: var(--agent-text);
  font-size: 0.75rem;
  font-weight: 600;
}

.nh-field input,
.nh-field select {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.7rem;
  border: 1px solid var(--agent-line);
  border-radius: 10px;
  background: #fff;
  color: var(--agent-text);
  font: inherit;
  font-size: 0.875rem;
}

.nh-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 2rem;
}

.nh-field input:focus,
.nh-field select:focus {
  outline: none;
  border-color: var(--agent-blue);
  box-shadow: 0 0 0 3px rgba(54, 89, 201, 0.12);
}

.nh-field input:disabled {
  background: var(--agent-soft);
  color: var(--agent-muted);
  cursor: not-allowed;
}

.nh-field__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.nh-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--agent-line);
  background: var(--agent-bg);
}

.nh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.12s ease, background 0.12s ease;
}

.nh-btn--ghost {
  border-color: var(--agent-line);
  background: #fff;
  color: var(--agent-text);
}

.nh-btn--ghost:hover {
  background: var(--agent-soft);
}

.nh-btn--primary {
  border-color: var(--agent-blue);
  background: var(--agent-blue);
  color: #fff;
}

.nh-btn--primary:hover {
  filter: brightness(0.93);
}

@media (max-width: 640px) {
  .nh-field__row {
    grid-template-columns: 1fr;
  }
}

.workspace-surface--session {
  height: 100%;
  /* Subtract the topbar row AND the shell's attribution footer row — with only
     the topbar subtracted, this min-height forces the pane past its 1fr grid
     row and the composer clips under the footer strip. */
  min-height: calc(100dvh - 52px - var(--app-footer-height, 0px));
  overflow: hidden;
  padding: 0;
}

.workspace-session-layout {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) max-content;
  /* The implicit auto column sizes to the widest row's min-content (composer
     toolbar, mid-run trace rows), inflating every row past the pane so the
     side panel cuts them off. Floor the track so rows shrink instead. */
  grid-template-columns: minmax(0, 1fr);
  background: var(--agent-card);
}

/* Session topbar (v2 SessionOverviewHeader parity): one full-width bar,
   title on the left, Activity dropdown on the right. Was display:none while
   it only echoed the first message; it now carries the session page surface. */
.workspace-session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  min-width: 0;
  width: 100%;
  height: var(--chrome-h);
  flex: none;
  padding: 0 clamp(1rem, 2.5vw, 1.5rem);
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-surface);
}

.workspace-session-header__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.workspace-session-header__title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

/* The display:flex above beats the UA [hidden] rule — restate it so the
   Stimulus swap actually removes the heading while the input is up. */
.workspace-session-header__title[hidden] {
  display: none;
}

.workspace-session-header h1 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--agent-text);
  font-size: var(--chrome-title-size);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.workspace-session-header__lock {
  display: inline-flex;
  flex: none;
  color: var(--agent-faint);
}

.workspace-session-header__edit {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--agent-faint);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.1s, background 0.1s;
}

.workspace-session-header:hover .workspace-session-header__edit,
.workspace-session-header__edit:focus-visible {
  opacity: 1;
}

.workspace-session-header__edit:hover {
  background: var(--agent-hover);
  color: var(--agent-body);
}

.workspace-session-header__rename {
  flex: 1;
  min-width: 0;
}

.workspace-session-header__rename[hidden] {
  display: none;
}

/* Matches the h1 exactly (size/weight/tracking), with the padding pulled
   back out via negative margin so the text doesn't shift when the swap
   happens — editing reads as in-place. */
.workspace-session-header__rename-input {
  width: 100%;
  margin: -3px 0 -3px -7px;
  padding: 2px 6px;
  border: 1px solid #c7cdd6;
  border-radius: 7px;
  background: #fff;
  color: var(--agent-text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.workspace-session-header__rename-input:focus {
  outline: none;
  border-color: var(--agent-text);
  box-shadow: 0 0 0 1px var(--agent-text);
}

.workspace-session-header__tools {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.6rem;
}

/* Activity dropdown — <details> so popover_controller handles dismissal. */
.session-activity {
  position: relative;
}

.session-activity__button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--agent-line);
  border-radius: 9px;
  background: #fff;
  color: var(--agent-body);
  font-size: 0.76rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}

.session-activity__button::-webkit-details-marker {
  display: none;
}

.session-activity__button:hover {
  background: var(--agent-hover);
}

.session-activity[open] .session-activity__button svg:last-child {
  transform: rotate(180deg);
}

.session-activity__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 9px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: min(440px, calc(100vw - 32px));
  max-height: min(70vh, 440px);
  overflow: hidden;
  border: 1px solid var(--agent-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 34px rgb(16 24 40 / 0.14);
}

/* The activity ledger, grouped into People / Uploaded / Created / Graph
   Updates — the old session page's section anatomy, rebuilt from real ledger
   rows instead of LLM-authored prose. */
.session-activity__scroll {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 14px 0;
}

.session-activity__group {
  padding: 0 18px;
}

.session-activity__group + .session-activity__group {
  margin-top: 16px;
}

/* The narrative summary, repeated here (not just the truncated topbar
   subtitle) so the full text is always readable without leaving the panel. */
.session-activity__summary {
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--agent-line-soft);
}

.session-activity__summary p {
  margin: 0;
  color: var(--agent-body);
  font-size: 0.84rem;
  line-height: 1.5;
}

.session-activity__group-title {
  margin: 0 0 8px;
  color: var(--agent-faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.session-activity__people {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.session-activity__person {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.session-activity__avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 700;
}

.session-activity__person-name {
  color: var(--agent-body);
  font-size: 0.82rem;
  font-weight: 500;
}

.session-activity__file-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.session-activity__file-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
}

.session-activity__file-icon {
  display: grid;
  flex: none;
  place-items: center;
  color: var(--agent-faint);
}

.session-activity__file-label {
  min-width: 0;
  overflow: hidden;
  flex: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--agent-body);
  font-size: 0.82rem;
}

.session-activity__open {
  flex: none;
  color: #2b5cb8;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.session-activity__open:hover {
  text-decoration: underline;
}

.session-activity__bullets {
  margin: 0;
  padding: 0;
  list-style: none;
}

.session-activity__bullet {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 5px 0;
}

.session-activity__bullet-dot {
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 0.4em;
  border-radius: 50%;
  background: var(--agent-line-strong);
}

.session-activity__bullet-label {
  min-width: 0;
  flex: 1;
  color: var(--agent-body);
  font-size: 0.82rem;
}

.session-activity__bullet-delta {
  flex: none;
  color: #1f8a5b;
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.session-activity__empty {
  padding: 24px 18px;
  color: var(--agent-faint);
  font-size: 0.82rem;
  text-align: center;
}

.session-activity__footer {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 10px 18px;
  border-top: 1px solid var(--agent-line-soft);
}

.session-activity__meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--agent-faint);
  font-size: 0.72rem;
}

/* Explicit rows: the header is display:none, which removes it from the grid.
   Without these, auto-placement shifts the transcript into the `auto` row so it
   grows with content instead of scrolling, flowing under the composer. */
.workspace-session-layout__transcript {
  grid-row: 2;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.workspace-session-layout__composer {
  grid-row: 3;
  align-self: end;
  min-width: 0;
  width: 100%;
  margin: 0 auto;
  border-top: 1px solid var(--agent-line);
  background: #fff;
}

.workspace-session-layout__disclaimer {
  min-height: calc(22px + env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5px 12px calc(5px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--agent-line);
  color: #525866;
  font-size: 11px;
  line-height: 1.1;
}

.workspace-prompt-wrap {
  max-width: 58.75rem;
  margin: 0 auto;
}

.workspace-quick-actions {
  max-width: 58.75rem;
  margin: 0.65rem auto 1.2rem;
  display: flex;
  gap: 0.45rem;
}

.workspace-quick-actions button {
  height: 1.35rem;
  padding: 0 0.45rem;
  border: 1px solid var(--agent-line);
  border-radius: 0.35rem;
  background: var(--agent-sunken);
  color: #5f6672;
  font-size: 0.62rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.workspace-recap,
.workspace-sessions,
.workspace-transcript {
  max-width: 58.75rem;
  margin: 0 auto;
}

.workspace-recap {
  margin-top: 1.2rem;
}

.workspace-recap h2 {
  margin: 0 0 0.5rem;
  color: #8b93a1;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* Carries the latest session page's "Where We Left Off" line — real content
   now, so it reads at body size (v2 hero parity). */
.workspace-recap p {
  margin: 0;
  color: var(--agent-body);
  font-size: 0.85rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.workspace-recap__session {
  margin-left: 0.35rem;
  color: var(--agent-muted);
  font-size: 0.78rem;
  text-decoration: none;
}

.workspace-recap__session::before {
  content: "— ";
}

.workspace-recap__session:hover {
  color: var(--agent-text);
  text-decoration: underline;
}

.workspace-tabs {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 1.1rem;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--agent-line);
}

.workspace-tabs__left {
  display: flex;
  align-items: center;
  gap: 22px;
}

.workspace-tab {
  padding: 0 0 11px;
  border: 0;
  background: transparent;
  color: var(--agent-faint);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: -1px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.workspace-tab.is-active {
  color: var(--agent-text);
  font-weight: 600;
  border-bottom-color: var(--agent-text);
}

.workspace-summary-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 6px;
  border: 0;
  background: transparent;
  color: var(--agent-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

.workspace-summary-toggle__track {
  position: relative;
  flex: none;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #d4d7dd;
  transition: background 0.15s;
}

.workspace-summary-toggle__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.2);
  transition: left 0.15s;
}

.workspace-summary-toggle.is-on .workspace-summary-toggle__track {
  background: var(--agent-text);
}

.workspace-summary-toggle.is-on .workspace-summary-toggle__knob {
  left: 16px;
}

.workspace-session-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}

/* Session-excerpt block under a row — rendered always, revealed by the
   Summaries toggle. Aligned with the title (icon 15px + 0.5rem gap). */
.workspace-session__excerpt {
  display: none;
  flex-basis: 100%;
  min-width: 0;
  margin-top: 0.1rem;
  padding-left: calc(15px + 0.5rem);
  color: inherit;
  text-decoration: none;
}

.workspace-session-list--summaries .workspace-session__excerpt {
  display: block;
}

.workspace-session-list--summaries .workspace-session {
  flex-wrap: wrap;
}

.workspace-session__summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: var(--agent-muted);
  font-size: 0.82rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.workspace-session__activity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
  margin-top: 0.5rem;
  font-size: 0.74rem;
  font-weight: 500;
}

.workspace-session__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.workspace-session__chip--uploaded { color: #2b5cb8; }
.workspace-session__chip--created { color: #1f8a5b; }
.workspace-session__chip--graph { color: var(--agent-muted); }

.workspace-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  min-height: 2.75rem;
  padding: 0.68rem 0.5rem;
  border-bottom: 1px solid #edf0f4;
  color: var(--agent-text);
  border-radius: 0.5rem;
  font-size: 0.84rem;
}

.workspace-session:hover,
.workspace-session.is-active {
  background: var(--agent-hover);
}

.workspace-session__main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.workspace-session__icon {
  flex: none;
  display: inline-grid;
  place-items: center;
  color: var(--agent-muted);
}

.workspace-session__copy {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.workspace-session__title {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--agent-text);
  font-weight: 500;
  line-height: 1.35;
}

.workspace-session__context {
  flex: none;
  color: var(--agent-muted);
  font-size: 0.78rem;
  font-weight: 400;
  white-space: nowrap;
}

.workspace-session__link {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.workspace-session__meta {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-left: auto;
  color: #8b93a1;
  font-size: 0.78rem;
  white-space: nowrap;
}

.workspace-session__time {
  min-width: 2.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Quiet lock glyph (v2 UX): the word "Private" lives in the row tooltip. */
.workspace-session__privacy {
  display: inline-flex;
  color: var(--agent-faint);
}

.workspace-session__owner {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Unsent-draft badge — this viewer's own draft only (per-user). Neutral so it
   stays visually distinct from actionable amber "Needs You" states. */
.workspace-session__draft {
  flex: none;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 15px;
  color: var(--agent-muted);
  background: var(--agent-soft);
}

/* The privacy toggle's mini-forms (button_to wrapper on list rows, the
   chip's external form in the composer) must not add a box of their own. */
.privacy-request-form {
  display: contents;
}

/* Shared/Private session chip (composer footer). Amber = private, matching
   v1's chat-header privacy control. */
.privacy-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--agent-line);
  border-radius: 999px;
  background: #fff;
  color: var(--agent-body);
  font-weight: 500;
  cursor: pointer;
}

.privacy-chip:hover {
  background: var(--agent-hover);
  color: var(--agent-body);
}

.privacy-chip.is-private {
  border-color: rgb(245 158 11 / 0.3);
  background: rgb(245 158 11 / 0.1);
  color: #b45309;
}

.privacy-chip.is-private:hover {
  background: rgb(245 158 11 / 0.16);
}

.privacy-chip.is-static {
  cursor: default;
}

.privacy-chip--composer {
  height: 31px;
  padding: 6px 13px;
  font-size: 14px;
}

.privacy-chip--composer-sm {
  height: 29px;
  padding: 5px 11px;
  font-size: 13px;
}

.privacy-chip__icon {
  display: inline-flex;
}

.privacy-chip__icon[hidden] {
  display: none;
}

.workspace-session__dot {
  color: #d4d7dd;
}

/* Hover action cluster (v2 UX): fades in where the old ⋮ placeholder sat. */
.workspace-session__actions {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin: -0.25rem -0.35rem -0.25rem -0.15rem;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.workspace-session:hover .workspace-session__actions,
.workspace-session:focus-within .workspace-session__actions {
  opacity: 1;
}

.workspace-session__action {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--agent-muted);
  cursor: pointer;
}

.workspace-session__action:hover {
  background: var(--agent-hover);
  color: var(--agent-text);
}

.agent-history-row__privacy {
  flex: none;
  display: inline-flex;
  color: var(--agent-faint);
}

.workspace-session-list__more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: center;
  margin-top: 0.85rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid #e2e4e8;
  border-radius: 999px;
  background: #fff;
  color: var(--agent-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.workspace-session-list__more:hover {
  background: var(--agent-hover);
  border-color: #d4d7dd;
  color: var(--agent-text);
}

.workspace-session-list__more[hidden] {
  display: none;
}

.workspace-session-list__more-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--agent-hover);
  color: var(--agent-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.workspace-session-list__empty {
  margin-top: 0.9rem;
  padding: 2.75rem 0.75rem;
  border: 1px dashed #e2e4e8;
  border-radius: 0.8rem;
  color: var(--agent-faint);
  font-size: 0.88rem;
  text-align: center;
}

.workspace-output-list {
  display: flex;
  flex-direction: column;
}

.workspace-output {
  padding: 0.8rem 0;
  border-bottom: 1px solid #edf0f4;
}

.workspace-output__title {
  color: var(--agent-text);
  font-size: 0.76rem;
  font-weight: 700;
}

.workspace-output__meta {
  margin-top: 0.2rem;
  color: #8b93a1;
  font-size: 0.66rem;
}

.workspace-transcript {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.workspace-transcript__heading {
  display: none;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  color: #8b93a1;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Full-width scroller so the scrollbar rides the panel's right edge instead of
   overlapping the centered message column. scrollbar-gutter keeps width stable;
   only the thumb fades in while the user scrolls (session_scroll_controller). */
.workspace-transcript .session-messages {
  flex: 1;
  min-height: 0;
  padding: 18px 0 24px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.workspace-transcript .session-messages.session-messages--scrollbar-visible {
  scrollbar-color: color-mix(in srgb, var(--muted-foreground) 55%, transparent) transparent;
}

.workspace-transcript .session-messages::-webkit-scrollbar {
  width: 8px;
}

.workspace-transcript .session-messages::-webkit-scrollbar-track {
  background: transparent;
}

.workspace-transcript .session-messages::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 9999px;
}

.workspace-transcript .session-messages.session-messages--scrollbar-visible::-webkit-scrollbar-thumb {
  background-color: color-mix(in srgb, var(--muted-foreground) 55%, transparent);
}

.workspace-transcript .session-transcript-stack {
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
  padding-inline: 28px;
}

.workspace-transcript #messages {
  gap: 14px;
}

/* The transcript stack already owns vertical rhythm through its row gap. The
   generic trace margin otherwise doubles the space before the final answer. */
.workspace-transcript .session-work-trace {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .workspace-transcript .session-transcript-stack {
    padding-inline: 14px;
  }
}

.workspace-transcript .session-message__label {
  display: none;
}

/* Multiplayer: attributed rows (author chips at ≥2 authors, team notes) keep
   their label even in the dense transcript (docs/platform/messaging.md §6). */
.workspace-transcript .session-message--attributed .session-message__label {
  display: block;
  font-size: 11.5px;
  color: var(--agent-muted);
  margin-bottom: 3px;
  text-align: right;
}

.workspace-transcript .session-message--team-note .session-message__label {
  text-align: left;
}

.workspace-transcript .session-message__time {
  display: none;
}

.workspace-transcript .session-message__bubble {
  padding: 8px 14px;
}

.workspace-transcript .session-message--user .session-message__body {
  max-width: 80%;
  align-items: flex-end;
}

.workspace-transcript .session-message--user .session-message__bubble {
  border: 1px solid var(--agent-line);
  background: #f5f5f5;
  color: var(--agent-text);
  border-radius: 15px 15px 4px 15px;
  box-shadow: none;
}

.workspace-transcript .session-message--user .session-message__content {
  font-size: var(--text-ui-base);
  line-height: var(--leading-chat);
  text-wrap: wrap;
  white-space: pre-wrap;
}

.workspace-transcript .session-message--assistant,
.workspace-transcript .session-message--system {
  width: 100%;
  gap: 0;
}

.workspace-transcript .session-message--assistant .session-message__avatar,
.workspace-transcript .session-message--system .session-message__avatar {
  display: none;
}

.workspace-transcript .session-message--assistant .session-message__body,
.workspace-transcript .session-message--system .session-message__body {
  width: 100%;
  max-width: 100%;
  align-items: stretch;
}

.workspace-transcript .session-message--assistant .session-message__bubble,
.workspace-transcript .session-message--system .session-message__bubble {
  width: 100%;
  background: transparent;
  color: var(--text-chat);
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.workspace-transcript .session-message--error .session-message__bubble {
  padding: 11px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--destructive) 8%, #fff);
}

.workspace-sidepanel {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 0.75rem;
  background: var(--agent-surface);
}

/* The 52px surface header runs edge-to-edge even inside padded panels. */
.workspace-sidepanel > .side-panel-header {
  margin: -0.75rem -0.75rem 0.9rem;
}

/* Dashboard-pane surfaces (Wealth Graph, hub): grey pane, edge-to-edge
   chrome, scrolling handled by an inner body so tab strips stay pinned. */
.workspace-sidepanel--pane {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--agent-sunken);
}

.workspace-sidepanel--pane > .side-panel-header {
  margin: 0;
}

.workspace-pane__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding:
    var(--panel-body-top)
    var(--panel-body-x)
    var(--panel-body-bottom);
  container-type: inline-size;
  container-name: side-pane;
}

/* Shared right-panel shell. All panel chrome is pinned above a single body
   scroll container; variants change body treatment, never scroll ownership. */
.workspace-panel-shell {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.workspace-panel-shell--pane {
  background: var(--agent-sunken);
}

.workspace-panel-shell--explorer {
  background: var(--agent-surface);
}

.workspace-panel-shell__body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  container-name: side-pane;
  container-type: inline-size;
  overscroll-behavior: contain;
}

.workspace-panel-shell__body--padded {
  padding:
    var(--panel-body-top)
    var(--panel-body-x)
    var(--panel-body-bottom);
}

.workspace-panel-shell__body--flush {
  padding: 0;
  background: var(--agent-surface);
}

.account-connections__action {
  font: 600 var(--text-panel-body) / 1 var(--font-sans) !important;
  letter-spacing: 0;
  white-space: nowrap;
}

.panel-secondary-tabs {
  display: flex;
  flex: none;
  align-items: center;
  gap: 18px;
  min-width: 0;
  height: var(--panel-secondary-tabs-h);
  padding: 0 var(--panel-body-x);
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-surface);
  scrollbar-width: none;
}

.panel-secondary-tabs::-webkit-scrollbar {
  display: none;
}

.panel-secondary-tabs__tab {
  position: relative;
  display: inline-flex;
  height: 100%;
  flex: none;
  align-items: center;
  padding: 0 2px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
}

.panel-secondary-tabs__tab[aria-current="page"] {
  font-weight: 750;
}

.panel-secondary-tabs__tab[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
}

.panel-secondary-tabs--tertiary {
  height: 32px;
  border-bottom-color: var(--agent-line-soft);
  background: var(--agent-card);
}

.panel-secondary-tabs--tertiary .panel-secondary-tabs__tab {
  font-size: 11.5px;
}

.panel-card {
  overflow: hidden;
  border: 1px solid var(--agent-line);
  background: var(--agent-surface);
}

.panel-card--lg {
  border-radius: 10px;
}

.panel-card--xl {
  border-radius: 12px;
}

.panel-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 0 var(--panel-card-padding-x);
  border-bottom: 1px solid var(--agent-line-soft);
}

.panel-card__title {
  min-width: 0;
  margin: 0;
  color: var(--agent-text);
  font-size: 12.5px;
  font-weight: 650;
}

.panel-card__action {
  display: inline-flex;
  flex: none;
  align-items: center;
  font-size: 0.71875rem;
  font-weight: 650;
}

.panel-card__action > a,
.panel-card__action > button {
  font-size: inherit;
  font-weight: inherit;
}

.my-workspace-tabs__tab {
  font-size: var(--text-ui-sm);
}

.ui-kpi-card__label {
  font-size: 0.65625rem;
  font-weight: 650;
  letter-spacing: 0;
}

.ui-kpi-card__value {
  font-size: 1rem;
}

.ui-kpi-card__sub {
  font-size: 0.65625rem;
}

.workspace-dashboard__title {
  font-size: 1.1875rem;
}

.workspace-dashboard__date,
.workspace-dashboard__empty {
  font-size: 0.75rem;
}

.workspace-dashboard .ui-kpi-card__sub,
.workspace-dashboard__row-meta {
  font-size: 0.71875rem;
}

.workspace-dashboard__row-title {
  font-size: var(--text-ui-sm);
}

.workspace-dashboard__chip {
  font-size: 0.65625rem;
}

.workspace-dashboard__kpi-value {
  font-size: 1.125rem;
}

@container side-pane (max-width: 520px) {
  .workspace-dashboard .workspace-dashboard__kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.panel-card__body--padded {
  padding:
    var(--panel-card-padding-y)
    var(--panel-card-padding-x);
}

.panel-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--agent-faint);
}

.panel-section-header h1,
.panel-section-header h2,
.panel-section-header h3 {
  margin: 0;
  font: inherit;
}

.panel-section-header--title {
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--agent-text);
}

.panel-section-header--micro,
.panel-section-header--columns {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.panel-section-header--micro {
  margin-bottom: 8px;
}

.panel-section-header--columns {
  padding: 7px var(--panel-card-padding-x);
  border-bottom: 1px solid var(--agent-line-soft);
  background: var(--agent-card);
  font-size: 10px;
}

/* Person CRM detail: single column by default; two columns when the pane is wide. */
.person-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}

.person-detail__avatar {
  background: linear-gradient(135deg, #4f6ef7 0%, #3730a3 100%);
}

.person-detail__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@container side-pane (min-width: 620px) {
  .person-detail__grid {
    grid-template-columns: 1.6fr 1fr;
    align-items: start;
  }
}

.workspace-sidepanel__header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.25rem 0 1rem;
  color: var(--agent-text);
  font-size: 0.75rem;
  font-weight: 800;
}

.workspace-sidepanel__section {
  margin-bottom: 1.1rem;
}

.source-ref-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin: -0.2rem 0;
  border-radius: 0.4rem;
  color: #94a3b8;
  text-decoration: none;
}

.source-ref-icon:hover,
.source-ref-icon:focus-visible {
  color: #2b5cb8;
  background: #eef2f9;
}

.source-ref-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.source-ref-icon.is-dangling {
  color: #cbd5e1;
  cursor: default;
}

.source-ref-icon[data-tip]:hover::after,
.source-ref-icon[data-tip]:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  right: -0.25rem;
  bottom: calc(100% + 0.3rem);
  z-index: 30;
  padding: 0.26rem 0.5rem;
  border-radius: 6px;
  background: #101828;
  color: var(--agent-bg);
  font-size: 0.68rem;
  font-weight: 550;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 24px rgb(15 23 42 / 18%);
}

.workspace-documents-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #fff;
}

.workspace-documents-panel .workspace-sidepanel__section {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0 0.95rem 0.95rem 0.65rem;
}

.documents-drop-status {
  margin: 0;
  padding: 0.45rem 0.95rem;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-soft);
  color: var(--agent-blue);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.35;
}

.documents-drop-status[hidden] {
  display: none;
}

.documents-drop-status[data-state="success"] {
  color: var(--agent-green-text);
}

.documents-drop-status[data-state="error"] {
  color: var(--destructive);
}

.workspace-documents-panel .workspace-sidepanel__section.is-document-drop-active {
  box-shadow: inset 0 0 0 2px var(--agent-blue);
}

.workspace-documents-panel .workspace-sidepanel__section.is-document-drop-active .documents-tree,
.documents-folder-row.is-document-drop-active {
  background: var(--agent-soft);
}

.documents-folder-row.is-document-drop-active {
  box-shadow: inset 0 0 0 2px var(--agent-blue);
}

.documents-browser-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.documents-browser-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  padding: 0 0.7rem;
  border: 1px solid var(--agent-line);
  border-radius: 10px;
  background: #fff;
  color: var(--agent-text);
  font-size: 0.75rem;
  font-weight: 720;
  cursor: pointer;
}

.documents-browser-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.documents-browser-action--primary {
  border-color: var(--agent-text);
  background: var(--agent-text);
  color: #fff;
}

.documents-upload--toolbar {
  margin: 0;
}

/* Doubled class selector so this wins over `.documents-upload__input`'s
   `width: 100%`, which is declared later with equal specificity. */
.documents-upload__input--hidden.documents-upload__input--hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* One row: search flexes, the archived toggle and actions hug the right. */
.documents-browser-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.95rem 0.45rem;
  border-bottom: 0;
  background: #fff;
}

/* Archived is a rare secondary view — a quiet pill, not a segmented control. */
.documents-archive-toggle {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 2rem;
  padding: 0 0.6rem;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--agent-muted);
  font-size: 0.72rem;
  font-weight: 650;
  text-decoration: none;
}

.documents-archive-toggle:hover {
  background: var(--agent-hover);
  color: var(--agent-text);
}

.documents-archive-toggle.is-active {
  border-color: #d8dce2;
  background: var(--agent-hover);
  color: var(--agent-text);
}

.documents-filterbar {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  padding: 0 0.95rem 0.55rem;
  border-bottom: 1px solid var(--agent-line);
  background: #fff;
  /* overflow-x alone makes overflow-y compute to auto — clip vertical so a
     1px height mismatch doesn't paint a scrollbar on this single-row bar. */
  overflow-x: auto;
  overflow-y: hidden;
}

.documents-filterbar__filter {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 1.7rem;
  padding: 0 0.55rem;
  border-radius: 8px;
  color: var(--agent-muted);
  font-size: 0.7rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.documents-filterbar__filter:hover {
  background: var(--agent-hover);
  color: var(--agent-text);
}

.documents-filterbar__filter.is-active {
  background: var(--agent-hover);
  color: var(--agent-text);
}

.documents-filterbar__spacer {
  flex: 1 1 auto;
  min-width: 0.35rem;
}

.documents-filterbar .documents-archive-toggle {
  height: 1.7rem;
}

.documents-upload__input {
  width: 100%;
  color: var(--agent-muted);
  font-size: 0.78rem;
}

.documents-upload__button,
.document-show__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #dfe3ea;
  border-radius: 9px;
  background: #fff;
  color: var(--agent-text);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.documents-upload__button,
.document-show__button--primary {
  border-color: #2b5cb8;
  background: #2b5cb8;
  color: #fff;
}

.documents-upload__hint {
  margin: 0;
  color: var(--agent-muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.documents-panel__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.8rem 3.3rem 1.5rem;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.35rem 0.35rem;
  color: var(--agent-muted);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.documents-folder-row {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--agent-text);
  font-family: inherit;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
}

/* Folders and files share one explorer rhythm so expanding a branch never
   changes the perceived row density. */
.documents-folder-row,
.document-row {
  min-height: 1.8rem;
  padding: 0.08rem 0.3rem;
}

.documents-folder-row:hover {
  background: var(--agent-hover);
}

.documents-folder-row:focus-visible,
.document-row:focus-visible {
  outline: 2px solid color-mix(in srgb, #2b5cb8 55%, transparent);
  outline-offset: -2px;
}

.documents-folder-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
}

.documents-folder-row__label {
  display: inline-flex;
  flex: 1;
  align-items: baseline;
  gap: 0.3rem;
  min-width: 0;
}

.documents-folder-row__count {
  flex: none;
  color: var(--agent-muted);
  font-size: 0.68rem;
  font-weight: 500;
  white-space: nowrap;
}

.documents-folder-row--collapsed {
  margin-top: 0;
}

.documents-list {
  display: grid;
  gap: 0;
}

.documents-tree {
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 0;
  min-height: 0;
  padding: 0.3rem 0;
  border: 0;
  background: #fff;
  outline: none;
  overflow-y: auto;
}

.documents-tree__content {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.18s ease;
}

.documents-tree__content[data-state="closed"] {
  grid-template-rows: 0fr;
}

.documents-tree__group {
  min-height: 0;
  overflow: hidden;
  display: grid;
  gap: 0;
  margin-left: 1.2rem;
  padding-left: 0.65rem;
  border-left: 1px solid var(--agent-line);
}

.documents-tree__branch {
  display: grid;
  gap: 0;
}

.documents-tree__folder-icon,
.documents-tree__file-icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--agent-muted);
}

.documents-tree__folder-icon {
  display: inline-grid;
  place-items: center;
}

.documents-tree__folder-svg--closed,
.documents-tree__folder-icon[data-state="closed"] .documents-tree__folder-svg--open,
.documents-tree__folder-icon.folder-closed .documents-tree__folder-svg--open {
  display: none;
}

.documents-tree__folder-icon[data-state="closed"] .documents-tree__folder-svg--closed,
.documents-tree__folder-icon.folder-closed .documents-tree__folder-svg--closed {
  display: block;
}

.documents-tree__folder-icon[data-state="open"] .documents-tree__folder-svg--open,
.documents-tree__folder-icon.folder-open .documents-tree__folder-svg--open {
  display: block;
}

.documents-tree__folder-icon[data-state="open"] .documents-tree__folder-svg--closed,
.documents-tree__folder-icon.folder-open .documents-tree__folder-svg--closed {
  display: none;
}

.document-row[hidden],
.documents-tree__content[hidden] {
  display: none;
}

/* Shared explorer grid: header labels and file rows use the same column
   template so Added by / Size / Modified line up like a real file explorer. */
.documents-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.2rem 3.8rem 3.4rem 1.5rem;
  align-items: center;
  gap: 0.4rem;
}

.documents-columns--header {
  flex: none;
  padding: 0.3rem 1.3rem 0.3rem 0.95rem;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-card);
  color: var(--agent-muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.documents-columns__sort {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.3rem;
  margin-left: -0.3rem;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.documents-columns__sort:hover {
  background: var(--agent-hover);
  color: var(--agent-text);
}

.documents-columns__sort.is-active {
  color: var(--agent-text);
}

.documents-columns__arrow {
  font-size: 0.7rem;
  line-height: 1;
}

.documents-columns__spacer {
  display: inline-flex;
  justify-content: center;
}

.document-row {
  border: 0;
  border-radius: 8px;
  background: #fff;
}

.document-row:hover {
  background: var(--agent-hover);
}

.document-row__main {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.42rem;
  color: inherit;
}

.document-row__title {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--agent-text);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-row__title-line {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.document-row__file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 18px;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  color: var(--agent-muted);
}

.document-row__text {
  min-width: 0;
  display: block;
}

.document-row__added-by {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.document-row__uploader-avatar {
  display: inline-grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  flex: none;
  border-radius: 999px;
  background: #e8edf3;
  color: #475569;
  font-size: 0.45rem;
  font-weight: 750;
  object-fit: cover;
}

.document-row__uploader-avatar--client {
  background: #e7f5ef;
  color: #247258;
}

.document-row__uploader-avatar--agent {
  background: #eeeafe;
  color: #6650b8;
}

.document-row__uploader-text {
  display: block;
  min-width: 0;
}

.document-row__uploader-text strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--agent-body);
  font-size: 0.62rem;
  font-weight: 650;
}

.document-inline-state {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 0.25rem;
  font-size: 0.56rem;
  font-weight: 700;
  white-space: nowrap;
}

.document-inline-state--processing {
  color: #3659c9;
}

.document-inline-state--processing::before {
  width: 0.55rem;
  height: 0.55rem;
  border: 1.5px solid #c7d2fe;
  border-top-color: #3659c9;
  border-radius: 999px;
  content: "";
  animation: documents-spin 0.8s linear infinite;
}

.document-inline-state--attention {
  color: #be123c;
}

.document-access-icon {
  display: inline-flex;
  flex: none;
  color: #2f8b68;
  line-height: 0;
}

.document-access-icon svg {
  width: 0.8rem;
  height: 0.8rem;
}

@keyframes documents-spin {
  to {
    transform: rotate(360deg);
  }
}

.document-row__size,
.document-row__date {
  color: var(--agent-muted);
  font-size: 0.64rem;
  white-space: nowrap;
}

/* Collapse explorer columns as the side panel narrows: drop Size first,
   then Modified, then Added by — title + actions menu always survive. */
@container sidepanel (max-width: 560px) {
  .documents-columns {
    grid-template-columns: minmax(0, 1fr) 7.2rem 3.8rem 1.5rem;
  }

  .documents-columns__size {
    display: none;
  }
}

@container sidepanel (max-width: 440px) {
  .documents-columns {
    grid-template-columns: minmax(0, 1fr) 7.2rem 1.5rem;
  }

  .documents-columns__date {
    display: none;
  }
}

@container sidepanel (max-width: 340px) {
  .documents-columns {
    grid-template-columns: minmax(0, 1fr) 1.5rem;
  }

  .documents-columns__added-by {
    display: none;
  }
}

/* Insurance inventory explorer. Policy rows keep the same flush, grouped
   scanning rhythm as People and Legal Entities while exposing protection,
   premium, and deterministic data health as domain-specific columns. */
.workspace-insurance-panel .workspace-explorer-filterbar {
  overflow-x: auto;
  scrollbar-width: none;
}

.workspace-insurance-panel .workspace-explorer-filterbar::-webkit-scrollbar {
  display: none;
}

.insurance-panel__portfolio {
  display: grid;
  flex: none;
  grid-template-columns: 0.75fr 1.05fr 1.2fr;
  min-height: 45px;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-card);
}

.insurance-panel__portfolio-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  border-left: 1px solid var(--agent-line-soft);
}

.insurance-panel__portfolio-item:first-child {
  border-left: 0;
}

.insurance-panel__portfolio-item strong,
.insurance-panel__portfolio-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insurance-panel__portfolio-item strong {
  color: var(--agent-text);
  font-size: var(--text-panel-primary);
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.insurance-panel__portfolio-item span {
  order: -1;
  margin-bottom: 0.08rem;
  color: var(--agent-faint);
  font-size: var(--text-panel-label);
  font-weight: 720;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.insurance-panel__portfolio-item--attention strong {
  color: #925b20;
}

.insurance-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(4.5rem, 0.58fr) minmax(4rem, 0.52fr) minmax(4.6rem, 0.55fr) 0.8rem;
  align-items: center;
  gap: 0.6rem;
}

.insurance-panel__columns-header {
  min-height: 31px;
  padding: 0 0.95rem;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-sunken);
  color: var(--agent-muted);
  font-size: var(--text-panel-meta);
  font-weight: 700;
  letter-spacing: 0.015em;
}

.insurance-panel__group-heading {
  display: flex;
  min-height: 31px;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0 0.95rem;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-card);
  color: var(--agent-muted);
  font-size: var(--text-panel-meta);
  font-weight: 760;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.insurance-panel__group-heading span {
  color: var(--agent-faint);
  font-weight: 650;
}

.insurance-panel__row {
  min-height: 3.85rem;
  padding: 0.52rem 0.95rem;
  border-bottom: 1px solid var(--agent-line-soft);
  color: var(--agent-text);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.insurance-panel__row:hover {
  background: var(--agent-sunken);
}

.insurance-panel__row:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--agent-blue) 55%, transparent);
  outline-offset: -2px;
}

.insurance-panel__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.62rem;
}

.insurance-panel__icon,
.insurance-detail__hero-icon {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  flex: none;
  place-items: center;
  border: 1px solid var(--agent-line);
  border-radius: 9px;
  background: var(--agent-soft);
  color: var(--agent-muted);
}

.insurance-panel__icon svg,
.insurance-detail__hero-icon svg {
  width: 1rem;
  height: 1rem;
}

.insurance-panel__icon--life,
.insurance-detail__hero-icon--life {
  background: color-mix(in srgb, var(--agent-blue) 7%, var(--agent-surface));
  color: var(--agent-blue);
}

.insurance-panel__icon--income_protection,
.insurance-detail__hero-icon--disability,
.insurance-detail__hero-icon--long_term_care {
  background: #fff3e5;
  color: #925b20;
}

.insurance-panel__icon--liability,
.insurance-detail__hero-icon--umbrella_liability,
.insurance-detail__hero-icon--professional {
  background: var(--agent-green);
  color: var(--agent-green-text);
}

.insurance-panel__identity-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.08rem;
}

.insurance-panel__identity-copy strong,
.insurance-panel__policy-meta,
.insurance-panel__metric-primary,
.insurance-panel__metric-secondary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insurance-panel__identity-copy strong {
  display: -webkit-box;
  color: var(--agent-text);
  font-size: var(--text-panel-primary);
  font-weight: 660;
  line-height: 1.22;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.insurance-panel__policy-meta,
.insurance-panel__metric-secondary {
  color: var(--agent-muted);
  font-size: var(--text-panel-meta);
}

.insurance-panel__metric {
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.insurance-panel__metric-primary {
  display: block;
  color: var(--agent-body);
  font-size: var(--text-panel-body);
  font-weight: 650;
}

.insurance-panel__metric-secondary {
  display: block;
  margin-top: 0.12rem;
}

.insurance-panel__data-status {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 0.25rem;
  overflow: hidden;
  padding: 0.22rem 0.4rem;
  border-radius: 7px;
  font-size: var(--text-panel-label);
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insurance-panel__data-status::before {
  content: "";
  width: 0.28rem;
  height: 0.28rem;
  flex: none;
  border-radius: 999px;
  background: currentColor;
}

.insurance-panel__data-status--attention {
  background: #fff3e5;
  color: #925b20;
}

.insurance-panel__data-status--complete {
  background: var(--agent-green);
  color: var(--agent-green-text);
}

.insurance-panel__chevron {
  display: inline-flex;
  color: var(--agent-faint);
}

.insurance-panel__chevron svg {
  width: 0.8rem;
  height: 0.8rem;
}

.insurance-panel__row:hover .insurance-panel__chevron {
  color: var(--agent-muted);
}

.insurance-panel__footer {
  padding: 0.7rem 0.95rem 1rem;
  color: var(--agent-faint);
  font-size: var(--text-panel-meta);
}

.insurance-panel__filtered-empty,
.insurance-panel__search-empty {
  margin: 1rem;
}

.insurance-panel__search-empty[hidden],
.insurance-panel__group[hidden],
.insurance-panel__row[hidden] {
  display: none;
}

@container sidepanel (max-width: 500px) {
  .insurance-columns {
    grid-template-columns: minmax(0, 1.6fr) minmax(4.2rem, 0.6fr) minmax(4.4rem, 0.58fr) 0.8rem;
  }

  .insurance-columns__premium {
    display: none;
  }
}

@container sidepanel (max-width: 340px) {
  .insurance-columns {
    grid-template-columns: minmax(0, 1fr) minmax(4.3rem, 0.58fr) 0.8rem;
  }

  .insurance-columns__protection {
    display: none;
  }

  .insurance-panel__portfolio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insurance-panel__portfolio-item:last-child {
    display: none;
  }
}

/* Policy detail translates the record schema into an insurance profile:
   identity, deterministic review cues, category-aware facts, linked parties,
   features, documents, and collapsed provenance. */
.insurance-detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem 1rem;
}

.insurance-detail__hero,
.insurance-detail__section,
.insurance-detail__history {
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  background: var(--agent-surface);
}

.insurance-detail__hero {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.9rem;
}

.insurance-detail__hero-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 11px;
}

.insurance-detail__hero-icon svg {
  width: 1.42rem;
  height: 1.42rem;
}

.insurance-detail__hero-icon--property_auto {
  background: var(--agent-soft);
  color: var(--agent-muted);
}

.insurance-detail__hero-icon--health {
  background: var(--agent-green);
  color: var(--agent-green-text);
}

.insurance-detail__hero-icon--other {
  background: #fff3e5;
  color: #925b20;
}

.insurance-detail__hero-copy {
  min-width: 0;
  flex: 1;
}

.insurance-detail__eyebrow {
  margin: 0 0 0.2rem !important;
  color: var(--agent-faint) !important;
  font-size: var(--text-panel-label) !important;
  font-weight: 720;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.insurance-detail__hero h2 {
  margin: 0;
  color: var(--agent-text);
  font-size: 1.08rem;
  font-weight: 680;
  line-height: 1.22;
}

.insurance-detail__hero-copy > p:not(.insurance-detail__eyebrow) {
  margin: 0.22rem 0 0;
  color: var(--agent-muted);
  font-size: var(--text-panel-body);
}

.insurance-detail__hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-top: 0.55rem;
  color: var(--agent-muted);
  font-size: var(--text-panel-meta);
}

.insurance-detail__update {
  flex: none;
}

.insurance-detail__quality {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--agent-line);
  border-radius: 10px;
}

.insurance-detail__quality--attention {
  border-color: #f0d6b6;
  background: #fff9f1;
  color: #925b20;
}

.insurance-detail__quality--complete {
  border-color: color-mix(in srgb, var(--agent-green-text) 20%, var(--agent-line));
  background: color-mix(in srgb, var(--agent-green) 48%, var(--agent-surface));
  color: var(--agent-green-text);
}

.insurance-detail__quality-icon {
  display: grid;
  width: 1.45rem;
  height: 1.45rem;
  flex: none;
  place-items: center;
  border-radius: 7px;
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.insurance-detail__quality-icon svg {
  width: 0.78rem;
  height: 0.78rem;
}

.insurance-detail__quality-copy {
  min-width: 0;
  flex: 1;
}

.insurance-detail__quality-copy > strong {
  display: block;
  font-size: var(--text-panel-body);
  font-weight: 720;
}

.insurance-detail__quality-copy > p {
  margin: 0.12rem 0 0;
  color: var(--agent-muted);
  font-size: var(--text-panel-meta);
  line-height: 1.4;
}

.insurance-detail__quality-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.42rem;
}

.insurance-detail__quality-reasons span {
  display: inline-flex;
  align-items: center;
  min-height: 1.15rem;
  padding: 0 0.38rem;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 5%, transparent);
  font-size: var(--text-panel-label);
  font-weight: 650;
}

.insurance-detail__section {
  overflow: hidden;
}

.insurance-detail__section > h3 {
  margin: 0;
  padding: 0.62rem 0.75rem 0.55rem;
  color: var(--agent-text);
  font-size: var(--text-panel-body);
  font-weight: 680;
}

.insurance-detail__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 0.75rem 0.7rem;
}

.insurance-detail__facts > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.16rem;
  padding: 0 0.62rem;
  border-left: 1px solid var(--agent-line-soft);
}

.insurance-detail__facts > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.insurance-detail__facts span,
.insurance-detail__party-group h4 {
  color: var(--agent-faint);
  font-size: var(--text-panel-label);
  font-weight: 680;
}

.insurance-detail__facts strong {
  overflow: hidden;
  color: var(--agent-text);
  font-size: var(--text-panel-body);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insurance-detail__disclosure {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--agent-line-soft);
  background: var(--agent-card);
  color: var(--agent-muted);
  font-size: var(--text-panel-meta);
  line-height: 1.45;
}

.insurance-detail__grid {
  display: grid;
  gap: 0.75rem;
}

.insurance-detail__party-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  border-top: 1px solid var(--agent-line-soft);
}

.insurance-detail__party-group {
  min-width: 0;
  padding: 0.55rem 0.68rem;
  border-right: 1px solid var(--agent-line-soft);
  border-bottom: 1px solid var(--agent-line-soft);
}

.insurance-detail__party-group h4 {
  margin: 0 0 0.35rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.insurance-detail__party {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0;
  color: inherit;
  text-decoration: none;
}

.insurance-detail__party-avatar {
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  place-items: center;
  border-radius: 999px;
  background: var(--agent-soft);
  color: var(--agent-muted);
  font-size: var(--text-panel-label);
  font-weight: 750;
}

.insurance-detail__party > span:last-child,
.insurance-detail__missing-party > span:last-child,
.insurance-detail__feature > span:last-child,
.insurance-detail__source > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.insurance-detail__party strong,
.insurance-detail__party small,
.insurance-detail__feature strong,
.insurance-detail__feature small,
.insurance-detail__source strong,
.insurance-detail__source small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insurance-detail__party strong {
  color: var(--agent-body);
  font-size: var(--text-panel-meta);
  font-weight: 650;
}

.insurance-detail__party small {
  margin-top: 0.05rem;
  color: var(--agent-faint);
  font-size: var(--text-panel-label);
}

a.insurance-detail__party:hover strong {
  color: var(--agent-blue);
}

.insurance-detail__party-group.is-missing {
  background: #fff9f1;
}

.insurance-detail__missing-party {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 1.7rem;
  color: #925b20;
}

.insurance-detail__missing-party > span:first-child {
  display: inline-flex;
  flex: none;
}

.insurance-detail__missing-party svg {
  width: 0.8rem;
  height: 0.8rem;
}

.insurance-detail__missing-party strong {
  font-size: var(--text-panel-meta);
  font-weight: 680;
}

.insurance-detail__missing-party small {
  color: var(--agent-muted);
  font-size: var(--text-panel-label);
}

.insurance-detail__feature-list {
  border-top: 1px solid var(--agent-line-soft);
}

.insurance-detail__feature {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.48rem 0.7rem;
  border-top: 1px solid var(--agent-line-soft);
  color: var(--agent-body);
}

.insurance-detail__feature:first-child {
  border-top: 0;
}

.insurance-detail__feature > span:first-child {
  display: inline-flex;
  flex: none;
  color: var(--agent-blue);
}

.insurance-detail__feature svg {
  width: 0.78rem;
  height: 0.78rem;
}

.insurance-detail__feature strong {
  font-size: var(--text-panel-meta);
  font-weight: 620;
}

.insurance-detail__feature small {
  margin-top: 0.08rem;
  color: var(--agent-muted);
  font-size: var(--text-panel-label);
}

.insurance-detail__notes > div {
  padding: 0.55rem 0.75rem;
  border-top: 1px solid var(--agent-line-soft);
}

.insurance-detail__notes p {
  margin: 0;
  color: var(--agent-body);
  font-size: var(--text-panel-body);
  line-height: 1.5;
}

.insurance-detail__notes span {
  display: block;
  margin-top: 0.2rem;
  color: var(--agent-faint);
  font-size: var(--text-panel-label);
}

.insurance-detail__documents > section {
  border-radius: 12px;
}

.insurance-detail__history {
  overflow: hidden;
}

.insurance-detail__history summary {
  display: grid;
  min-height: 2.5rem;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.75rem;
  color: var(--agent-body);
  font-size: var(--text-panel-meta);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.insurance-detail__history summary::-webkit-details-marker {
  display: none;
}

.insurance-detail__history-count {
  color: var(--agent-faint);
  font-size: var(--text-panel-label);
  font-weight: 580;
}

.insurance-detail__history summary svg {
  width: 0.72rem;
  height: 0.72rem;
  transition: transform 0.15s ease;
}

.insurance-detail__history[open] summary svg {
  transform: rotate(90deg);
}

.insurance-detail__history-body {
  padding: 0.1rem 0.75rem 0.65rem;
  border-top: 1px solid var(--agent-line-soft);
}

.insurance-detail__source {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0;
  color: inherit;
  text-decoration: none;
}

.insurance-detail__source > span:first-child {
  display: inline-flex;
  flex: none;
  color: var(--agent-blue);
}

.insurance-detail__source svg {
  width: 0.78rem;
  height: 0.78rem;
}

.insurance-detail__source strong {
  color: var(--agent-blue);
  font-size: var(--text-panel-meta);
  font-weight: 620;
}

.insurance-detail__source small,
.insurance-detail__source-empty {
  color: var(--agent-muted);
  font-size: var(--text-panel-label);
}

.insurance-detail__source-empty {
  margin: 0;
  padding: 0.45rem 0;
}

.insurance-detail__activity {
  display: flex;
  align-items: flex-start;
  gap: 0.48rem;
  padding-top: 0.5rem;
}

.insurance-detail__activity > span {
  width: 0.32rem;
  height: 0.32rem;
  flex: none;
  margin-top: 0.25rem;
  border-radius: 999px;
  background: var(--agent-muted);
}

.insurance-detail__activity p {
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--agent-body);
  font-size: var(--text-panel-meta);
}

.insurance-detail__activity small {
  color: var(--agent-faint);
  font-size: var(--text-panel-label);
}

.insurance-detail__footer {
  padding: 0 0.1rem;
  color: var(--agent-faint);
  font-size: var(--text-panel-label);
}

@container sidepanel (max-width: 450px) {
  .insurance-detail__hero {
    flex-wrap: wrap;
  }

  .insurance-detail__update {
    width: 100%;
  }

  .insurance-detail__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 0.7rem;
  }

  .insurance-detail__facts > div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
}

@container sidepanel (max-width: 340px) {
  .insurance-detail {
    padding-inline: 0.65rem;
  }

  .insurance-detail__party-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .insurance-detail__party-group {
    border-right: 0;
  }
}

/* Tax planning is a compact analysis stack in the normal pane and becomes a
   true three-column Filed / Baseline / Plan studio once the panel is expanded. */
.tax-planning-studio {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--panel-section-gap);
}

.tax-planning-studio__expand-hint {
  display: none;
  margin: 0;
  color: var(--agent-muted);
  font-size: 0.69rem;
}

@container side-pane (max-width: 700px) {
  .tax-planning-studio {
    grid-template-columns: minmax(0, 1fr);
  }

  .tax-planning-studio__editor {
    display: none;
  }

  .tax-planning-studio__expand-hint {
    display: block;
  }
}

.tax-return-review {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(18rem, 0.9fr) minmax(22rem, 1.1fr);
}

.tax-return-review__source {
  min-width: 0;
  border-right: 1px solid var(--agent-line);
  background: var(--agent-sunken);
}

.tax-return-review__facts {
  min-width: 0;
  max-height: min(72vh, 58rem);
  overflow-y: auto;
}

.tax-return-review__pdf {
  display: block;
  width: 100%;
  min-height: min(72vh, 58rem);
  border: 0;
  background: var(--agent-surface);
}

@container side-pane (max-width: 700px) {
  .tax-return-review {
    grid-template-columns: minmax(0, 1fr);
  }

  .tax-return-review__source {
    display: none;
  }
}

/* Investment relationship cards shared by public-security and private-fund
   details. Person links remain workspace scoped even for org-wide securities. */
.private-detail__section-heading > a,
.security-contacts__heading > a {
  flex: none;
  color: #2b5cb8;
  font-size: 0.64rem;
  font-weight: 650;
  text-decoration: none;
}

.private-detail__section-heading > a:hover,
.security-contacts__heading > a:hover {
  text-decoration: underline;
}

.private-detail__people-grid,
.security-contacts__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.private-detail__people-grid > a,
.security-contacts__grid > a {
  display: grid;
  min-width: 0;
  min-height: 3.4rem;
  grid-template-columns: 2rem minmax(0, 1fr) auto 0.7rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--agent-line-soft);
  color: inherit;
  text-decoration: none;
}

.private-detail__people-grid > a:nth-child(even),
.security-contacts__grid > a:nth-child(even) {
  border-left: 1px solid var(--agent-line-soft);
}

.private-detail__people-grid > a:hover,
.security-contacts__grid > a:hover {
  background: var(--agent-sunken);
}

.private-detail__contact-avatar,
.security-contacts__avatar {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 999px;
  background: #e8eef8;
  color: #3c5f95;
  font-size: 0.61rem;
  font-weight: 720;
}

.private-detail__people-grid a > span:nth-child(2),
.security-contacts__grid a > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.08rem;
}

.private-detail__people-grid strong,
.private-detail__people-grid small,
.security-contacts__grid strong,
.security-contacts__grid small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-detail__people-grid strong,
.security-contacts__grid strong {
  color: #27313f;
  font-size: 0.67rem;
  font-weight: 620;
}

.private-detail__people-grid small,
.security-contacts__grid small {
  color: #8b93a1;
  font-size: 0.57rem;
}

.private-detail__people-grid b,
.security-contacts__grid b {
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  background: #eef2ff;
  color: #485b91;
  font-size: 0.56rem;
  font-weight: 620;
  white-space: nowrap;
}

.private-detail__people-grid a > svg,
.security-contacts__grid a > svg {
  width: 0.7rem;
  height: 0.7rem;
  color: #a7afba;
}

.private-detail__people-empty,
.security-contacts__empty {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.75rem;
}

.private-detail__people-icon,
.security-contacts__empty > span {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  place-items: center;
  border-radius: 9px;
  background: #f0f3f7;
  color: #778396;
}

.private-detail__people-icon svg,
.security-contacts__empty > span svg {
  width: 1rem;
  height: 1rem;
}

.private-detail__people-empty > div,
.security-contacts__empty p {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  margin: 0;
}

.private-detail__people-empty strong,
.security-contacts__empty strong {
  color: #3a4452;
  font-size: 0.68rem;
  font-weight: 620;
}

.private-detail__people-empty small,
.security-contacts__empty small {
  color: #8b93a1;
  font-size: 0.6rem;
}

.security-contacts__heading {
  display: flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--agent-line-soft);
  background: var(--agent-sunken);
}

.security-contacts__heading > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.08rem;
}

.security-contacts__heading strong {
  color: #3a4452;
  font-size: 0.72rem;
}

.security-contacts__heading small {
  color: #8b93a1;
  font-size: 0.59rem;
}

@container sidepanel (max-width: 700px) {
  .private-detail__people-grid,
  .security-contacts__grid {
    grid-template-columns: 1fr;
  }

  .private-detail__people-grid > a:nth-child(even),
  .security-contacts__grid > a:nth-child(even) {
    border-left: 0;
  }
}

.workspace-wiki-panel {
  min-height: 100%;
  background: #fff;
}

.workspace-wiki-panel > .side-panel-header {
  margin: 0;
}

.workspace-wiki-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem 0;
}

.workspace-wiki-panel__header h2 {
  margin: 0;
  font-size: 1rem;
}

.workspace-wiki-panel__ref,
.workspace-wiki-panel__version,
.workspace-wiki-panel__versions summary {
  color: #8b93a1;
  font-size: 0.72rem;
}

.workspace-wiki-panel__versions {
  position: relative;
}

.workspace-wiki-panel__versions summary {
  cursor: pointer;
}

.workspace-wiki-panel__version-menu {
  position: absolute;
  z-index: 2;
  top: 1.5rem;
  right: 0;
  display: grid;
  min-width: 5rem;
  padding: 0.35rem;
  border: 1px solid #e2e5ea;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 8px 24px rgb(15 23 42 / 12%);
}

.workspace-wiki-panel__version-menu a {
  padding: 0.3rem 0.45rem;
  border-radius: 0.3rem;
  color: var(--agent-body);
  text-decoration: none;
}

.workspace-wiki-panel__version-menu a.is-current {
  background: #eef2ff;
  color: #2b5cb8;
  font-weight: 700;
}

.workspace-wiki-panel__notice {
  margin: 0.8rem 1.1rem 0;
  padding: 0.55rem 0.7rem;
  border-radius: 0.45rem;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.78rem;
}

.workspace-wiki-panel__body,
.workspace-wiki-panel__empty {
  padding: 1rem 1.1rem 2rem;
}

/* Cash flow: URL-backed plan, activity, budget, and review surfaces. */
.cash-flow-tabs {
  display: flex;
  flex: none;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0 1rem;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-soft);
}

.cash-flow-tabs__tab {
  flex: none;
  padding: 0.75rem 0.15rem 0.65rem;
  border-bottom: 2px solid transparent;
  color: var(--agent-muted);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
}

.cash-flow-tabs__tab:hover,
.cash-flow-tabs__tab:focus-visible {
  color: var(--agent-text);
}

.cash-flow-tabs__tab.is-active {
  border-bottom-color: var(--agent-text);
  color: var(--agent-text);
  font-weight: 750;
}

.cash-flow-quality {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid var(--agent-line);
  background: #fff;
  color: var(--agent-muted);
  font-size: 0.68rem;
}

.cash-flow-quality__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #d9892f;
}

.cash-flow-quality--good .cash-flow-quality__dot {
  background: #16865c;
}

.cash-flow-panel {
  padding: 0.85rem;
}

.cash-flow-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cash-flow-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.cash-flow-section-heading h2 {
  margin: 0.1rem 0 0;
  color: var(--agent-text);
  font-size: 1rem;
}

.cash-flow-eyebrow,
.cash-flow-disclosure {
  margin: 0;
  color: var(--agent-muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.cash-flow-eyebrow {
  font-weight: 750;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.cash-flow-badge {
  flex: none;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: #eef5f2;
  color: #176448;
  font-size: 0.66rem;
  font-weight: 750;
}

.cash-flow-kpis,
.budget-targets__totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.cash-flow-kpis > div:not(.group),
.budget-targets__totals > div {
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid var(--agent-line);
  border-radius: 9px;
  background: #fff;
}

.cash-flow-kpis > div:not(.group) span,
.budget-targets__totals span {
  display: block;
  overflow: hidden;
  color: var(--agent-muted);
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.cash-flow-kpis > div:not(.group) strong,
.budget-targets__totals strong {
  display: block;
  margin-top: 0.15rem;
  color: var(--agent-text);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.cash-flow-statement,
.cash-flow-activity-group,
.budget-targets {
  overflow: hidden;
  border: 1px solid var(--agent-line);
  border-radius: 11px;
  background: #fff;
}

.cash-flow-statement__title,
.cash-flow-statement__bottom-line,
.cash-flow-activity-group__heading {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-soft);
  color: var(--agent-text);
  font-size: 0.75rem;
  font-weight: 750;
}

.cash-flow-statement__title--outflow {
  border-top: 2px solid var(--agent-line);
}

.cash-flow-statement__title--savings {
  border-top: 2px solid var(--agent-line);
  background: #f2f8f5;
}

.cash-flow-statement__group {
  border-bottom: 1px solid var(--agent-line);
}

.cash-flow-statement__group > summary {
  display: flex;
  cursor: pointer;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  color: var(--agent-text);
  font-size: 0.72rem;
  font-weight: 700;
  list-style: none;
}

.cash-flow-statement__group > summary::-webkit-details-marker {
  display: none;
}

.cash-flow-statement__group > summary > span:first-child::before {
  content: "›";
  display: inline-block;
  margin-right: 0.4rem;
  color: var(--agent-muted);
  transition: transform 120ms ease;
}

.cash-flow-statement__group[open] > summary > span:first-child::before {
  transform: rotate(90deg);
}

.cash-flow-recipient,
.cash-flow-statement__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem 0.4rem 1.65rem;
  border-top: 1px solid var(--agent-hover);
  color: var(--agent-text);
  font-size: 0.71rem;
}

.cash-flow-recipient {
  grid-template-columns: minmax(0, 1fr) auto;
  background: var(--agent-card);
  font-weight: 650;
}

.cash-flow-recipient small {
  display: block;
  color: var(--agent-muted);
  font-size: 0.63rem;
  font-weight: 450;
}

.cash-flow-statement__row a {
  min-width: 0;
  overflow: hidden;
  color: var(--agent-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-flow-statement__empty {
  margin: 0;
  padding: 0.45rem 0.75rem 0.55rem 1.65rem;
  color: var(--agent-muted);
  font-size: 0.68rem;
}

.cash-flow-statement__bottom-line {
  border-top: 2px solid var(--agent-line);
  border-bottom: 0;
  background: #fff;
}

/* Cash Flow plan uses the same financial-grid density as Balance Sheet. */
.cash-flow-statement--financial-grid {
  border-radius: 0.5rem;
}

.cash-flow-statement--financial-grid .cash-flow-statement__columns,
.cash-flow-statement--financial-grid .cash-flow-statement__title,
.cash-flow-statement--financial-grid .cash-flow-statement__group > summary,
.cash-flow-statement--financial-grid .cash-flow-recipient,
.cash-flow-statement--financial-grid .cash-flow-statement__row,
.cash-flow-statement--financial-grid .cash-flow-statement__bottom-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.4rem minmax(6rem, auto);
  align-items: center;
  gap: 0.5rem;
}

.cash-flow-statement--financial-grid .cash-flow-statement__columns {
  padding: 0.375rem 0.75rem;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-card);
  color: var(--agent-muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cash-flow-statement--financial-grid .cash-flow-statement__columns > :nth-child(n + 2),
.cash-flow-statement--financial-grid .cash-flow-statement__title > :last-child,
.cash-flow-statement--financial-grid .cash-flow-statement__group > summary > :last-child,
.cash-flow-statement--financial-grid .cash-flow-recipient > :last-child,
.cash-flow-statement--financial-grid .cash-flow-statement__row > :last-child,
.cash-flow-statement--financial-grid .cash-flow-statement__bottom-line > :last-child {
  text-align: right;
}

.cash-flow-statement--financial-grid .cash-flow-statement__title {
  padding: 0.5rem 0.75rem;
  background: var(--agent-sunken);
  color: var(--agent-body);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cash-flow-statement--financial-grid .cash-flow-statement__group > summary {
  padding: 0.375rem 0.75rem 0.375rem 1.25rem;
  color: var(--agent-body);
  font-size: 13px;
  font-weight: 600;
}

.cash-flow-statement--financial-grid .cash-flow-recipient {
  padding: 0.375rem 0.75rem 0.375rem 1.75rem;
  background: var(--agent-card);
  font-size: 12px;
}

.cash-flow-statement--financial-grid .cash-flow-statement__row {
  padding: 0.375rem 0.75rem 0.375rem 2.75rem;
  font-size: 13px;
}

.cash-flow-statement--financial-grid .cash-flow-statement__bottom-line {
  padding: 0.5rem 0.75rem;
  font-size: 13px;
  font-weight: 700;
}

.cash-flow-statement--financial-grid .cash-flow-statement__row--category {
  padding-left: 1.25rem;
  color: var(--agent-body);
  font-weight: 600;
}

.cash-flow-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0.65rem;
  border: 1px solid var(--agent-line);
  border-radius: 10px;
  background: #fff;
}

.cash-flow-filters label {
  min-width: 0;
  color: var(--agent-muted);
  font-size: 0.62rem;
  font-weight: 700;
}

.cash-flow-filters input,
.cash-flow-filters select,
.cash-flow-month-picker input {
  width: 100%;
  min-width: 0;
  margin-top: 0.2rem;
  padding: 0.38rem 0.4rem;
  border: 1px solid var(--agent-line);
  border-radius: 6px;
  background: #fff;
  color: var(--agent-text);
  font: inherit;
}

.cash-flow-filters input[type="submit"],
.cash-flow-month-picker input[type="submit"],
.cash-flow-review-action {
  align-self: end;
  padding: 0.45rem 0.65rem;
  border: 1px solid #27313c;
  border-radius: 7px;
  background: #27313c;
  color: #fff;
  font-size: 0.67rem;
  font-weight: 700;
  cursor: pointer;
}

.cash-flow-activity-group__heading span:last-child {
  color: var(--agent-muted);
}

.cash-flow-pagination,
.cash-flow-month-links {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  color: var(--agent-muted);
  font-size: 0.68rem;
}

.cash-flow-pagination a:last-child,
.cash-flow-month-links a:last-child {
  text-align: right;
}

.cash-flow-pagination a,
.cash-flow-month-links a {
  color: #2b5cb8;
  text-decoration: none;
}

.cash-flow-month-picker {
  display: flex;
  align-items: end;
  gap: 0.3rem;
}

.budget-targets {
  padding: 0.7rem;
}

.budget-targets__coverage,
.budget-targets__uncategorized {
  margin: 0.55rem 0;
  color: var(--agent-muted);
  font-size: 0.66rem;
}

.budget-targets__uncategorized {
  padding: 0.5rem;
  border-radius: 7px;
  background: #fff8e8;
  color: #8a5a12;
}

.budget-targets__table {
  overflow: hidden;
  border: 1px solid var(--agent-line);
  border-radius: 8px;
}

.budget-targets__header,
.budget-targets__progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.4rem 4.5rem 4.5rem 4.5rem;
  gap: 0.45rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.budget-targets__header {
  background: var(--agent-soft);
  color: var(--agent-muted);
  font-size: 0.59rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.budget-targets__header span:first-child,
.budget-targets__progress-row > span:first-child {
  text-align: left;
}

.budget-targets__progress-row {
  position: relative;
  padding-bottom: 0.8rem;
  border-top: 1px solid var(--agent-line);
}

.budget-targets__progress-row small {
  display: block;
  color: var(--agent-muted);
  font-size: 0.58rem;
  font-weight: 450;
}

.budget-targets__bar {
  position: absolute;
  right: 0.55rem;
  bottom: 0.25rem;
  left: 0.55rem;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f2;
}

.budget-targets__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #4b8f75;
}

.is-negative {
  color: #b42318 !important;
}

.is-positive {
  color: #16865c !important;
}

.budget-targets__editor {
  margin-top: 0.65rem;
  color: var(--agent-text);
  font-size: 0.7rem;
}

.budget-targets__editor > summary {
  cursor: pointer;
  font-weight: 700;
}

.budget-target__form,
.budget-target-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6rem auto;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.budget-target__form input,
.budget-target-form input,
.budget-target-form select,
.transaction-category-form input,
.transaction-category-form select {
  min-width: 0;
  padding: 0.38rem;
  border: 1px solid var(--agent-line);
  border-radius: 6px;
  font: inherit;
}

.budget-target__form > span small {
  display: block;
  color: var(--agent-muted);
  font-size: 0.58rem;
}

.cash-flow-review-body {
  padding: 0.9rem;
  border: 1px solid var(--agent-line);
  border-radius: 11px;
  background: #fff;
  color: var(--agent-text);
  font-size: 0.75rem;
  line-height: 1.55;
}

.cash-flow-review-body h2 {
  margin: 1rem 0 0.35rem;
  font-size: 0.86rem;
}

.cash-flow-review-body h2:first-child {
  margin-top: 0;
}

@container sidepanel (max-width: 520px) {
  .cash-flow-kpis,
  .budget-targets__totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cash-flow-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .budget-targets__header,
  .budget-targets__progress-row {
    grid-template-columns: minmax(0, 1fr) 4rem 4rem;
  }

  .budget-targets__header span:nth-child(2),
  .budget-targets__progress-row > span:nth-child(2),
  .budget-targets__header span:nth-child(3),
  .budget-targets__progress-row > span:nth-child(3) {
    display: none;
  }
}

@container sidepanel (max-width: 360px) {
  .cash-flow-tabs {
    gap: 0.85rem;
  }

  .cash-flow-filters {
    grid-template-columns: 1fr;
  }

  .cash-flow-section-heading {
    flex-direction: column;
  }
}

.document-status {
  display: inline-flex;
  align-items: center;
  height: 1.25rem;
  padding: 0 0.42rem;
  border-radius: 999px;
  background: var(--agent-hover);
  color: var(--agent-body);
  font-size: 0.58rem;
  font-weight: 700;
}

.document-status--parsed {
  background: #edf9f2;
  color: #2f8b68;
}

.document-status--shared {
  background: #edf9f2;
  color: #2f8b68;
}

.document-status--parse_failed {
  background: #fff1f2;
  color: #be123c;
}

.document-status--deleted {
  background: var(--agent-hover);
  color: var(--agent-muted);
}

.document-status--parsing,
.document-status--uploaded {
  background: #eef2ff;
  color: #3659c9;
}

.documents-empty {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px dashed var(--agent-line);
  border-radius: 12px;
  color: var(--agent-muted);
  font-size: 0.78rem;
}

.documents-empty[hidden],
.documents-empty--search[hidden] {
  display: none;
}

.documents-empty--inline,
.documents-empty--search {
  margin: 0;
  border-radius: 0;
  border-width: 0 0 1px;
  background: #fff;
}

.documents-empty--search {
  padding: 0.7rem 0.35rem;
  color: var(--agent-muted);
  font-size: 0.72rem;
}

.documents-empty strong {
  color: var(--agent-text);
}

.documents-empty--center {
  max-width: 42rem;
  margin: 2rem auto;
}

.document-show {
  max-width: 58rem;
  margin: 0 auto;
}

.document-show__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.document-show__eyebrow {
  margin: 0 0 0.35rem;
  color: var(--agent-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.document-show__header h1 {
  margin: 0;
  color: var(--agent-text);
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.document-show__header p {
  margin: 0.25rem 0 0;
  color: var(--agent-muted);
  font-size: 0.8rem;
}

.document-show__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.document-show__alert {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #fecdd3;
  border-radius: 12px;
  background: #fff1f2;
  color: #be123c;
  font-size: 0.82rem;
}

.document-pages {
  display: grid;
  gap: 1rem;
}

.document-page {
  padding: 1.1rem;
  border: 1px solid var(--agent-line);
  border-radius: 14px;
  background: #fff;
}

.document-page h2 {
  margin: 0 0 0.75rem;
  color: var(--agent-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.document-page__content {
  color: var(--agent-text);
  font-size: 0.9rem;
  line-height: 1.55;
}

.document-page__content > :first-child {
  margin-top: 0;
}

.document-page__content > :last-child {
  margin-bottom: 0;
}

.document-page__content h1,
.document-page__content h2,
.document-page__content h3 {
  margin: 1rem 0 0.45rem;
  color: var(--agent-text);
  letter-spacing: -0.015em;
}

.document-page__content h1 {
  font-size: 1.15rem;
}

.document-page__content h2 {
  font-size: 1rem;
}

.document-page__content h3 {
  font-size: 0.92rem;
}

.document-page__content table {
  margin: 0.9rem 0;
}

.document-row-menu,
.document-menu {
  position: relative;
  align-self: center;
  justify-self: center;
}

.document-row-menu summary,
.document-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 8px;
  color: var(--agent-muted);
  cursor: pointer;
  list-style: none;
  line-height: 0;
}

.document-menu__icon {
  display: block;
  width: 16px;
  height: 16px;
}

.document-row-menu summary::-webkit-details-marker,
.document-menu summary::-webkit-details-marker {
  display: none;
}

.document-row-menu summary:hover,
.document-menu summary:hover {
  background: var(--agent-hover);
  color: var(--agent-text);
}

/* Panels are re-positioned to position: fixed by row_menu_controller.js when
   opened so they escape scrollable ancestors; these coordinates are the
   no-JS fallback. */
.document-row-menu__panel,
.document-menu__panel {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  z-index: 60;
  min-width: 10rem;
  padding: 0.35rem;
  border: 1px solid var(--agent-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(16 24 40 / 0.12);
}

.document-row-menu__panel a,
.document-menu__panel a {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 7px;
  color: var(--agent-text);
  font-size: 0.74rem;
  font-weight: 600;
}

.document-row-menu__panel a:hover,
.document-menu__panel a:hover {
  background: var(--agent-hover);
}

.document-row-menu__panel .is-danger,
.document-menu__panel .is-danger {
  color: var(--destructive);
}

.document-viewer-panel {
  /* Keep variable-height navigation and document controls in normal flow;
     the shared shell body is the only element that grows and scrolls. */
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: var(--agent-surface);
}

.document-viewer__topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.1rem 0.25rem;
}

.document-viewer__title {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.document-viewer__title > strong,
.document-viewer__filename {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.document-viewer__title strong {
  color: var(--agent-text);
  font-size: 0.9rem;
}

.document-viewer__title-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
  color: var(--agent-muted);
  font-size: 0.68rem;
  line-height: 1.35;
  white-space: nowrap;
}

.document-viewer__filename {
  min-width: 0;
  flex: 0 1 auto;
}

.document-viewer__status {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 1.1rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
}

.document-viewer__tabsbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  padding: 0 1.1rem;
  border-bottom: 1px solid var(--agent-line);
}

.document-viewer__tabs {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  min-width: 0;
}

.document-viewer__tab {
  padding: 0.55rem 0 0.45rem;
  border-bottom: 2px solid transparent;
  color: var(--agent-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.document-viewer__tab.is-active {
  border-bottom-color: #2b5cb8;
  color: var(--agent-text);
}

.document-viewer__share {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 0.45rem;
  padding-bottom: 0.55rem;
  color: var(--agent-muted);
  font-size: 0.65rem;
  font-weight: 500;
  white-space: nowrap;
}

@container sidepanel (max-width: 390px) {
  .document-viewer__share-label {
    display: none;
  }
}

.document-viewer__body {
  min-height: 0;
  overflow: auto;
  padding: var(--panel-body-top) var(--panel-body-x) var(--panel-body-bottom);
}

.document-viewer__body--original {
  padding: 0;
}

.document-original-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: calc(100dvh - 11rem);
  border: 0;
  background: var(--agent-bg);
}

.document-image-viewer {
  height: 100%;
  min-height: calc(100dvh - 11rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #0f172a;
}

.document-image-viewer__toolbar {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem;
  background: rgb(15 23 42 / 0.92);
}

.document-image-viewer__toolbar button {
  min-width: 2rem;
  height: 1.7rem;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 7px;
  background: rgb(255 255 255 / 0.08);
  color: #fff;
  font-size: 0.72rem;
}

.document-image-viewer__stage {
  min-height: 0;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.document-image-viewer__image {
  max-width: 100%;
  transform-origin: center center;
  transition: transform 0.15s ease;
}

.document-page--compact {
  padding: 0.9rem;
  border-radius: 10px;
}

.workspace-meetings__layout {
  max-width: 70rem;
  margin: 1.5rem auto 0;
  display: grid;
  grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
  gap: 1rem;
}

.workspace-meetings__list,
.workspace-meeting-detail,
.workspace-meeting-form {
  border: 1px solid var(--agent-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.06);
}

.workspace-meetings__list {
  min-height: 28rem;
  overflow: hidden;
}

.workspace-meetings__list-header,
.workspace-meeting-detail__header,
.workspace-meeting-content__header,
.workspace-meeting-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.workspace-meetings__list-header {
  padding: 1rem;
  border-bottom: 1px solid var(--agent-line);
}

.workspace-meetings__list-header h2,
.workspace-meeting-detail h2,
.workspace-meeting-content h3 {
  margin: 0;
  color: var(--agent-text);
}

.workspace-meetings__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--agent-line);
  border-radius: 9999px;
  background: #fff;
  color: var(--agent-text);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.workspace-meetings__button--primary {
  border-color: #2b5cb8;
  background: #2b5cb8;
  color: #fff;
}

.workspace-meetings__button:hover {
  border-color: #c7ced8;
  background: #f5f7f9;
}

.workspace-meetings__button--primary:hover {
  border-color: #244f9f;
  background: #244f9f;
}

.workspace-meetings__button--danger {
  border-color: #f3d3d3;
  color: #b3423f;
}

.workspace-meetings__items {
  display: grid;
}

.workspace-meeting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--agent-line);
  color: inherit;
  text-decoration: none;
}

.workspace-meeting-row.is-active {
  background: #f6f8fc;
}

.workspace-meeting-row__main {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.workspace-meeting-row__title {
  color: var(--agent-text);
  font-size: 0.86rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-meeting-row__meta,
.workspace-meeting-row__status,
.workspace-meetings__empty,
.workspace-meeting-detail__eyebrow,
.workspace-meeting-detail p,
.workspace-meeting-detail dt,
.workspace-meeting-form p {
  color: var(--agent-muted);
  font-size: 0.72rem;
}

.workspace-meeting-row__status {
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: #eef2ff;
  color: #2b5cb8;
  font-weight: 700;
}

.workspace-meetings__empty {
  margin: 0;
  padding: 1rem;
}

.workspace-meetings-panel__header {
  display: flex;
  justify-content: flex-end;
  padding: 0 0.25rem 0.75rem;
}

.workspace-meetings-panel__section + .workspace-meetings-panel__section {
  margin-top: 1rem;
}

.workspace-meetings-panel__heading {
  margin: 0 0 0.5rem;
  color: var(--agent-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workspace-meetings-panel__list {
  overflow: hidden;
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  background: #fff;
}

.workspace-meetings-panel__list .workspace-meeting-row:last-child {
  border-bottom: 0;
}

.workspace-meetings-panel__empty {
  margin: 0;
  color: var(--agent-muted);
  font-size: 0.75rem;
}

.workspace-meeting-row--live {
  background: #fff7f7;
}

.workspace-meeting-row__live-pill {
  display: inline-flex;
  align-items: center;
  margin-right: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.workspace-meetings-panel__detail .workspace-meeting-detail {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0.25rem 0 0;
}

.workspace-meetings-panel {
  gap: 0;
}

.workspace-meetings-explorer {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.workspace-meetings-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.95rem 0.45rem;
}

.workspace-meetings-new-menu {
  position: relative;
  flex: none;
}

.workspace-meetings-new-menu > summary {
  gap: 0.35rem;
  height: 2rem;
  min-height: 2rem;
  padding-inline: 0.75rem;
  border-radius: 9px;
  list-style: none;
}

.workspace-meetings-new-menu > summary::-webkit-details-marker {
  display: none;
}

.workspace-meetings-new-menu > summary svg {
  width: 0.75rem;
  height: 0.75rem;
  transition: transform 0.15s ease;
}

.workspace-meetings-new-menu[open] > summary svg {
  transform: rotate(180deg);
}

.workspace-meetings-new-menu__popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.4rem);
  right: 0;
  width: min(15rem, calc(100vw - 2rem));
  padding: 0.35rem;
  border: 1px solid var(--agent-line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(16 24 40 / 0.14);
}

.workspace-meetings-new-menu__popover :is(a, button) {
  display: grid;
  width: 100%;
  gap: 0.1rem;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--agent-text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.workspace-meetings-new-menu__popover :is(a, button):hover {
  background: var(--agent-hover);
}

.workspace-meetings-new-menu__popover strong {
  font-size: 0.76rem;
  font-weight: 650;
}

.workspace-meetings-new-menu__popover span {
  color: var(--agent-muted);
  font-size: 0.66rem;
}

.workspace-meetings-filterbar {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  padding: 0 0.25rem 0.6rem;
  border-bottom: 1px solid var(--agent-line);
  overflow-x: auto;
  overflow-y: hidden;
}

.workspace-meetings-filterbar__link {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 1.7rem;
  padding: 0 0.55rem;
  border-radius: 8px;
  color: var(--agent-muted);
  font-size: 0.7rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.workspace-meetings-filterbar__link:hover {
  background: var(--agent-hover);
  color: var(--agent-text);
}

.workspace-meetings-filterbar__link.is-active {
  background: var(--agent-hover);
  color: var(--agent-text);
}

.workspace-meetings-panel__groups {
  display: grid;
  min-height: 0;
  flex: 1;
  gap: 1rem;
  padding: 0.85rem var(--panel-body-x) var(--panel-body-bottom);
  overflow-y: auto;
}

.workspace-meetings-panel__section[hidden],
.meetings-row[hidden] {
  display: none;
}

.workspace-meetings-panel__section + .workspace-meetings-panel__section {
  margin-top: 0;
}

.workspace-meetings-panel__heading {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
  color: var(--agent-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workspace-meetings-panel__heading span {
  color: var(--agent-faint);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0;
}

.workspace-meetings-panel__list {
  display: grid;
  gap: 0.45rem;
  overflow: visible;
  border: 0;
  background: transparent;
}

.workspace-meetings-empty {
  display: grid;
  justify-items: center;
  margin: 1rem 0.25rem;
  padding: 2.25rem 1.25rem;
  border: 1px dashed #dce1e7;
  border-radius: 14px;
  background: var(--agent-card);
  text-align: center;
}

.workspace-meetings-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.7rem;
  border-radius: 10px;
  background: #eef2f7;
  color: #62708a;
}

.workspace-meetings-empty__icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.workspace-meetings-empty h2 {
  margin: 0;
  color: var(--agent-text);
  font-size: 0.9rem;
  font-weight: 700;
}

.workspace-meetings-empty p {
  max-width: 24rem;
  margin: 0.4rem 0 0;
  color: var(--agent-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.workspace-meetings-empty > a,
.workspace-meetings-empty--search > button,
.workspace-meetings-empty__text-action {
  margin-top: 0.8rem;
  border: 0;
  background: transparent;
  color: #2b5cb8;
  font-size: 0.72rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.workspace-meetings-empty__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.workspace-meetings-empty__actions .workspace-meetings-empty__text-action {
  margin-top: 0;
}

.meetings-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.meetings-row:hover {
  border-color: #cfd6e0;
  background: var(--agent-sunken);
  box-shadow: 0 1px 3px rgb(16 24 40 / 0.05);
}

.meetings-row--live {
  border-color: #fecaca;
  background: #fff7f7;
  box-shadow: 0 0 0 1px #fee2e2;
}

.meetings-row__link {
  min-width: 0;
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.meetings-row__platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: #eef2f7;
  color: #61708a;
}

.meetings-row__platform-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.meetings-row__platform-icon--zoom {
  background: #edf3ff;
  color: #2d6cdf;
}

.meetings-row__platform-icon--google_meet {
  background: #eef8f2;
  color: #23845b;
}

.meetings-row__platform-icon--teams {
  background: #f0effb;
  color: #5b5fc7;
}

.meetings-row__main {
  min-width: 0;
  display: grid;
  gap: 0.22rem;
}

.meetings-row__title-line,
.meetings-row__meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.meetings-row__title {
  min-width: 0;
  overflow: hidden;
  color: var(--agent-text);
  font-size: 0.82rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meetings-row__meta {
  color: var(--agent-muted);
  font-size: 0.69rem;
}

.meetings-row__meta-item {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meetings-row__meta-item + .meetings-row__meta-item::before {
  content: "·";
  margin-right: 0.35rem;
  color: #c4cad1;
}

.meetings-row__artifacts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.meetings-row__artifact {
  display: inline-flex;
  align-items: center;
  min-height: 1.15rem;
  padding: 0 0.35rem;
  border-radius: 5px;
  background: #f1f4f7;
  color: #58667c;
  font-size: 0.61rem;
  font-weight: 650;
}

.meetings-row__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.75rem;
  padding: 0 0.6rem;
  border: 1px solid #dce1e8;
  border-radius: 8px;
  background: #fff;
  color: #445064;
  font-size: 0.68rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.meetings-row__action:hover {
  border-color: #c6ced9;
  background: #f5f7f9;
  color: var(--agent-text);
}

.meetings-row__action--primary {
  border-color: #2b5cb8;
  background: #2b5cb8;
  color: #fff;
}

.meetings-row__action--primary:hover {
  border-color: #244f9f;
  background: #244f9f;
  color: #fff;
}

.meetings-row__menu {
  display: flex;
  align-items: center;
}

@container sidepanel (max-width: 420px) {
  .meetings-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .meetings-row__platform-icon {
    display: none;
  }

  .meetings-row__artifacts {
    display: none;
  }
}

@container sidepanel (max-width: 340px) {
  .workspace-meetings-new-menu > summary {
    padding-inline: 0.6rem;
  }

  .meetings-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .meetings-row__action {
    display: none;
  }
}

.meetings-status {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: capitalize;
}

.meetings-status--neutral {
  background: var(--agent-hover);
  color: var(--agent-body);
}

.meetings-status--info {
  background: #dbeafe;
  color: #1d4ed8;
}

.meetings-status--warning {
  background: #fef3c7;
  color: #b45309;
}

.meetings-status--danger {
  background: #fee2e2;
  color: #b91c1c;
}

.meetings-status--slate {
  background: #f1f5f9;
  color: #334155;
}

.meetings-status--success {
  background: #dcfce7;
  color: #047857;
}

.meetings-live-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.12rem 0.45rem;
  border-radius: 9999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meetings-live-pill__dot {
  position: relative;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 9999px;
  background: #fff;
}

.meetings-live-pill__dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #fff;
  animation: meetings-live-ping 1.3s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes meetings-live-ping {
  75%,
  100% {
    opacity: 0;
    transform: scale(2.4);
  }
}

.meetings-assign {
  position: relative;
}

.meetings-assign__summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.75rem;
  padding: 0.32rem 0.6rem;
  border: 1px solid var(--agent-line);
  border-radius: 9999px;
  background: #fff;
  color: var(--agent-text);
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.meetings-assign__summary::-webkit-details-marker {
  display: none;
}

.meetings-assign--compact .meetings-assign__summary {
  width: 1.75rem;
  padding: 0;
  color: var(--agent-muted);
}

.meetings-assign__menu {
  position: absolute;
  z-index: 10;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 12rem;
  padding: 0.35rem;
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(16 24 40 / 0.14);
}

.meetings-assign__item {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--agent-text);
  font-size: 0.76rem;
  text-align: left;
  cursor: pointer;
}

.meetings-assign__item:hover {
  background: #f6f7f9;
}

.meetings-detail {
  display: grid;
  min-height: 0;
  flex: 1;
  align-content: start;
  gap: 1rem;
  padding:
    var(--panel-body-top)
    var(--panel-body-x)
    var(--panel-body-bottom);
  overflow-y: auto;
}

.meetings-detail__card,
.meetings-detail__content {
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  background: var(--agent-card);
}

.meetings-detail__card {
  padding: 0.95rem;
}

.meetings-detail__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.meetings-detail__title-block {
  min-width: 0;
}

.meetings-detail__title-block h2 {
  margin: 0;
  color: var(--agent-text);
  font-size: 1.05rem;
  line-height: 1.25;
}

.meetings-detail__meta,
.meetings-detail__scope,
.meetings-detail__people {
  color: var(--agent-muted);
  font-size: 0.78rem;
}

.meetings-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-top: 0.45rem;
}

.meetings-detail__people {
  margin: 0.45rem 0 0;
}

.meetings-detail__actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.meetings-detail__icon-button {
  display: grid;
  width: 1.85rem;
  height: 1.85rem;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--agent-muted);
  cursor: pointer;
}

.meetings-detail__icon-button:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.meetings-detail__scope {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.meetings-detail__join-link {
  display: inline-flex;
  margin-top: 0.55rem;
  color: #2b5cb8;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
}

.meetings-detail__error {
  margin-top: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.75rem;
}

.meetings-detail__tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--agent-line);
}

.meetings-detail__tab {
  margin-bottom: -1px;
  padding: 0.55rem 0.65rem;
  border-bottom: 2px solid transparent;
  color: var(--agent-muted);
  font-size: 0.75rem;
  font-weight: 650;
  text-decoration: none;
}

.meetings-detail__tab.is-active {
  border-bottom-color: #2b5cb8;
  color: #2b5cb8;
}

.meetings-detail__tab-body,
.meetings-detail__content {
  display: grid;
  gap: 0.75rem;
}

.meetings-detail__content {
  padding: 0.85rem;
}

.meetings-detail__content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.meetings-detail__content h3 {
  margin: 0;
  color: var(--agent-text);
  font-size: 0.82rem;
}

.meetings-detail__markdown {
  color: var(--agent-text);
  font-size: 0.82rem;
}

.meetings-detail__empty {
  margin: 0;
  color: var(--agent-muted);
  font-size: 0.78rem;
}

.meetings-detail__editor summary {
  color: var(--agent-muted);
  font-size: 0.75rem;
  font-weight: 650;
  cursor: pointer;
}

.meetings-detail__form {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.6rem;
}

.meetings-detail__form textarea {
  width: 100%;
  min-height: 9rem;
  resize: vertical;
  border: 1px solid var(--agent-line);
  border-radius: 10px;
  padding: 0.65rem;
  font: inherit;
}

.meetings-detail__processing {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 2rem 0.5rem;
  color: var(--agent-muted);
  text-align: center;
}

.meetings-detail__processing p {
  margin: 0;
  font-size: 0.78rem;
}

.meetings-detail__spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid #d7dce5;
  border-top-color: #2b5cb8;
  border-radius: 9999px;
  animation: meetings-spin 0.9s linear infinite;
}

@keyframes meetings-spin {
  to {
    transform: rotate(360deg);
  }
}

.meetings-schedule-modal .workspace-meeting-form {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.workspace-meeting-detail {
  padding: 1.25rem;
}

.workspace-meeting-detail__header {
  align-items: flex-start;
  margin-bottom: 1rem;
}

.workspace-meeting-detail__header h2 {
  font-size: 1.25rem;
}

.workspace-meeting-detail__actions {
  display: flex;
  gap: 0.5rem;
}

.workspace-meeting-detail__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.workspace-meeting-detail__facts div {
  padding: 0.75rem;
  border: 1px solid var(--agent-line);
  border-radius: 12px;
}

.workspace-meeting-detail dd {
  margin: 0.2rem 0 0;
  color: var(--agent-text);
  font-size: 0.8rem;
}

.workspace-meeting-detail__error {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: #fff1f2;
  color: #9f1239;
  font-size: 0.78rem;
}

.workspace-meeting-content {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--agent-line);
}

.workspace-meeting-content__raw {
  color: #2b5cb8;
  font-size: 0.72rem;
  font-weight: 700;
}

.workspace-meeting-content__preview {
  max-height: 12rem;
  overflow: auto;
  margin: 0.75rem 0;
  padding: 0.75rem;
  border-radius: 12px;
  background: var(--agent-bg);
  color: var(--agent-text);
  font-family: inherit;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.workspace-meeting-content__form,
.workspace-meeting-form {
  display: grid;
  gap: 0.8rem;
}

.workspace-meeting-content__form textarea,
.workspace-meeting-form input,
.workspace-meeting-form select,
.workspace-meeting-form textarea {
  width: 100%;
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.workspace-meeting-form {
  max-width: 42rem;
  margin: 1.25rem auto 0;
  padding: 1.25rem;
}

.workspace-meeting-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.workspace-meeting-form__field label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--agent-text);
  font-size: 0.76rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .workspace-surface:not(.workspace-surface--session):not(.workspace-surface--optimistic) {
    padding-inline: 0.75rem;
  }

  .workspace-meetings__layout,
  .workspace-meeting-form__grid,
  .workspace-meeting-detail__facts {
    grid-template-columns: 1fr;
  }
}

/* Narrow center pane (side panel open / resized): keep the hero composer from
   feeling inset — less card padding, tighter footer action gaps. */
@container center (max-width: 720px) {
  .workspace-surface:not(.workspace-surface--session):not(.workspace-surface--optimistic) {
    padding-inline: clamp(0.75rem, 3cqw, 1.25rem);
  }

  .workspace-prompt.composer--new {
    padding: 0.85rem 0.85rem 0.55rem;
  }
}

@container center (max-width: 520px) {
  .workspace-surface:not(.workspace-surface--session):not(.workspace-surface--optimistic) {
    padding-inline: 0.75rem;
    padding-block-start: 1.25rem;
  }

  .workspace-prompt.composer--new {
    padding: 0.7rem 0.7rem 0.45rem;
    border-radius: 1rem;
  }
}

.workspace-sidepanel__hint {
  margin: 0 0 12px;
  color: var(--agent-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.workspace-sidepanel__empty {
  padding: 18px 12px;
  color: var(--agent-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

/* Touch devices: hover-revealed affordances stay visible, and small
   menu triggers get comfortable tap targets. */
@media (hover: none) {
  .workspace-session__actions {
    opacity: 1;
  }
}

@media (pointer: coarse) {
  .document-row-menu summary,
  .document-menu summary {
    width: 2rem;
    height: 2rem;
  }
}

/* --- Skill palette (Cmd-K modal, v1 WorkflowPalette port) --- */
.skill-palette-scope {
  display: contents;
}

.skill-palette__overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  animation: nhOverlayIn 0.15s ease both;
}

.skill-palette__overlay[hidden] {
  display: none;
}

.skill-palette {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 58rem;
  height: min(560px, 80vh);
  overflow: hidden;
  background: var(--agent-surface, #fff);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.08),
    0 24px 64px rgba(15, 23, 42, 0.32);
  animation: nhModalIn 0.16s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.skill-palette__search {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid #e5eaf2;
  color: var(--agent-faint);
}

.skill-palette__search input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--agent-text);
}

.skill-palette__search input::placeholder {
  color: var(--agent-faint);
}

.skill-palette__close {
  display: grid;
  place-items: center;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--agent-faint);
  cursor: pointer;
}

.skill-palette__close:hover {
  background: #f1f5f9;
  color: var(--agent-body);
}

.skill-palette__rail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  padding: 10px 8px;
  border-right: 1px solid #e5eaf2;
  background: var(--agent-card);
}

.skill-palette__rail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--agent-muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.skill-palette__rail-item:hover {
  background: #f1f5f9;
}

.skill-palette__rail-item.is-active {
  background: #eef2f7;
  color: var(--agent-text);
  box-shadow: inset 0 0 0 1px #dbe2ee;
}

.skill-palette__rail-count {
  color: var(--agent-faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.skill-palette__body {
  display: grid;
  grid-template-columns: 148px 1fr 300px;
  flex: 1;
  min-height: 0;
}

.skill-palette__list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 8px 0;
  border-right: 1px solid #e5eaf2;
}

.skill-palette__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 16px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}

.skill-palette__row[hidden] {
  display: none;
}

.skill-palette__row.is-focused {
  background: #eef2f7;
}

.skill-palette__row-main {
  display: grid;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.skill-palette__row-title {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--agent-text);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.skill-palette__row-desc {
  overflow: hidden;
  color: var(--agent-faint);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.skill-palette__workflow {
  flex: none;
  color: var(--agent-faint);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.skill-palette__pill {
  flex: none;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.skill-palette__pill--firm {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
}

.skill-palette__pill--mine {
  background: rgba(168, 85, 247, 0.14);
  color: #7e22ce;
}

.skill-palette__chip {
  flex: none;
  align-self: center;
  padding: 1px 6px;
  border-radius: 5px;
  background: #f1f5f9;
  color: var(--agent-faint);
  font-size: 10px;
  font-weight: 500;
}

.skill-palette__empty {
  padding: 48px 24px;
  color: var(--agent-faint);
  font-size: 13px;
  text-align: center;
}

.skill-palette__empty[hidden] {
  display: none;
}

.skill-palette__preview {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 20px;
  background: var(--agent-bg);
}

.skill-palette__preview-placeholder {
  margin: auto;
  color: var(--agent-faint);
  font-size: 13px;
}

.skill-palette__preview-detail {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.skill-palette__preview-detail[hidden] {
  display: none;
}

.skill-palette__preview-title {
  color: var(--agent-text);
  font-size: 15px;
  font-weight: 600;
}

.skill-palette__preview-slash {
  margin-top: 2px;
  color: #2b5cb8;
  font-size: 12px;
}

.skill-palette__preview-desc {
  margin: 10px 0 16px;
  color: var(--agent-body);
  font-size: 13px;
  line-height: 1.5;
}

.skill-palette__preview-label {
  margin-bottom: 4px;
  color: var(--agent-faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skill-palette__preview-excerpt {
  overflow: hidden;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #fff;
  color: var(--agent-body);
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
}

.skill-palette__run-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--agent-blue, #2b5cb8);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.skill-palette__run-button:hover {
  filter: brightness(0.95);
}

.skill-palette__run-button kbd {
  font-family: inherit;
  font-size: 11px;
  opacity: 0.75;
}

.skill-palette__footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
  height: 36px;
  padding: 0 16px;
  border-top: 1px solid #e5eaf2;
  background: var(--agent-card);
  color: var(--agent-faint);
  font-size: 11px;
}

.skill-palette__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.skill-palette__hint kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid #dbe2ee;
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 10px;
}

.skill-palette__footer-count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 860px) {
  .skill-palette__body {
    grid-template-columns: 148px 1fr;
  }

  .skill-palette__preview {
    display: none;
  }
}

@media (max-width: 560px) {
  .skill-palette__body {
    grid-template-columns: 1fr;
  }

  .skill-palette__rail {
    display: none;
  }
}

/* --- Session row action menu (⋮) + sessions page ------------------------- */
/* Mirrors .document-row-menu; panel is re-positioned to position: fixed by
   row_menu_controller.js when opened. */

.session-row-menu {
  position: relative;
  align-self: center;
}

.session-row-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.45rem;
  color: var(--agent-muted);
  cursor: pointer;
  list-style: none;
  line-height: 0;
}

.session-row-menu summary::-webkit-details-marker {
  display: none;
}

.session-row-menu summary:hover {
  background: var(--agent-hover);
  color: var(--agent-text);
}

.session-row-menu__icon {
  display: block;
  width: 16px;
  height: 16px;
}

.session-row-menu__panel {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  z-index: 80;
  min-width: 9rem;
  padding: 0.35rem;
  border: 1px solid var(--agent-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(16 24 40 / 0.12);
}

.session-row-menu__panel a {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 7px;
  color: var(--agent-text);
  font-size: 0.74rem;
  font-weight: 600;
}

.session-row-menu__panel a:hover {
  background: var(--agent-hover);
}

.session-row-menu__panel .is-danger {
  color: var(--destructive);
}

.sessions-page__filters {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.collection-page__header {
  padding: 22px var(--panel-body-x) 4px;
}

.collection-page__header h1 {
  margin: 0;
  color: var(--agent-text);
  font-size: 20px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.collection-page > .workspace-tabs {
  margin-top: 10px;
}

.sessions-page > .workspace-tabs {
  padding-right: var(--panel-body-x);
  padding-left: var(--panel-body-x);
}

.sessions-page > .workspace-session-list {
  padding-right: var(--panel-body-x);
  padding-bottom: var(--panel-body-bottom);
  padding-left: var(--panel-body-x);
}

.sessions-page__filter-group {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem;
  border: 1px solid var(--agent-line);
  border-radius: 999px;
  background: #fff;
}

.sessions-page__pill {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  color: var(--agent-muted);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.sessions-page__pill:hover {
  color: var(--agent-text);
}

.sessions-page__pill.is-active {
  background: var(--agent-hover);
  color: var(--agent-text);
}

.sessions-page__archived-row {
  justify-content: space-between;
}

.sessions-page__archived-row .workspace-session__title {
  color: var(--agent-muted);
}

.sessions-page__unarchive {
  flex: none;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--agent-line);
  border-radius: 8px;
  background: #fff;
  color: var(--agent-text);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.sessions-page__unarchive:hover {
  background: var(--agent-hover);
}

.notifications-page > .notification-history {
  padding-right: var(--panel-body-x);
  padding-left: var(--panel-body-x);
}

.notification-history {
  display: flex;
  flex-direction: column;
}

.notification-history .notification-row {
  min-height: 2.75rem;
  padding: 0.55rem 0.5rem 0.55rem 1.8rem;
  border-bottom: 1px solid var(--agent-line-soft);
  border-radius: 0.5rem;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
}

.notification-history .notification-row__headline {
  min-width: 0;
  overflow: hidden;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-history .notification-row__context {
  flex: none;
  max-width: 48%;
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-history .notification-row.is-unread::before {
  left: 0.8rem;
}

.notification-history__read-all {
  margin-bottom: 8px;
  padding: 6px 10px;
  border: 1px solid var(--agent-line);
  border-radius: 8px;
  background: var(--agent-card);
  color: var(--agent-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.notification-history__read-all:hover {
  background: var(--agent-hover);
  color: var(--agent-text);
}

.notification-history__empty {
  margin-top: 14px;
  padding: 44px 12px;
  border: 1px dashed var(--agent-line);
  border-radius: 12px;
  color: var(--agent-faint);
  font-size: 14px;
  text-align: center;
}

/* Shared explorer chrome
   Files and Meetings use one visual system for the shell, controls, filters,
   colors, and row interaction. Their domain-specific content remains distinct. */
.workspace-explorer-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--agent-surface);
}

.workspace-explorer-panel > .side-panel-header {
  margin: 0;
}

.workspace-explorer-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.95rem 0.45rem;
  background: var(--agent-surface);
}

.clients-panel__identity-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
}

.clients-panel__columns-header {
  padding: 0.42rem 1rem;
  border-top: 1px solid var(--agent-line);
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-sunken);
}

.clients-panel__list {
  background: #fff;
}

.clients-panel__row {
  min-height: 2.85rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--agent-line-soft);
}

.clients-panel__row:hover {
  background: var(--agent-sunken);
}

.people-panel__body {
  min-height: 0;
  overflow-y: auto;
}

.workspace-people-panel .workspace-explorer-filterbar {
  overflow-x: auto;
  scrollbar-width: none;
}

.workspace-people-panel .workspace-explorer-filterbar::-webkit-scrollbar {
  display: none;
}

.workspace-people-panel .workspace-explorer-filter {
  flex: none;
  white-space: nowrap;
}

.people-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(5.5rem, 0.55fr) minmax(0, 1.45fr) 0.9rem;
  align-items: center;
  gap: 0.75rem;
}

.people-panel__columns-header {
  padding: 0.45rem 1rem;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-sunken);
  color: #7b8491;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.015em;
}

.people-panel__group-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2rem;
  margin: 0;
  padding: 0 1rem;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-card);
  color: #8b93a1;
  font-size: 0.67rem;
  font-weight: 760;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.people-panel__group-heading span {
  color: #a5acb7;
  font-weight: 650;
}

.people-panel__row {
  min-height: 3.8rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--agent-line-soft);
  color: var(--agent-text);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.people-panel__row:hover {
  background: var(--agent-sunken);
}

.people-panel__row:focus-visible {
  outline: 2px solid color-mix(in srgb, #2b5cb8 55%, transparent);
  outline-offset: -2px;
}

.people-panel__identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.65rem;
}

.people-panel__avatar {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: none;
  place-items: center;
  border-radius: 999px;
  background: var(--agent-hover);
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
}

.people-panel__identity-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.08rem;
}

.people-panel__identity-copy strong,
.people-panel__identity-copy span,
.people-columns__details {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-panel__identity-copy strong {
  color: #20262e;
  font-size: 0.8rem;
  font-weight: 650;
}

.people-panel__identity-copy span,
.people-columns__details {
  color: var(--agent-muted);
  font-size: 0.71rem;
}

.people-panel__relationship-pill {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  overflow: hidden;
  padding: 0.18rem 0.48rem;
  border: 1px solid #e2e6eb;
  border-radius: 999px;
  background: var(--agent-sunken);
  color: var(--agent-body);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-panel__chevron {
  display: inline-flex;
  color: #c3c9d3;
}

.people-panel__chevron svg {
  width: 0.85rem;
  height: 0.85rem;
}

.people-panel__row:hover .people-panel__chevron {
  color: #8b93a1;
}

.people-panel__footer {
  padding: 0.75rem 1rem 1rem;
  color: var(--agent-faint);
  font-size: 0.7rem;
}

.people-panel__filtered-empty,
.people-panel__search-empty {
  margin: 1rem;
}

.people-panel__search-empty[hidden] {
  display: none;
}

@container sidepanel (max-width: 520px) {
  .people-columns {
    grid-template-columns: minmax(0, 1fr) minmax(5.5rem, 0.55fr) 0.9rem;
  }

  .people-columns__details {
    display: none;
  }
}

@container sidepanel (max-width: 350px) {
  .people-columns {
    grid-template-columns: minmax(0, 1fr) 0.9rem;
  }

  .people-columns__relationship {
    display: none;
  }
}

/* Goals & Events uses the same explorer chrome as People, Files, Meetings,
   and To-Dos; the row grid stays domain-specific for planning data. */
.goals-panel__body {
  min-height: 0;
  overflow-y: auto;
}

.goals-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(5.4rem, 0.58fr) 4.9rem 4.8rem 0.9rem;
  align-items: center;
  gap: 0.65rem;
}

.goals-panel__columns-header {
  padding: 0.45rem 1rem;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-sunken);
  color: #7b8491;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.015em;
}

.goals-columns__amount {
  text-align: right;
}

.goals-panel__group-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2rem;
  margin: 0;
  padding: 0 1rem;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-card);
  color: #8b93a1;
  font-size: 0.67rem;
  font-weight: 760;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.goals-panel__group-heading span {
  color: #a5acb7;
  font-weight: 650;
}

.goals-panel__row {
  min-height: 4.15rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--agent-line-soft);
  color: var(--agent-text);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.goals-panel__row:hover {
  background: var(--agent-sunken);
}

.goals-panel__row:focus-visible {
  outline: 2px solid color-mix(in srgb, #2b5cb8 55%, transparent);
  outline-offset: -2px;
}

.goals-panel__identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.65rem;
}

.goals-panel__icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: none;
  place-items: center;
  border: 1px solid #e4e7ec;
  border-radius: 9px;
  background: var(--agent-sunken);
  color: #667085;
}

.goals-panel__icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.goals-panel__icon--neutral,
.goals-panel__icon--event {
  background: var(--agent-sunken);
  color: var(--agent-muted);
}

.goals-panel__icon--blue {
  background: color-mix(in srgb, var(--agent-blue) 9%, var(--agent-surface));
  color: var(--agent-blue);
}

.goals-panel__icon--green {
  background: var(--agent-green);
  color: var(--agent-green-text);
}

.goals-panel__icon--amber {
  background: #fff3e8;
  color: #925b20;
}

.goals-panel__identity-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.08rem;
}

.goals-panel__identity-copy span,
.goals-columns__target,
.goals-columns__amount {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goals-panel__identity-copy strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #20262e;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.25;
  white-space: normal;
}

.goals-panel__identity-copy span,
.goals-columns__target,
.goals-columns__amount {
  color: var(--agent-muted);
  font-size: 0.7rem;
}

.goals-panel__status {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  overflow: hidden;
  padding: 0.22rem 0.48rem;
  border-radius: 7px;
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goals-panel__status--on-track {
  background: #eaf6ef;
  color: #24613e;
}

.goals-panel__status--in-progress {
  background: #edf2f8;
  color: #3c5069;
}

.goals-panel__status--attention {
  background: #fff3e8;
  color: #925b20;
}

.goals-panel__status--not-started,
.goals-panel__status--event {
  background: var(--agent-hover);
  color: #596270;
}

.goals-panel__chevron {
  display: inline-flex;
  color: #c3c9d3;
}

.goals-panel__chevron svg {
  width: 0.85rem;
  height: 0.85rem;
}

.goals-panel__row:hover .goals-panel__chevron {
  color: #8b93a1;
}

.goals-panel__footer {
  padding: 0.75rem 1rem 1rem;
  color: var(--agent-faint);
  font-size: 0.7rem;
}

.goals-panel__filtered-empty,
.goals-panel__search-empty {
  margin: 1rem;
}

.goals-panel__search-empty[hidden] {
  display: none;
}

@container sidepanel (max-width: 500px) {
  .goals-columns {
    grid-template-columns: minmax(0, 1.45fr) minmax(5.2rem, 0.58fr) 4.7rem 0.9rem;
  }

  .goals-columns__amount {
    display: none;
  }
}

@container sidepanel (max-width: 430px) {
  .goals-columns {
    grid-template-columns: minmax(0, 1fr) minmax(5rem, 0.55fr) 0.9rem;
  }

  .goals-columns__target {
    display: none;
  }
}

@container sidepanel (max-width: 330px) {
  .goals-columns {
    grid-template-columns: minmax(0, 1fr) 0.9rem;
  }

  .goals-columns__status {
    display: none;
  }
}

/* Goal detail is deliberately planning-first instead of inheriting the
   generic record dump: progress, timing, ownership, then supporting evidence. */
.goal-detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem 1rem;
}

.goal-detail__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.15rem 0.1rem 0.25rem;
}

.goal-detail__hero-copy {
  min-width: 0;
}

.goal-detail__eyebrow,
.goal-detail__section-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #657080;
  font-size: 0.65rem;
  font-weight: 760;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.goal-detail__eyebrow svg {
  width: 0.9rem;
  height: 0.9rem;
}

.goal-detail__hero h2 {
  margin: 0.35rem 0 0;
  color: #171b22;
  font-size: 1.22rem;
  font-weight: 680;
  line-height: 1.18;
}

.goal-detail__hero p {
  margin: 0.2rem 0 0;
  color: #4f5967;
  font-size: 0.84rem;
  line-height: 1.35;
}

.goal-detail__chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.goal-detail__status,
.goal-detail__priority {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.12rem 0.48rem;
  border-radius: 7px;
  font-size: 0.67rem;
  font-weight: 650;
  line-height: 1;
}

.goal-detail__status--on-track {
  background: #eaf6ef;
  color: #24613e;
}

.goal-detail__status--in-progress {
  background: #edf2f8;
  color: #3c5069;
}

.goal-detail__status--attention {
  background: #fff0e4;
  color: #92511b;
}

.goal-detail__status--not-started {
  background: var(--agent-hover);
  color: #596270;
}

.goal-detail__priority {
  border: 1px solid #e3e6eb;
  background: #fff;
  color: #667085;
}

.goal-detail__priority--high {
  border-color: #f0d3aa;
  background: #fff8ee;
  color: #8a581d;
}

.goal-detail__priority--low {
  color: #7b8491;
}

.goal-detail__owner {
  color: #2b5cb8;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
}

.goal-detail__owner:hover {
  text-decoration: underline;
}

.goal-detail__owner--static {
  color: #667085;
}

.goal-detail__update {
  flex: none;
}

.goal-detail__funding {
  overflow: hidden;
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  background: #fff;
  padding: 0.75rem 0.85rem 0;
}

.goal-detail__funding-heading {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-top: 0.45rem;
  color: #344054;
  font-size: 0.8rem;
}

.goal-detail__funding-heading strong {
  color: #171b22;
  font-size: 0.95rem;
}

.goal-detail__funding-heading b {
  margin-left: auto;
  color: #273344;
  font-size: 0.78rem;
}

.goal-detail__progress {
  height: 0.42rem;
  margin-top: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf2;
}

.goal-detail__progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2b5cb8;
}

.goal-detail__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0.75rem -0.85rem 0;
  border-top: 1px solid #edf0f3;
}

.goal-detail__metrics > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.62rem 0.4rem 0.7rem;
  border-left: 1px solid #edf0f3;
}

.goal-detail__metrics > div:first-child {
  border-left: 0;
}

.goal-detail__metrics span {
  color: #7b8491;
  font-size: 0.66rem;
}

.goal-detail__metrics strong {
  max-width: 100%;
  overflow: hidden;
  color: #171b22;
  font-size: 0.82rem;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-detail__section h3 {
  margin: 0 0 0.32rem;
  color: var(--agent-body);
  font-size: 0.66rem;
  font-weight: 760;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.goal-detail__plan,
.goal-detail__timeline,
.goal-detail__support-list,
.goal-detail__notes,
.goal-detail__sources {
  overflow: hidden;
  border: 1px solid var(--agent-line);
  border-radius: 10px;
  background: #fff;
}

.goal-detail__plan-row {
  display: grid;
  grid-template-columns: minmax(6rem, 0.45fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--agent-line-soft);
}

.goal-detail__plan-row:first-child {
  border-top: 0;
}

.goal-detail__plan-label {
  color: #7b8491;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.goal-detail__plan-value {
  min-width: 0;
  color: #20262e;
  font-size: 0.75rem;
  font-weight: 550;
}

.goal-detail__plan-value a {
  color: #2b5cb8;
  text-decoration: none;
}

.goal-detail__plan-value a:hover {
  text-decoration: underline;
}

.goal-detail__plan-value small {
  margin-left: 0.45rem;
  color: #8b93a1;
  font-size: 0.67rem;
  font-weight: 450;
}

.goal-detail__timeline-row {
  display: flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  border-top: 1px solid var(--agent-line-soft);
  color: inherit;
  text-decoration: none;
}

.goal-detail__timeline-row:first-child {
  border-top: 0;
}

.goal-detail__timeline-row:hover {
  background: var(--agent-sunken);
}

.goal-detail__timeline-icon {
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
  place-items: center;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: var(--agent-sunken);
  color: #667085;
}

.goal-detail__timeline-icon svg {
  width: 0.9rem;
  height: 0.9rem;
}

.goal-detail__timeline-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 0.08rem;
}

.goal-detail__timeline-copy strong,
.goal-detail__timeline-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-detail__timeline-copy strong {
  color: #20262e;
  font-size: 0.75rem;
  font-weight: 650;
}

.goal-detail__timeline-copy span {
  color: #8b93a1;
  font-size: 0.67rem;
}

.goal-detail__timeline-chevron {
  display: inline-flex;
  flex: none;
  color: #c3c9d3;
}

.goal-detail__timeline-chevron svg {
  width: 0.8rem;
  height: 0.8rem;
}

.goal-detail__support-list > a,
.goal-detail__support-list > div,
.goal-detail__sources > a {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.5rem 0.7rem;
  border-top: 1px solid var(--agent-line-soft);
  color: inherit;
  text-decoration: none;
}

.goal-detail__support-list > :first-child,
.goal-detail__sources > :first-child {
  border-top: 0;
}

.goal-detail__support-list span {
  width: 6.5rem;
  flex: none;
  color: #8b93a1;
  font-size: 0.66rem;
}

.goal-detail__support-list strong,
.goal-detail__sources strong {
  min-width: 0;
  overflow: hidden;
  color: #2b5cb8;
  font-size: 0.73rem;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-detail__notes > div {
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--agent-line-soft);
}

.goal-detail__notes > div:first-child {
  border-top: 0;
}

.goal-detail__notes p {
  margin: 0;
  color: var(--agent-body);
  font-size: 0.74rem;
  line-height: 1.5;
}

.goal-detail__strategy {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--agent-line);
  border-radius: 10px;
  background: #fff;
  color: var(--agent-body);
  font-size: 0.73rem;
  line-height: 1.5;
}

.goal-detail__notes span {
  display: block;
  margin-top: 0.2rem;
  color: var(--agent-faint);
  font-size: 0.65rem;
}

.goal-detail__sources > a {
  align-items: center;
}

.goal-detail__sources > a > span {
  display: inline-flex;
  flex: none;
  color: #94a3b8;
}

.goal-detail__sources svg {
  width: 0.9rem;
  height: 0.9rem;
}

.goal-detail__sources strong.is-dangling {
  color: var(--agent-faint);
}

.goal-detail__footer {
  padding: 0.15rem 0.1rem 0;
  color: var(--agent-faint);
  font-size: 0.66rem;
}

@container sidepanel (max-width: 420px) {
  .goal-detail__hero {
    flex-direction: column;
  }

  .goal-detail__update {
    width: 100%;
  }

  .goal-detail__plan-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .goal-detail__plan-value small {
    display: block;
    margin: 0.15rem 0 0;
  }
}

/* Legal Entities shares the explorer shell while using a structure-aware
   icon, ownership, and status vocabulary. */
.entity-panel__body {
  min-height: 0;
  overflow-y: auto;
}

.entity-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(5.5rem, 0.55fr) minmax(6.5rem, 0.72fr) 4.6rem 0.9rem;
  align-items: center;
  gap: 0.65rem;
}

.entity-panel__columns-header {
  padding: 0.45rem 1rem;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-sunken);
  color: #7b8491;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.015em;
}

.entity-panel__group-heading {
  display: flex;
  min-height: 2rem;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0 1rem;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-card);
  color: #8b93a1;
  font-size: 0.67rem;
  font-weight: 760;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.entity-panel__group-heading span {
  color: #a5acb7;
  font-weight: 650;
}

.entity-panel__row {
  min-height: 3.85rem;
  padding: 0.58rem 1rem;
  border-bottom: 1px solid var(--agent-line-soft);
  color: var(--agent-text);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.entity-panel__row:hover {
  background: var(--agent-sunken);
}

.entity-panel__row:focus-visible {
  outline: 2px solid color-mix(in srgb, #2b5cb8 55%, transparent);
  outline-offset: -2px;
}

.entity-panel__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.65rem;
}

.entity-panel__icon,
.entity-detail__hero-icon {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  flex: none;
  place-items: center;
  border: 1px solid #dfe5ee;
  border-radius: 9px;
  background: #f2f5fa;
  color: #4d6281;
}

.entity-panel__icon svg,
.entity-detail__hero-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.entity-panel__icon--companies {
  border-color: #e1e4ec;
  background: #f4f5f8;
  color: #596578;
}

.entity-panel__icon--partnerships {
  border-color: #e3e1ef;
  background: #f6f4fb;
  color: #655f82;
}

.entity-panel__icon--foundations {
  border-color: #dce9e4;
  background: #f1f7f4;
  color: #4d6f63;
}

.entity-panel__identity-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.08rem;
}

.entity-panel__identity-copy strong,
.entity-panel__identity-copy span,
.entity-columns__type,
.entity-columns__ownership {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-panel__identity-copy strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  color: #20262e;
  font-size: 0.78rem;
  font-weight: 650;
}

.entity-panel__identity-copy span,
.entity-columns__type,
.entity-columns__ownership {
  color: var(--agent-muted);
  font-size: 0.7rem;
}

.entity-panel__status {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
  padding: 0.22rem 0.46rem;
  border-radius: 7px;
  font-size: 0.65rem;
  font-weight: 650;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-panel__status--active {
  background: #eaf6ef;
  color: #24613e;
}

.entity-panel__status--proposed {
  background: #fff3e5;
  color: #925b20;
}

.entity-panel__status--inactive {
  background: #f9ecec;
  color: #8a4047;
}

.entity-panel__status--neutral {
  background: var(--agent-hover);
  color: #596270;
}

.entity-panel__chevron {
  display: inline-flex;
  color: #c3c9d3;
}

.entity-panel__chevron svg {
  width: 0.85rem;
  height: 0.85rem;
}

.entity-panel__row:hover .entity-panel__chevron {
  color: #8b93a1;
}

.entity-panel__footer {
  padding: 0.75rem 1rem 1rem;
  color: var(--agent-faint);
  font-size: 0.7rem;
}

.entity-panel__filtered-empty,
.entity-panel__search-empty {
  margin: 1rem;
}

.entity-panel__search-empty[hidden] {
  display: none;
}

@container sidepanel (max-width: 500px) {
  .entity-columns {
    grid-template-columns: minmax(0, 1.4fr) minmax(5.5rem, 0.55fr) 4.6rem 0.9rem;
  }

  .entity-columns__ownership {
    display: none;
  }
}

@container sidepanel (max-width: 390px) {
  .entity-columns {
    grid-template-columns: minmax(0, 1fr) 4.6rem 0.9rem;
  }

  .entity-columns__type {
    display: none;
  }
}

/* Legal entity detail turns the broad record schema into a focused entity
   profile: identity, review, facts, people, provisions, and held records. */
.entity-detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem 1rem;
}

.entity-detail__hero,
.entity-detail__section,
.entity-detail__history {
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  background: #fff;
}

.entity-detail__hero {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.9rem;
}

.entity-detail__hero-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 11px;
}

.entity-detail__hero-icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.entity-detail__hero-copy {
  min-width: 0;
  flex: 1;
}

.entity-detail__hero h2 {
  margin: 0;
  color: #171b22;
  font-size: 1.08rem;
  font-weight: 680;
  line-height: 1.2;
}

.entity-detail__hero p {
  margin: 0.2rem 0 0;
  color: #667085;
  font-size: 0.74rem;
}

.entity-detail__hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-top: 0.55rem;
  color: #7b8491;
  font-size: 0.67rem;
}

.entity-detail__update {
  flex: none;
}

.entity-detail__review {
  display: flex;
  min-height: 2.5rem;
  align-items: center;
  gap: 0.48rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  background: var(--agent-bg);
  color: #536173;
  font-size: 0.69rem;
}

.entity-detail__review.is-overdue {
  border-color: #f0d6b6;
  background: #fff9f1;
}

.entity-detail__review-icon {
  display: inline-flex;
  color: #5b6d84;
}

.entity-detail__review-icon svg {
  width: 0.9rem;
  height: 0.9rem;
}

.entity-detail__review strong {
  color: #344054;
  font-weight: 650;
}

.entity-detail__review > span:not(.entity-detail__review-icon) {
  color: #8b93a1;
}

.entity-detail__review a {
  margin-left: auto;
  color: #2b5cb8;
  font-weight: 600;
  text-decoration: none;
}

.entity-detail__section {
  overflow: hidden;
}

.entity-detail__section > h3 {
  margin: 0;
  padding: 0.65rem 0.75rem 0.55rem;
  color: #20262e;
  font-size: 0.75rem;
  font-weight: 680;
}

.entity-detail__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 0.75rem 0.65rem;
}

.entity-detail__facts > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.16rem;
  padding: 0 0.65rem;
  border-left: 1px solid #edf0f3;
}

.entity-detail__facts > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.entity-detail__facts span,
.entity-detail__role-group h4 {
  color: #8b93a1;
  font-size: 0.63rem;
  font-weight: 650;
}

.entity-detail__facts strong {
  overflow: hidden;
  color: #20262e;
  font-size: 0.72rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-detail__overview > p {
  margin: 0;
  padding: 0.65rem 0.75rem 0.75rem;
  border-top: 1px solid var(--agent-line-soft);
  color: var(--agent-body);
  font-size: 0.72rem;
  line-height: 1.5;
}

.entity-detail__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.entity-detail__roles {
  grid-column: 1 / -1;
}

.entity-detail__role-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--agent-line-soft);
}

.entity-detail__role-group {
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border-right: 1px solid var(--agent-line-soft);
  border-bottom: 1px solid var(--agent-line-soft);
}

.entity-detail__role-group:nth-child(even) {
  border-right: 0;
}

.entity-detail__role-group h4 {
  margin: 0 0 0.35rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.entity-detail__party {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.48rem;
  padding: 0.24rem 0;
  color: inherit;
  text-decoration: none;
}

.entity-detail__party-avatar {
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  flex: none;
  place-items: center;
  border-radius: 999px;
  background: #eef1f5;
  color: #536173;
  font-size: 0.55rem;
  font-weight: 750;
}

.entity-detail__party > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.entity-detail__party strong,
.entity-detail__party small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-detail__party strong {
  color: #28313d;
  font-size: 0.69rem;
  font-weight: 620;
}

a.entity-detail__party:hover strong {
  color: #2b5cb8;
}

.entity-detail__party small {
  margin-top: 0.05rem;
  color: #8b93a1;
  font-size: 0.61rem;
}

.entity-detail__provision-list,
.entity-detail__holding-list {
  border-top: 1px solid var(--agent-line-soft);
}

.entity-detail__provision-list > div {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.44rem 0.7rem;
  border-top: 1px solid #f5f5f6;
  color: var(--agent-body);
  font-size: 0.68rem;
}

.entity-detail__provision-list > div:first-child {
  border-top: 0;
}

.entity-detail__provision-list span {
  display: inline-flex;
  flex: none;
  color: #2b5cb8;
}

.entity-detail__provision-list svg {
  width: 0.86rem;
  height: 0.86rem;
}

.entity-detail__holding-list > a {
  display: flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-top: 1px solid var(--agent-line-soft);
  color: inherit;
  text-decoration: none;
}

.entity-detail__holding-list > a:first-child {
  border-top: 0;
}

.entity-detail__holding-list > a:hover {
  background: var(--agent-sunken);
}

.entity-detail__holding-icon {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  flex: none;
  place-items: center;
  border: 1px solid #e1e5eb;
  border-radius: 8px;
  background: #f5f7fa;
  color: #58687d;
}

.entity-detail__holding-icon svg {
  width: 0.88rem;
  height: 0.88rem;
}

.entity-detail__holding-list a > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.entity-detail__holding-list strong,
.entity-detail__holding-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-detail__holding-list strong {
  color: #28313d;
  font-size: 0.68rem;
  font-weight: 620;
}

.entity-detail__holding-list small {
  color: #8b93a1;
  font-size: 0.6rem;
}

.entity-detail__holding-list b {
  flex: none;
  color: #667085;
  font-size: 0.62rem;
  font-weight: 600;
}

.entity-detail__notes > div {
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--agent-line-soft);
}

.entity-detail__notes p {
  margin: 0;
  color: var(--agent-body);
  font-size: 0.71rem;
  line-height: 1.5;
}

.entity-detail__notes span {
  display: block;
  margin-top: 0.2rem;
  color: var(--agent-faint);
  font-size: 0.62rem;
}

.entity-detail__history {
  overflow: hidden;
}

.entity-detail__history summary {
  display: flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  color: #344054;
  font-size: 0.7rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.entity-detail__history summary::-webkit-details-marker {
  display: none;
}

.entity-detail__history summary svg {
  width: 0.8rem;
  height: 0.8rem;
  transition: transform 0.15s ease;
}

.entity-detail__history[open] summary svg {
  transform: rotate(90deg);
}

.entity-detail__history-body {
  padding: 0.1rem 0.75rem 0.65rem;
  border-top: 1px solid var(--agent-line-soft);
}

.entity-detail__history-body > a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0;
  color: #2b5cb8;
  font-size: 0.67rem;
  text-decoration: none;
}

.entity-detail__history-body > a svg {
  width: 0.8rem;
  height: 0.8rem;
}

.entity-detail__activity {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.entity-detail__activity > span {
  width: 0.35rem;
  height: 0.35rem;
  flex: none;
  margin-top: 0.28rem;
  border-radius: 999px;
  background: #718096;
}

.entity-detail__activity p {
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--agent-body);
  font-size: 0.67rem;
}

.entity-detail__activity small {
  color: var(--agent-faint);
  font-size: 0.6rem;
}

.entity-detail__footer {
  padding: 0 0.1rem;
  color: var(--agent-faint);
  font-size: 0.64rem;
}

@container sidepanel (max-width: 450px) {
  .entity-detail__hero {
    flex-wrap: wrap;
  }

  .entity-detail__update {
    width: 100%;
  }

  .entity-detail__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 0.7rem;
  }

  .entity-detail__facts > div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .entity-detail__grid,
  .entity-detail__role-groups {
    grid-template-columns: 1fr;
  }

  .entity-detail__role-group {
    border-right: 0;
  }

  .entity-detail__review > span:not(.entity-detail__review-icon),
  .entity-detail__review a {
    display: none;
  }
}

/* Financial account detail progressively reveals an operating workspace as
   the side panel grows from standard to expanded and focused modes. */
.account-detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem 1rem;
}

.account-detail__hero,
.account-detail__metrics,
.account-detail__performance,
.account-detail__allocation,
.account-detail__card,
.account-detail__table-card,
.account-detail__history {
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  background: #fff;
}

.account-detail__hero {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.85rem;
}

.account-detail__mark {
  display: grid;
  width: 3rem;
  height: 3rem;
  flex: none;
  place-items: center;
  border: 1px solid #dfe3e8;
  border-radius: 11px;
  background: #f3f5f8;
  color: #536173;
  font-size: 1.25rem;
  font-weight: 700;
}

.account-detail__identity {
  min-width: 0;
  flex: 1;
}

.account-detail__eyebrow {
  color: #8b93a1;
  font-size: 0.6rem;
  font-weight: 760;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.account-detail__identity h2 {
  margin: 0.18rem 0 0;
  color: #171b22;
  font-size: 1.08rem;
  font-weight: 680;
  line-height: 1.2;
}

.account-detail__identity p {
  margin: 0.18rem 0 0;
  color: #667085;
  font-size: 0.71rem;
}

.account-detail__identity-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.32rem 0.58rem;
  margin-top: 0.45rem;
  color: #7b8491;
  font-size: 0.64rem;
}

.account-detail__status {
  display: inline-flex;
  padding: 0.18rem 0.42rem;
  border-radius: 6px;
  background: #eaf6ef;
  color: #24613e;
  font-weight: 650;
}

.account-detail__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.35rem;
}

.account-detail__manage-narrow {
  display: none;
}

.account-detail__pane-action,
.account-detail__table-heading button,
.account-detail__toolbar-menu > summary {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  padding: 0;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #fff;
  color: #647084;
  cursor: pointer;
}

.account-detail__pane-action:hover,
.account-detail__pane-action[aria-pressed="true"],
.account-detail__table-heading button:hover,
.account-detail__toolbar-menu > summary:hover,
.account-detail__toolbar-menu[open] > summary {
  border-color: #b8c4d7;
  background: #f4f7fb;
  color: #2b5cb8;
}

.account-detail__pane-action svg,
.account-detail__table-heading button svg,
.account-detail__toolbar-menu > summary svg {
  width: 0.95rem;
  height: 0.95rem;
}

.account-detail__metrics {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
}

.account-detail__metric {
  display: flex;
  min-width: 0;
  min-height: 4.1rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.6rem 0.72rem;
  border-left: 1px solid #edf0f3;
}

.account-detail__metric:first-child {
  border-left: 0;
}

.account-detail__metric > span,
.account-detail__metric small {
  color: #7b8491;
  font-size: 0.62rem;
}

.account-detail__metric strong {
  overflow: hidden;
  color: #171b22;
  font-size: 0.92rem;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-detail__tone--positive {
  color: #14804a !important;
}

.account-detail__tone--negative {
  color: #b42318 !important;
}

.account-detail__tone--neutral {
  color: #27313f;
}

.account-detail__more-metrics {
  display: none;
}

.account-detail__analysis {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  gap: 0.75rem;
}

.account-detail__performance,
.account-detail__allocation {
  min-width: 0;
  padding: 0.75rem;
}

.account-detail__performance {
  display: flex;
  min-height: 8.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.account-detail__performance h3,
.account-detail__section-heading h3,
.account-detail__card > h3,
.account-detail__table-heading h3 {
  margin: 0;
  color: #20262e;
  font-size: 0.75rem;
  font-weight: 680;
}

.account-detail__performance > div:first-child > span {
  display: block;
  max-width: 20rem;
  margin-top: 0.35rem;
  color: #8b93a1;
  font-size: 0.67rem;
  line-height: 1.45;
}

.account-detail__performance-empty {
  display: grid;
  width: 4rem;
  height: 4rem;
  flex: none;
  place-items: center;
  border-radius: 999px;
  background: #f4f6f9;
  color: #9aa4b2;
}

.account-detail__performance-empty svg {
  width: 1.5rem;
  height: 1.5rem;
}

.account-detail__section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.account-detail__section-heading a {
  color: #2b5cb8;
  font-size: 0.66rem;
  font-weight: 600;
  text-decoration: none;
}

.account-detail__allocation-bar {
  display: flex;
  height: 0.58rem;
  margin-top: 0.8rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--agent-hover);
  gap: 2px;
}

.account-detail__allocation-bar > span {
  min-width: 3px;
}

.account-detail__allocation-color--1 {
  background: #2867d7;
}

.account-detail__allocation-color--2 {
  background: #44a77b;
}

.account-detail__allocation-color--3 {
  background: #7770c8;
}

.account-detail__allocation-color--4 {
  background: #e3b72f;
}

.account-detail__allocation-color--5,
.account-detail__allocation-color--6 {
  background: #94a3b8;
}

.account-detail__allocation-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem 0.8rem;
  margin-top: 0.72rem;
}

.account-detail__allocation-legend > div {
  display: grid;
  grid-template-columns: 0.5rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  color: var(--agent-body);
  font-size: 0.64rem;
}

.account-detail__allocation-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
}

.account-detail__allocation-legend strong {
  overflow: hidden;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-detail__allocation-legend b {
  color: #27313f;
  font-weight: 650;
}

.account-detail__allocation-legend small {
  color: #8b93a1;
  font-size: 0.61rem;
}

.account-detail__tabs {
  display: flex;
  min-height: 2.35rem;
  align-items: flex-end;
  gap: 0.25rem;
  overflow-x: auto;
  border-bottom: 1px solid #e9ebef;
  scrollbar-width: none;
}

.account-detail__tabs::-webkit-scrollbar {
  display: none;
}

.account-detail__tab {
  display: inline-flex;
  min-height: 2.2rem;
  flex: none;
  align-items: center;
  gap: 0.32rem;
  padding: 0.35rem 0.65rem;
  border-bottom: 2px solid transparent;
  color: #596579;
  font-size: 0.68rem;
  text-decoration: none;
  white-space: nowrap;
}

.account-detail__tab b {
  display: inline-grid;
  min-width: 1.2rem;
  height: 1.2rem;
  place-items: center;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #f0f2f5;
  color: #667085;
  font-size: 0.58rem;
  font-weight: 650;
}

.account-detail__tab.is-active {
  border-bottom-color: #2b5cb8;
  color: #1e56bd;
  font-weight: 650;
}

.account-detail__tab.is-active b {
  background: #eaf0fb;
  color: #1e56bd;
}

.account-detail__overview-grid,
.account-detail__workspace-grid,
.account-detail__support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.account-detail__workspace-grid {
  grid-template-columns: minmax(0, 1fr) 16rem;
}

.account-detail__workspace-main,
.account-detail__workspace-aside {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.75rem;
}

.account-detail__card,
.account-detail__table-card {
  min-width: 0;
  overflow: hidden;
}

.account-detail__card > h3,
.account-detail__table-heading,
.account-detail__settings > .account-detail__section-heading {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #edf0f3;
}

.account-detail__details > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.46rem 0.75rem;
  border-top: 1px solid var(--agent-line-soft);
}

.account-detail__details > div:first-child {
  border-top: 0;
}

.account-detail__details span {
  color: #7b8491;
  font-size: 0.63rem;
}

.account-detail__details strong {
  min-width: 0;
  overflow: hidden;
  color: #27313f;
  font-size: 0.67rem;
  font-weight: 580;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-detail__readiness > div {
  padding: 0.35rem 0.7rem 0.65rem;
}

.account-detail__readiness > div > span {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0;
  color: var(--agent-body);
  font-size: 0.67rem;
}

.account-detail__readiness svg {
  width: 0.8rem;
  height: 0.8rem;
  color: #6b7b8f;
}

.account-detail__readiness strong {
  color: #7b8491;
  font-size: 0.62rem;
  font-weight: 560;
}

.account-detail__table-heading {
  display: flex;
  min-height: 3.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.account-detail__table-heading > div:first-child > span {
  display: block;
  margin-top: 0.16rem;
  color: #8b93a1;
  font-size: 0.62rem;
}

.account-detail__table-heading > div:last-child {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.account-detail__toolbar-menu {
  position: relative;
}

.account-detail__toolbar-menu > summary {
  list-style: none;
}

.account-detail__toolbar-menu > summary::-webkit-details-marker {
  display: none;
}

.account-detail__toolbar-menu > div,
.account-detail__toolbar-menu > nav {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 8;
  width: 15rem;
  padding: 0.45rem;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.13);
}

.account-detail__toolbar-menu .workspace-explorer-search {
  width: 100%;
}

.account-detail__holding-filters > nav {
  width: 11rem;
}

.account-detail__holding-filters a {
  display: flex;
  min-height: 2rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.3rem 0.5rem;
  border-radius: 7px;
  color: var(--agent-body);
  font-size: 0.66rem;
  text-decoration: none;
}

.account-detail__holding-filters a:hover,
.account-detail__holding-filters a.is-active {
  background: #f1f4f8;
  color: #285cba;
}

.account-detail__holding-filters b {
  color: #8b93a1;
  font-size: 0.6rem;
}

.account-detail__search-empty[hidden] {
  display: none;
}

.account-detail__search-empty button {
  margin-top: 0.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2b5cb8;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
}

.account-detail__holdings-header,
.account-detail__holding-row,
.account-detail__holdings-total {
  display: grid;
  grid-template-columns: minmax(11rem, 1.5fr) 4.7rem 4.5rem 5.8rem 5.8rem 6.6rem 4.5rem 2.2rem;
  align-items: center;
  gap: 0.45rem;
}

.account-detail__holdings-header {
  min-height: 2rem;
  padding: 0 0.7rem;
  border-bottom: 1px solid #edf0f3;
  background: var(--agent-sunken);
  color: #7b8491;
  font-size: 0.59rem;
  font-weight: 650;
}

.account-detail__holding-row {
  min-height: 3rem;
  padding: 0.35rem 0.7rem;
  border-bottom: 1px solid var(--agent-line-soft);
  color: var(--agent-body);
  font-size: 0.65rem;
  text-decoration: none;
}

.account-detail__holding-row:hover {
  background: var(--agent-sunken);
}

.account-detail__holding-row > strong {
  color: #27313f;
  font-weight: 620;
}

.account-detail__holding-row > span:not(.account-detail__security, .account-detail__chevron) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-detail__holding-row small {
  margin-top: 0.05rem;
  font-size: 0.56rem;
}

.account-detail__security {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}

.account-detail__security b {
  display: inline-grid;
  min-width: 2rem;
  height: 1.55rem;
  place-items: center;
  padding: 0 0.3rem;
  border-radius: 6px;
  background: #eef3fb;
  color: #285cba;
  font-size: 0.6rem;
  font-weight: 720;
}

.account-detail__security > span {
  overflow: hidden;
  color: #27313f;
  font-weight: 580;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-detail__chevron {
  display: inline-flex;
  color: #b6bdc8;
}

.account-detail__chevron svg {
  width: 0.75rem;
  height: 0.75rem;
}

.account-detail__holdings-total {
  min-height: 2.6rem;
  padding: 0.35rem 0.7rem;
  background: var(--agent-sunken);
  color: #27313f;
  font-size: 0.65rem;
}

.account-detail__alternative-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(7rem, 1fr) auto auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-top: 1px solid var(--agent-line-soft);
  color: var(--agent-muted);
  font-size: 0.65rem;
}

.account-detail__alternative-row > strong,
.account-detail__alternative-row b {
  color: #27313f;
}

.account-detail__quick-list > a {
  display: flex;
  min-height: 2.8rem;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem;
  border-top: 1px solid var(--agent-line-soft);
  color: inherit;
  text-decoration: none;
}

.account-detail__quick-list > a:first-child {
  border-top: 0;
}

.account-detail__quick-list > a:hover {
  background: var(--agent-sunken);
}

.account-detail__quick-list > a > svg:first-child {
  flex: none;
  color: #7b8798;
}

.account-detail__quick-list svg {
  width: 0.78rem;
  height: 0.78rem;
}

.account-detail__quick-list a > span {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.account-detail__quick-list strong,
.account-detail__quick-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-detail__quick-list strong {
  color: #27313f;
  font-size: 0.66rem;
  font-weight: 580;
}

.account-detail__quick-list small {
  color: #8b93a1;
  font-size: 0.58rem;
}

.account-detail__narrow-links {
  display: none;
}

.account-detail__activity-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}

.account-detail__activity-summary > div {
  display: flex;
  min-height: 3.7rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--agent-line);
  border-radius: 10px;
  background: #fff;
}

.account-detail__activity-summary span {
  color: #7b8491;
  font-size: 0.61rem;
}

.account-detail__activity-summary strong {
  color: #27313f;
  font-size: 0.84rem;
}

.account-detail__activity-table,
.account-detail__lots-table {
  overflow-x: auto;
}

.account-detail__activity-table > div,
.account-detail__lots-table > div {
  display: grid;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.65rem;
  padding: 0.35rem 0.7rem;
  border-top: 1px solid var(--agent-line-soft);
  color: var(--agent-body);
  font-size: 0.65rem;
}

.account-detail__activity-table > div {
  grid-template-columns: 6rem minmax(10rem, 1fr) 5rem 5rem 7rem 4.5rem;
}

.account-detail__lots-table > div {
  min-width: 42rem;
  grid-template-columns: 6rem 7rem 7rem 7rem 7rem 7rem;
}

.account-detail__activity-table > div:first-child,
.account-detail__lots-table > div:first-child {
  min-height: 2rem;
  border-top: 0;
  background: var(--agent-sunken);
  color: #7b8491;
  font-size: 0.59rem;
  font-weight: 650;
}

.account-detail__activity-table strong,
.account-detail__lots-table strong {
  color: #27313f;
  font-weight: 600;
}

.account-detail__transaction-status {
  display: inline-flex;
  width: fit-content;
  padding: 0.18rem 0.4rem;
  border-radius: 6px;
  background: #eaf6ef;
  color: #24613e;
  font-size: 0.59rem;
  font-weight: 650;
}

.account-detail__transaction-status--pending {
  background: #fff3e5;
  color: #925b20;
}

.account-detail__transaction-status--removed {
  background: var(--agent-hover);
  color: #69717d;
}

.account-detail__empty {
  padding: 1.7rem 1rem;
  text-align: center;
}

.account-detail__empty p {
  margin: 0;
  color: #344054;
  font-size: 0.76rem;
  font-weight: 620;
}

.account-detail__empty span {
  display: block;
  max-width: 24rem;
  margin: 0.3rem auto 0;
  color: #8b93a1;
  font-size: 0.66rem;
  line-height: 1.45;
}

.account-detail__documents > [data-testid="documents-section"] {
  border-radius: 12px;
}

.account-detail__settings {
  max-width: 42rem;
}

.account-detail__notes > div {
  padding: 0.55rem 0.7rem;
  border-top: 1px solid var(--agent-line-soft);
}

.account-detail__notes p {
  margin: 0;
  color: var(--agent-body);
  font-size: 0.67rem;
  line-height: 1.45;
}

.account-detail__notes span {
  display: block;
  margin-top: 0.18rem;
  color: var(--agent-faint);
  font-size: 0.58rem;
}

.account-detail__footer {
  padding: 0 0.1rem;
  color: var(--agent-faint);
  font-size: 0.62rem;
}

@container sidepanel (max-width: 700px) {
  .account-detail__manage-wide,
  .account-detail__pane-action--focus {
    display: none;
  }

  .account-detail__manage-narrow {
    display: inline;
  }

  .account-detail__metrics {
    grid-template-columns: 1.3fr 1fr 0.9fr;
  }

  .account-detail__metric--basis,
  .account-detail__metric--weight {
    display: none;
  }

  .account-detail__more-metrics {
    display: block;
    grid-column: 1 / -1;
    border-top: 1px solid #edf0f3;
  }

  .account-detail__more-metrics summary {
    padding: 0.48rem 0.72rem;
    color: #2b5cb8;
    font-size: 0.63rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }

  .account-detail__more-metrics > div {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
    padding: 0 0.72rem 0.65rem;
  }

  .account-detail__more-metrics > div > span {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    color: #7b8491;
    font-size: 0.62rem;
  }

  .account-detail__more-metrics strong {
    color: #27313f;
  }

  .account-detail__analysis {
    grid-template-columns: 1fr;
  }

  .account-detail__performance {
    display: none;
  }

  .account-detail__allocation-legend small {
    display: none;
  }

  .account-detail__allocation-legend > div {
    grid-template-columns: 0.5rem minmax(0, 1fr) auto;
  }

  .account-detail__overview-grid,
  .account-detail__workspace-grid,
  .account-detail__support-grid {
    grid-template-columns: 1fr;
  }

  .account-detail__workspace-aside {
    display: none;
  }

  .account-detail__holdings-header,
  .account-detail__holding-row,
  .account-detail__holdings-total {
    grid-template-columns: minmax(0, 1fr) 5.6rem 5.6rem 4.1rem 0.7rem;
    gap: 0.35rem;
  }

  .account-col--price,
  .account-col--quantity,
  .account-col--basis {
    display: none !important;
  }

  .account-detail__security b {
    min-width: 2.1rem;
  }

  .account-detail__narrow-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .account-detail__narrow-links > a {
    display: grid;
    min-height: 2.8rem;
    grid-template-columns: minmax(0, 1fr) auto 0.8rem;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--agent-line);
    border-radius: 10px;
    background: #fff;
    color: inherit;
    text-decoration: none;
  }

  .account-detail__narrow-links strong {
    color: #27313f;
    font-size: 0.68rem;
  }

  .account-detail__narrow-links span {
    color: #7b8491;
    font-size: 0.62rem;
  }

  .account-detail__narrow-links svg {
    width: 0.75rem;
    height: 0.75rem;
    color: #a1a9b5;
  }

  .account-detail__activity-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .account-detail__activity-summary > div:nth-child(4),
  .account-detail__activity-summary > div:nth-child(5) {
    display: none;
  }

  .account-detail__activity-table > div {
    grid-template-columns: 5rem minmax(0, 1fr) 4.5rem 6rem 4rem;
  }

  .account-activity-col--security {
    display: none;
  }
}

@container sidepanel (max-width: 480px) {
  .account-detail__hero {
    flex-wrap: wrap;
  }

  .account-detail__actions {
    width: 100%;
    padding-left: 3.8rem;
  }

  .account-detail__metrics {
    grid-template-columns: 1.2fr 1fr;
  }

  .account-detail__metric--cash {
    display: none;
  }

  .account-detail__holdings-header,
  .account-detail__holding-row,
  .account-detail__holdings-total {
    grid-template-columns: minmax(0, 1fr) 5.2rem 4.2rem 0.7rem;
  }

  .account-detail__holding-row > :nth-child(6),
  .account-detail__holdings-header > :nth-child(6),
  .account-detail__holdings-total > :nth-child(6) {
    display: none;
  }

  .account-detail__activity-table > div {
    grid-template-columns: 4.5rem minmax(0, 1fr) 5.8rem 4rem;
  }

  .account-detail__activity-table > div > :nth-child(3) {
    display: none;
  }
}

/* Private markets explorer: portfolio economics stay dense at expanded widths
   and collapse to fund identity, NAV, and TVPI in the standard side panel. */
.privates-panel__filterbar {
  overflow-x: auto;
  scrollbar-width: none;
}

.privates-panel__filterbar::-webkit-scrollbar {
  display: none;
}

.privates-panel__filterbar .workspace-explorer-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.privates-panel__filterbar b {
  color: #98a1ae;
  font-size: 0.58rem;
  font-weight: 650;
}

.privates-panel__filterbar .is-active b {
  color: inherit;
}

.privates-panel__summary {
  margin-bottom: 0.8rem;
  overflow: hidden;
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  background: #fff;
}

.privates-panel__summary-heading {
  display: flex;
  min-height: 2.2rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--agent-line-soft);
}

.privates-panel__summary-heading span {
  color: #667085;
  font-size: 0.64rem;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.privates-panel__summary-heading strong {
  color: #8b93a1;
  font-size: 0.62rem;
  font-weight: 580;
}

.privates-panel__summary-metrics {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, minmax(0, 1fr));
}

.privates-panel__summary-metrics > div {
  display: flex;
  min-width: 0;
  min-height: 4.5rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.65rem 0.72rem;
  border-left: 1px solid var(--agent-line-soft);
}

.privates-panel__summary-metrics > div:first-child {
  border-left: 0;
}

.privates-panel__summary-metrics span,
.privates-panel__summary-metrics small {
  overflow: hidden;
  color: #8b93a1;
  font-size: 0.59rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.privates-panel__summary-metrics strong {
  overflow: hidden;
  color: #27313f;
  font-size: 0.82rem;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.privates-panel__summary-primary strong {
  color: #171b22;
  font-size: 1.05rem;
}

.privates-panel__commitment-bar {
  height: 0.26rem;
  background: #e7edf5;
}

.privates-panel__commitment-bar span {
  display: block;
  height: 100%;
  background: #5379ba;
}

.privates-panel__portfolio {
  overflow: hidden;
  margin-bottom: 0.8rem;
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  background: #fff;
}

.privates-panel__group-heading {
  display: flex;
  min-height: 2rem;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0 0.75rem;
  border-top: 1px solid var(--agent-line);
  border-bottom: 1px solid var(--agent-line-soft);
  background: #fbfcfd;
  color: #7a8492;
  font-size: 0.62rem;
  font-weight: 740;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.privates-panel__group:first-child .privates-panel__group-heading {
  border-top: 0;
}

.privates-panel__group-heading span {
  color: #a1a9b5;
  font-weight: 620;
}

.privates-columns {
  display: grid;
  grid-template-columns: minmax(12rem, 1.5fr) minmax(7rem, 0.8fr) 3.4rem 5.5rem 5rem 5.5rem 3.5rem 0.7rem;
  align-items: center;
  gap: 0.55rem;
}

.privates-panel__columns-header {
  min-height: 1.9rem;
  padding: 0 0.75rem;
  border-bottom: 1px solid var(--agent-line-soft);
  background: #fff;
  color: #8b93a1;
  font-size: 0.58rem;
  font-weight: 680;
}

.privates-panel__columns-header > span:not(:first-child) {
  text-align: right;
}

.privates-panel__row {
  min-height: 3.6rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--agent-line-soft);
  color: #657083;
  font-size: 0.64rem;
  text-decoration: none;
}

.privates-panel__row:hover {
  background: var(--agent-sunken);
}

.privates-panel__row > span:not(:first-child),
.privates-panel__row > strong {
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.privates-panel__row > strong {
  display: flex;
  flex-direction: column;
  color: #20262e;
  font-size: 0.7rem;
  font-weight: 660;
}

.privates-panel__row > strong small {
  margin-top: 0.08rem;
  color: #8b93a1;
  font-size: 0.55rem;
  font-weight: 540;
}

.privates-panel__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.6rem;
}

.privates-panel__icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: none;
  place-items: center;
  border-radius: 8px;
  background: #edf3fb;
  color: #3f68a8;
}

.privates-panel__icon--venture {
  background: #eaf6ef;
  color: #28734f;
}

.privates-panel__icon--private_credit {
  background: #fff4e6;
  color: #a26016;
}

.privates-panel__icon--real_assets {
  background: #f0ecfa;
  color: #6853a5;
}

.privates-panel__icon--hedge_fund {
  background: #edf0f4;
  color: #526173;
}

.privates-panel__icon svg {
  width: 0.9rem;
  height: 0.9rem;
}

.privates-panel__identity-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.12rem;
}

.privates-panel__identity-copy strong,
.privates-panel__identity-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.privates-panel__identity-copy strong {
  color: #20262e;
  font-size: 0.7rem;
  font-weight: 640;
}

.privates-panel__identity-copy small {
  color: #8b93a1;
  font-size: 0.57rem;
}

.privates-panel__chevron {
  display: inline-flex;
  justify-content: flex-end;
  color: #b6bdc8;
}

.privates-panel__chevron svg {
  width: 0.72rem;
  height: 0.72rem;
}

.privates-panel__footer {
  padding: 0.55rem 0.75rem;
  background: #fbfcfd;
  color: #929ba8;
  font-size: 0.59rem;
}

.privates-panel__filtered-empty {
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  background: #fff;
}

@container sidepanel (max-width: 760px) {
  .privates-panel__summary-metrics {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .privates-panel__summary-metrics > div:nth-child(4),
  .privates-panel__summary-metrics > div:nth-child(5) {
    display: none;
  }

  .privates-columns {
    grid-template-columns: minmax(0, 1fr) 5.8rem 4.2rem 0.75rem;
  }

  .privates-col--strategy,
  .privates-col--vintage,
  .privates-col--commitment,
  .privates-col--unfunded {
    display: none !important;
  }
}

@container sidepanel (max-width: 480px) {
  .privates-panel__summary-metrics {
    grid-template-columns: 1.2fr 1fr;
  }

  .privates-panel__summary-metrics > div:nth-child(3) {
    display: none;
  }

  .privates-columns {
    grid-template-columns: minmax(0, 1fr) 5.6rem 0.75rem;
  }

  .privates-col--multiple {
    display: none !important;
  }
}

/* Private investment detail */
.private-detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem 1rem;
}

.private-detail__hero,
.private-detail__metrics,
.private-detail__card {
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  background: #fff;
}

.private-detail__hero {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.85rem;
}

.private-detail__mark {
  display: grid;
  width: 3rem;
  height: 3rem;
  flex: none;
  place-items: center;
  border: 1px solid #d8e2f1;
  border-radius: 11px;
  background: #edf3fb;
  color: #3f68a8;
}

.private-detail__mark svg {
  width: 1.25rem;
  height: 1.25rem;
}

.private-detail__identity {
  min-width: 0;
  flex: 1;
}

.private-detail__eyebrow {
  color: #768399;
  font-size: 0.6rem;
  font-weight: 760;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.private-detail__identity h2 {
  margin: 0.18rem 0 0;
  color: #171b22;
  font-size: 1.08rem;
  font-weight: 680;
  line-height: 1.2;
}

.private-detail__identity p {
  margin: 0.18rem 0 0;
  color: #667085;
  font-size: 0.71rem;
}

.private-detail__identity-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.32rem 0.58rem;
  margin-top: 0.45rem;
  color: #7b8491;
  font-size: 0.64rem;
}

.private-detail__status {
  display: inline-flex;
  padding: 0.18rem 0.42rem;
  border-radius: 6px;
  background: #eaf6ef;
  color: #24613e;
  font-weight: 650;
}

.private-detail__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.35rem;
}

.private-detail__manage-narrow {
  display: none;
}

.private-detail__metrics {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
}

.private-detail__metric {
  display: flex;
  min-width: 0;
  min-height: 4.1rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.6rem 0.72rem;
  border-left: 1px solid var(--agent-line-soft);
}

.private-detail__metric:first-child {
  border-left: 0;
}

.private-detail__metric span,
.private-detail__metric small {
  overflow: hidden;
  color: #7b8491;
  font-size: 0.61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-detail__metric strong {
  overflow: hidden;
  color: #171b22;
  font-size: 0.9rem;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-detail__more-metrics {
  display: none;
}

.private-detail__overview-grid,
.private-detail__workspace-grid,
.private-detail__support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.private-detail__workspace-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
}

.private-detail__support-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.private-detail__card {
  min-width: 0;
  overflow: hidden;
}

.private-detail__card > h3,
.private-detail__section-heading {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--agent-line-soft);
}

.private-detail__card > h3,
.private-detail__section-heading h3 {
  margin: 0;
  color: #20262e;
  font-size: 0.72rem;
  font-weight: 680;
}

.private-detail__section-heading {
  display: flex;
  min-height: 3.4rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.private-detail__section-heading > div > span {
  display: block;
  margin-top: 0.15rem;
  color: #8b93a1;
  font-size: 0.6rem;
}

.private-detail__section-heading > strong {
  color: #27313f;
  font-size: 0.78rem;
  font-weight: 680;
}

.private-detail__progress,
.private-detail__value-bar {
  display: flex;
  height: 0.65rem;
  margin: 1rem 0.75rem 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e6edf6;
}

.private-detail__progress > span {
  background: #4d73b2;
}

.private-detail__value-bar {
  gap: 2px;
  background: #edf0f4;
}

.private-detail__value-bar span:first-child {
  background: #4d73b2;
}

.private-detail__value-bar span:last-child {
  background: #55a47c;
}

.private-detail__progress-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.7rem 0.75rem 0.8rem;
}

.private-detail__progress-legend > span {
  display: grid;
  grid-template-columns: 0.45rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
  color: #687386;
  font-size: 0.62rem;
}

.private-detail__progress-legend i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: #4d73b2;
}

.private-detail__progress-legend span:nth-child(2) i {
  background: #cbd6e4;
}

.private-detail__value-card .private-detail__progress-legend span:nth-child(2) i {
  background: #55a47c;
}

.private-detail__progress-legend b {
  font-weight: 560;
}

.private-detail__progress-legend strong {
  color: #27313f;
  font-weight: 650;
}

.private-detail__details > div {
  display: flex;
  min-height: 2.35rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.75rem;
  border-top: 1px solid var(--agent-line-soft);
}

.private-detail__details > div:first-child {
  border-top: 0;
}

.private-detail__details span {
  color: #7b8491;
  font-size: 0.63rem;
}

.private-detail__details strong,
.private-detail__details a {
  min-width: 0;
  overflow: hidden;
  color: #27313f;
  font-size: 0.67rem;
  font-weight: 590;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-detail__details a {
  color: #2b5cb8;
  text-decoration: none;
}

.private-detail__multiples > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.private-detail__multiples > div > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.75rem;
  border-left: 1px solid var(--agent-line-soft);
}

.private-detail__multiples > div > span:first-child {
  border-left: 0;
}

.private-detail__multiples b,
.private-detail__multiples small {
  color: #8b93a1;
  font-size: 0.57rem;
}

.private-detail__multiples strong {
  color: #27313f;
  font-size: 0.9rem;
  font-weight: 680;
}

.private-detail__multiples p {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid var(--agent-line-soft);
  color: #8b93a1;
  font-size: 0.61rem;
  line-height: 1.45;
}

.private-detail__readiness-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.private-detail__readiness-grid > span {
  display: grid;
  min-width: 0;
  min-height: 4.1rem;
  grid-template-columns: 0.9rem minmax(0, 1fr);
  align-content: center;
  gap: 0.14rem 0.35rem;
  padding: 0.55rem 0.65rem;
  border-left: 1px solid var(--agent-line-soft);
}

.private-detail__readiness-grid > span:first-child {
  border-left: 0;
}

.private-detail__readiness-grid svg {
  width: 0.8rem;
  height: 0.8rem;
  color: var(--agent-muted);
}

.private-detail__readiness-grid b,
.private-detail__readiness-grid strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-detail__readiness-grid b {
  color: var(--agent-muted);
  font-size: 0.59rem;
  font-weight: 560;
}

.private-detail__readiness-grid strong {
  grid-column: 1 / -1;
  color: var(--agent-body);
  font-size: 0.64rem;
  font-weight: 650;
}

.private-detail__readiness > p {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-top: 1px solid var(--agent-line-soft);
  color: var(--agent-muted);
  font-size: 0.59rem;
  line-height: 1.45;
}

.private-detail__freshness,
.private-detail__history-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0.18rem 0.42rem;
  border-radius: 6px;
  background: var(--agent-hover);
  color: var(--agent-body);
  font-size: 0.58rem;
  font-weight: 650;
  white-space: nowrap;
}

.private-detail__freshness--current {
  background: #eaf6ef;
  color: #24613e;
}

.private-detail__freshness--review {
  background: #fff3e5;
  color: #925b20;
}

.private-detail__freshness--stale {
  background: #fff1f2;
  color: #be123c;
}

.private-detail__freshness-text--current {
  color: #24613e !important;
}

.private-detail__freshness-text--review {
  color: #925b20 !important;
}

.private-detail__freshness-text--stale {
  color: #be123c !important;
}

.private-detail__performance-summary,
.private-detail__cash-summary {
  display: grid;
  overflow: hidden;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  background: var(--agent-card);
}

.private-detail__performance-summary > div,
.private-detail__cash-summary > div {
  display: flex;
  min-width: 0;
  min-height: 4.25rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.65rem 0.75rem;
  border-left: 1px solid var(--agent-line-soft);
}

.private-detail__performance-summary > div:first-child,
.private-detail__cash-summary > div:first-child {
  border-left: 0;
}

.private-detail__performance-summary span,
.private-detail__performance-summary small,
.private-detail__cash-summary span,
.private-detail__cash-summary small {
  overflow: hidden;
  color: var(--agent-muted);
  font-size: 0.59rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-detail__performance-summary strong,
.private-detail__cash-summary strong {
  overflow: hidden;
  color: var(--agent-text);
  font-size: 0.9rem;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-detail__cash-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.private-detail__nav-chart {
  padding: 0.85rem 0.75rem 0.65rem;
}

.private-detail__nav-chart svg {
  display: block;
  width: 100%;
  height: 7.25rem;
  color: var(--agent-line-soft);
}

.private-detail__nav-chart line {
  stroke: currentColor;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.private-detail__nav-chart polyline {
  stroke: #4d73b2;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.private-detail__nav-chart > div {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  color: var(--agent-muted);
  font-size: 0.58rem;
}

.private-detail__chart-empty {
  padding: 1.7rem 1rem;
  color: var(--agent-muted);
  font-size: 0.68rem;
  text-align: center;
}

.private-detail__history-table > div {
  display: grid;
  min-height: 3rem;
  grid-template-columns: minmax(9rem, 1.35fr) repeat(5, minmax(4.5rem, 0.72fr)) minmax(5.2rem, 0.65fr);
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.75rem;
  border-top: 1px solid var(--agent-line-soft);
  color: var(--agent-body);
  font-size: 0.63rem;
}

.private-detail__history-table > div:first-child {
  min-height: 2rem;
  border-top: 0;
  background: var(--agent-sunken);
  color: var(--agent-muted);
  font-size: 0.57rem;
  font-weight: 650;
}

.private-detail__history-table > div > strong {
  color: var(--agent-text);
  font-weight: 650;
}

.private-detail__history-source {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.1rem;
}

.private-detail__history-source strong,
.private-detail__history-source small,
.private-detail__history-source a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-detail__history-source strong {
  color: var(--agent-text);
  font-size: 0.64rem;
}

.private-detail__history-source small,
.private-detail__history-source a {
  color: var(--agent-muted);
  font-size: 0.56rem;
}

.private-detail__performance-empty {
  display: flex;
  min-height: 9rem;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
}

.private-detail__performance-empty > span {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  place-items: center;
  border-radius: 10px;
  background: var(--agent-soft);
  color: var(--agent-muted);
}

.private-detail__performance-empty svg {
  width: 1.15rem;
  height: 1.15rem;
}

.private-detail__performance-empty > div {
  min-width: 0;
  flex: 1;
}

.private-detail__performance-empty h3 {
  margin: 0;
  color: var(--agent-text);
  font-size: 0.76rem;
}

.private-detail__performance-empty p {
  max-width: 36rem;
  margin: 0.25rem 0 0;
  color: var(--agent-muted);
  font-size: 0.65rem;
  line-height: 1.5;
}

.private-detail__performance-empty > a {
  flex: none;
  color: #2b5cb8;
  font-size: 0.64rem;
  font-weight: 650;
  text-decoration: none;
}

.private-detail__overview-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.private-detail__overview-links > a {
  display: flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--agent-line);
  border-radius: 10px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.private-detail__overview-links a:hover {
  background: var(--agent-sunken);
}

.private-detail__overview-links a > span {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.private-detail__overview-links strong {
  color: #27313f;
  font-size: 0.68rem;
}

.private-detail__overview-links small {
  color: #8b93a1;
  font-size: 0.59rem;
}

.private-detail__overview-links svg {
  width: 0.75rem;
  height: 0.75rem;
  color: #a1a9b5;
}

.private-detail__activity-table {
  overflow-x: auto;
}

.private-detail__activity-table > div {
  display: grid;
  min-width: 42rem;
  min-height: 2.7rem;
  grid-template-columns: 7rem minmax(8rem, 1fr) 8rem minmax(8rem, 1fr) 7rem;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.75rem;
  border-top: 1px solid var(--agent-line-soft);
  color: #667085;
  font-size: 0.65rem;
}

.private-detail__activity-table > div:first-child {
  min-height: 2rem;
  border-top: 0;
  background: var(--agent-sunken);
  color: #7b8491;
  font-size: 0.59rem;
  font-weight: 650;
}

.private-detail__activity-table strong {
  color: #27313f;
  font-weight: 620;
}

.private-detail__empty {
  padding: 2rem 1rem;
  text-align: center;
}

.private-detail__empty p {
  margin: 0;
  color: #344054;
  font-size: 0.76rem;
  font-weight: 620;
}

.private-detail__empty span {
  display: block;
  max-width: 25rem;
  margin: 0.3rem auto 0;
  color: #8b93a1;
  font-size: 0.66rem;
  line-height: 1.45;
}

.private-detail__support-grid > .private-detail__card > h3 {
  border-bottom: 1px solid var(--agent-line-soft);
}

.private-detail__footer {
  padding: 0 0.1rem;
  color: var(--agent-faint);
  font-size: 0.62rem;
}

@container sidepanel (max-width: 700px) {
  .private-detail__manage-wide,
  .private-detail__focus {
    display: none;
  }

  .private-detail__manage-narrow {
    display: inline;
  }

  .private-detail__metrics {
    grid-template-columns: 1.25fr 1fr 1fr;
  }

  .private-detail__metric--distributed,
  .private-detail__metric--multiple,
  .private-detail__metric--net_irr {
    display: none;
  }

  .private-detail__more-metrics {
    display: block;
    grid-column: 1 / -1;
    border-top: 1px solid var(--agent-line-soft);
  }

  .private-detail__more-metrics summary {
    padding: 0.48rem 0.72rem;
    color: #2b5cb8;
    font-size: 0.63rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }

  .private-detail__more-metrics > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0 0.72rem 0.65rem;
  }

  .private-detail__more-metrics span {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    color: #7b8491;
    font-size: 0.62rem;
  }

  .private-detail__more-metrics strong {
    color: #27313f;
  }

  .private-detail__overview-grid,
  .private-detail__workspace-grid,
  .private-detail__support-grid {
    grid-template-columns: 1fr;
  }

  .private-detail__overview-links {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .private-detail__readiness-grid,
  .private-detail__performance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .private-detail__readiness-grid > span:nth-child(odd),
  .private-detail__performance-summary > div:nth-child(odd) {
    border-left: 0;
  }

  .private-detail__readiness-grid > span:nth-child(n + 3),
  .private-detail__performance-summary > div:nth-child(n + 3) {
    border-top: 1px solid var(--agent-line-soft);
  }

  .private-detail__history-table > div {
    grid-template-columns: minmax(8rem, 1.3fr) minmax(5.5rem, 0.8fr) minmax(4.2rem, 0.65fr) minmax(4.2rem, 0.65fr) minmax(5rem, 0.65fr);
  }

  .private-history-col--called,
  .private-history-col--distributed {
    display: none;
  }

  .private-detail__activity-table > div {
    min-width: 0;
    grid-template-columns: 5.5rem minmax(0, 1fr) 7rem;
  }

  .private-detail__activity-table > div > :nth-child(3),
  .private-detail__activity-table > div > :nth-child(4) {
    display: none;
  }

  .private-detail__support-grid {
    gap: 0.6rem;
  }
}

@container sidepanel (max-width: 480px) {
  .private-detail__hero {
    flex-wrap: wrap;
  }

  .private-detail__actions {
    width: 100%;
    padding-left: 3.8rem;
  }

  .private-detail__metrics {
    grid-template-columns: 1.2fr 1fr;
  }

  .private-detail__readiness-grid,
  .private-detail__performance-summary,
  .private-detail__cash-summary {
    grid-template-columns: 1fr;
  }

  .private-detail__readiness-grid > span,
  .private-detail__performance-summary > div,
  .private-detail__cash-summary > div {
    min-height: 3.6rem;
    border-top: 1px solid var(--agent-line-soft);
    border-left: 0;
  }

  .private-detail__readiness-grid > span:first-child,
  .private-detail__performance-summary > div:first-child,
  .private-detail__cash-summary > div:first-child {
    border-top: 0;
  }

  .private-detail__history-table > div {
    grid-template-columns: minmax(7.5rem, 1.3fr) minmax(5rem, 0.8fr) minmax(3.8rem, 0.6fr) minmax(4.7rem, 0.65fr);
    gap: 0.4rem;
  }

  .private-history-col--irr {
    display: none;
  }

  .private-detail__performance-empty {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .private-detail__performance-empty > a {
    width: 100%;
    padding-left: 3.55rem;
  }

  .private-detail__metric--called {
    display: none;
  }

  .private-detail__overview-links {
    grid-template-columns: 1fr;
  }
}

.clients-panel__name-header {
  padding-left: 1.75rem;
}

.clients-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.5rem 6.75rem;
}

@container sidepanel (max-width: 420px) {
  .clients-columns {
    grid-template-columns: minmax(0, 1fr) 6.75rem;
  }

  .clients-columns__stage {
    display: none;
  }
}

@container sidepanel (max-width: 300px) {
  .clients-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .clients-columns__activity {
    display: none;
  }
}

.workspace-explorer-search {
  position: relative;
  min-width: 0;
  flex: 1 1 auto;
}

.workspace-explorer-search__icon {
  position: absolute;
  top: 50%;
  left: 0.6rem;
  z-index: 1;
  display: inline-flex;
  color: var(--agent-faint);
  pointer-events: none;
  transform: translateY(-50%);
}

.workspace-explorer-search__icon svg {
  width: 0.9rem;
  height: 0.9rem;
}

.workspace-explorer-search input {
  width: 100%;
  height: 2rem;
  padding: 0 0.65rem 0 1.9rem;
  border: 1px solid var(--agent-line);
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--agent-text);
  font-size: 0.8rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.workspace-explorer-search input::placeholder {
  color: var(--agent-faint);
}

.workspace-explorer-search input:focus {
  border-color: #93aee0;
  box-shadow: 0 0 0 3px rgb(43 92 184 / 0.1);
}

.workspace-explorer-search input:disabled {
  background: #f8f9fb;
  cursor: not-allowed;
}

.workspace-explorer-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.workspace-explorer-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  min-height: 2rem;
  padding: 0 0.7rem;
  border: 1px solid var(--agent-line);
  border-radius: 10px;
  background: #fff;
  color: var(--agent-text);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.workspace-explorer-action:hover {
  border-color: #cbd2dc;
  background: var(--agent-hover);
  color: var(--agent-text);
}

.workspace-explorer-action:focus-visible {
  outline: 2px solid color-mix(in srgb, #2b5cb8 55%, transparent);
  outline-offset: 2px;
}

.workspace-explorer-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.workspace-explorer-action--primary {
  border-color: #2b5cb8;
  background: #2b5cb8;
  color: #fff;
}

.workspace-explorer-action--primary:hover {
  border-color: #244f9f;
  background: #244f9f;
  color: #fff;
}

.workspace-explorer-action--compact {
  height: 1.75rem;
  min-height: 1.75rem;
  padding-inline: 0.6rem;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 650;
}

.workspace-explorer-filterbar {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  padding: 0 0.95rem 0.55rem;
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-surface);
  overflow-x: auto;
  overflow-y: hidden;
}

.workspace-explorer-filter {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 1.7rem;
  padding: 0 0.55rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--agent-muted);
  font-size: 0.7rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.workspace-explorer-filter:hover {
  background: var(--agent-hover);
  color: var(--agent-text);
}

.workspace-explorer-filter.is-active {
  background: var(--agent-hover);
  color: var(--agent-text);
}

.workspace-meetings-panel .workspace-meetings-panel__groups {
  gap: 0.8rem;
  padding: 0.75rem 0.95rem 1.5rem;
}

.workspace-meetings-panel .workspace-meetings-panel__list {
  gap: 0.1rem;
}

.workspace-meetings-panel .workspace-meetings-empty {
  margin: 1rem 0.95rem;
  border-color: var(--agent-line);
  background: #fff;
}

.workspace-meetings-panel .workspace-meetings-empty[hidden] {
  display: none;
}

.workspace-meetings-panel .workspace-meetings-empty__icon {
  background: var(--agent-hover);
  color: var(--agent-muted);
}

.workspace-meetings-panel .meetings-row {
  min-height: 3.25rem;
  gap: 0.55rem;
  padding: 0.45rem 0.5rem;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.workspace-meetings-panel .meetings-row:hover {
  border-color: transparent;
  background: var(--agent-hover);
  box-shadow: none;
}

.workspace-meetings-panel .meetings-row--live {
  border: 0;
  background: #fff7f7;
  box-shadow: none;
}

.workspace-meetings-panel .meetings-row__platform-icon {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--agent-muted);
}

.workspace-meetings-panel .meetings-row__platform-icon svg {
  width: 18px;
  height: 18px;
}

.workspace-meetings-panel .meetings-row__main {
  gap: 0.12rem;
}

.workspace-meetings-panel .meetings-row__title {
  font-size: 0.78rem;
}

.workspace-meetings-panel .meetings-row__meta {
  color: var(--agent-muted);
  font-size: 0.62rem;
}

.workspace-meetings-panel .meetings-row__artifact {
  background: var(--agent-hover);
  color: #586274;
}

.workspace-meetings-panel .meetings-row__action {
  color: var(--agent-text);
}

.workspace-meetings-panel .meetings-row__action--primary {
  color: #fff;
}

/* Shared To-Dos explorer */
.workspace-pane__body--explorer {
  padding: 0;
  background: var(--agent-surface);
}

.workspace-task-explorer {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  background: var(--agent-surface);
}

.workspace-task-explorer__body {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
}

.task-explorer-create {
  position: relative;
  flex: none;
}

.task-explorer-create > summary {
  list-style: none;
}

.task-explorer-create > summary::-webkit-details-marker {
  display: none;
}

.task-explorer-create__popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.4rem);
  right: 0;
  width: min(22rem, calc(100cqw - 1.9rem));
  padding: 0.75rem;
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(16 24 40 / 0.14);
}

.task-explorer-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.task-explorer-form__field {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
  color: var(--agent-muted);
  font-size: 0.66rem;
  font-weight: 650;
}

.task-explorer-form__field--wide {
  grid-column: 1 / -1;
}

.task-explorer-form__field input,
.task-explorer-form__field select,
.task-explorer-form__field textarea {
  width: 100%;
  min-width: 0;
  min-height: 2rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--agent-line);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--agent-text);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
}

.task-explorer-form__field textarea {
  min-height: 3.5rem;
  resize: vertical;
}

.task-explorer-form__field input:focus,
.task-explorer-form__field select:focus,
.task-explorer-form__field textarea:focus {
  border-color: #93aee0;
  box-shadow: 0 0 0 3px rgb(43 92 184 / 0.1);
}

.task-explorer-form__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  padding-top: 0.1rem;
}

.task-explorer-form__actions--end {
  padding-top: 0;
}

.task-explorer-form__delete {
  margin-top: 0.65rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--destructive);
  font-size: 0.68rem;
  font-weight: 650;
  cursor: pointer;
}

.task-explorer-groups {
  display: grid;
  gap: 0.8rem;
  padding: 0.75rem 0.95rem 1.5rem;
}

.task-explorer-group[hidden],
.task-explorer-row[hidden],
.task-explorer-empty[hidden] {
  display: none;
}

.task-explorer-group__heading {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0 0 0.35rem;
  color: var(--agent-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.task-explorer-group__heading.is-danger {
  color: #b45309;
}

.task-explorer-group__heading span {
  color: var(--agent-faint);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0;
}

.task-explorer-list {
  display: grid;
  gap: 0.1rem;
}

.task-explorer-row {
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  background: #fff;
}

.task-explorer-row:hover,
.task-explorer-row:has(.task-explorer-row__disclosure[open]) {
  background: var(--agent-hover);
}

.task-explorer-row__toggle-form {
  margin-top: 0.32rem;
  line-height: 0;
}

.task-explorer-row__toggle {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  margin-top: 0.12rem;
  padding: 0;
  border: 1.5px solid #c4cad1;
  border-radius: 5px;
  background: #fff;
  color: #fff;
  cursor: pointer;
}

.task-explorer-row__toggle-form .task-explorer-row__toggle {
  margin-top: 0;
}

.task-explorer-row__toggle:hover {
  border-color: #7d8ca2;
}

.task-explorer-row__toggle.is-checked {
  border-color: #1f8a5b;
  background: #1f8a5b;
}

.task-explorer-row__disclosure {
  min-width: 0;
}

.task-explorer-row__summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "text chevron"
    "supporting chevron";
  align-items: center;
  gap: 0.25rem 0.5rem;
  min-width: 0;
  min-height: 2.3rem;
  list-style: none;
  cursor: pointer;
}

.task-explorer-row__summary::-webkit-details-marker {
  display: none;
}

.task-explorer-row__text {
  grid-area: text;
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.task-explorer-row__title {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: var(--agent-text);
  font-size: var(--text-ui-sm);
  font-weight: 650;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-explorer-row.is-done .task-explorer-row__title {
  color: var(--agent-faint);
  text-decoration: line-through;
}

.task-explorer-row__meta {
  min-width: 0;
  display: flex;
  gap: 0.3rem;
  overflow: hidden;
  color: var(--agent-muted);
  font-size: 0.71875rem;
  line-height: 1.4;
  white-space: nowrap;
}

.task-explorer-row__meta-item {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-explorer-row__meta-item--context {
  flex: none;
  max-width: 40%;
}

.task-explorer-row__meta-item--description {
  flex: 1;
}

.task-explorer-row__meta-item + .task-explorer-row__meta-item::before {
  content: "·";
  margin-right: 0.3rem;
  color: #c4cad1;
}

.task-explorer-row__states {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.task-explorer-row__supporting {
  grid-area: supporting;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  min-width: 0;
}

.task-explorer-row__badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.15rem;
  padding: 0 0.35rem;
  border-radius: 5px;
  font-size: 0.65625rem;
  font-weight: 700;
  white-space: nowrap;
}

.task-explorer-row__badge--quiet {
  background: var(--agent-hover);
  color: #667085;
}

.task-explorer-row__badge--info {
  background: #eaf1ff;
  color: #2b5cb8;
}

.task-explorer-row__badge--warning {
  background: #fbf2e6;
  color: #9a6206;
}

.task-explorer-row__badge--danger {
  background: #fff0ed;
  color: #b5473c;
}

.task-explorer-row__badge--client {
  background: #f1edff;
  color: #6546b7;
}

.task-explorer-row__badge--internal {
  background: var(--agent-hover);
  color: #667085;
}

.task-explorer-row__assignee {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  color: #566176;
  font-size: 0.71875rem;
  font-weight: 650;
  white-space: nowrap;
}

.task-explorer-row__assignee-avatar {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  flex: none;
  border-radius: 999px;
  background: #e8edf3;
  font-size: 0.59375rem;
  font-weight: 800;
}

.task-explorer-row__assignee-name {
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-explorer-row__chevron {
  grid-area: chevron;
  display: inline-flex;
  color: #b7bec8;
  transition: transform 0.15s ease;
}

.task-explorer-row__chevron svg {
  width: 0.8rem;
  height: 0.8rem;
}

.task-explorer-row__disclosure[open] .task-explorer-row__chevron {
  transform: rotate(90deg);
}

.task-explorer-row__editor {
  margin-top: 0.45rem;
  padding: 0.75rem 0 0.35rem;
  border-top: 1px solid var(--agent-line);
}

.task-explorer-empty {
  display: grid;
  justify-items: center;
  margin: 1rem 0.95rem;
  padding: 2.25rem 1.25rem;
  border: 1px dashed var(--agent-line);
  border-radius: 14px;
  background: #fff;
  text-align: center;
}

.task-explorer-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.7rem;
  border-radius: 10px;
  background: var(--agent-hover);
  color: var(--agent-muted);
}

.task-explorer-empty__icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.task-explorer-empty h2 {
  margin: 0;
  color: var(--agent-text);
  font-size: 0.9rem;
  font-weight: 700;
}

.task-explorer-empty p {
  max-width: 24rem;
  margin: 0.4rem 0 0;
  color: var(--agent-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.task-explorer-empty > button {
  margin-top: 0.8rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2b5cb8;
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
}

@container sidepanel (max-width: 420px) {
  .task-explorer-row__supporting {
    align-items: flex-start;
    flex-direction: column;
  }
}

@container sidepanel (max-width: 340px) {
  .task-explorer-row__states {
    display: none;
  }

  .task-explorer-form {
    grid-template-columns: 1fr;
  }

  .task-explorer-form__field,
  .task-explorer-form__actions {
    grid-column: 1;
  }
}

/* ── Transition plan (docs/platform/transition-plan.md) ─────────────────
   Roster + derived detail panel. Action-type colors keep v1's grammar:
   ACAT blue · rollover amber · liquidate red · consolidate teal · open
   green · keep/close grey · retitle violet · beneficiary magenta. */

.transition-roster { list-style: none; margin: 0; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.transition-roster__hint { font-size: 12px; color: var(--text-muted, #6b7280); margin-right: auto; }
.transition-roster__row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--border-subtle, #e5e7eb); border-radius: 10px;
  text-decoration: none; color: inherit; background: var(--surface, #fff);
}
.transition-roster__row:hover { border-color: var(--border-strong, #c7cdd6); }
.transition-roster__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.transition-roster__title { font-weight: 600; font-size: 13px; }
.transition-roster__meta { font-size: 11.5px; color: var(--text-muted, #6b7280); }
.transition-roster__pct { font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 600; }
.transition-roster__empty { padding: 24px 18px; font-size: 12.5px; color: var(--text-muted, #6b7280); max-width: 44ch; }
.transition-roster__empty code { font-size: 11.5px; }

.transition-chip {
  font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  background: #eef2f7; color: #52616e;
}
.transition-chip--active { background: #e3edfb; color: #2a5fa8; }
.transition-chip--good { background: #e2f2e2; color: #1b7f1b; }
.transition-chip--crit { background: #fbe5e5; color: #b03434; }
.transition-chip--muted { background: #f0f0ef; color: #8a8a85; }
.transition-chip--neutral { background: #eef2f7; color: #52616e; }

.transition-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--border-subtle, #e9ebee); }
.transition-head__row { display: flex; align-items: center; gap: 10px; }
.transition-head__title { margin: 0; font-size: 15px; }
.transition-progress { margin-top: 10px; }
.transition-progress__bar { display: flex; height: 6px; border-radius: 4px; overflow: hidden; background: #eef0f3; }
.transition-progress__verified { background: #1b9e1b; }
.transition-progress__done { background: #a7d8a7; }
.transition-progress__meta { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-muted, #6b7280); margin-top: 5px; }
.transition-kpis { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 12px 0 2px; padding: 0; }
.transition-kpis div { display: flex; flex-direction: column; }
.transition-kpis dt { font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted, #6b7280); font-weight: 600; }
.transition-kpis dd { margin: 0; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.transition-kpis dd small { display: block; font-size: 10.5px; font-weight: 450; color: var(--text-muted, #6b7280); }
.transition-kpis--tax { padding: 14px 16px 0; }

.transition-callouts { display: flex; flex-direction: column; gap: 6px; padding: 10px 16px 0; }
.transition-callout { display: flex; gap: 8px; align-items: baseline; font-size: 12px; border-radius: 8px; padding: 7px 10px; background: #fbf3df; }
.transition-callout--error { background: #fbe5e5; }
.transition-callout--info { background: #eef2f7; color: var(--text-muted, #6b7280); }
.transition-callout__mark { flex: none; }

.transition-tabs { padding: 10px 16px 0; }

.transition-map { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; padding: 14px 16px 20px; }
.transition-map__arrows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.transition-map__col h4 { margin: 0 0 8px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted, #6b7280); }
.transition-map__cust { margin-bottom: 12px; }
.transition-map__custname { font-size: 11.5px; font-weight: 650; color: #4b5563; margin-bottom: 5px; display: flex; gap: 8px; align-items: baseline; }
.transition-map__custname span { font-weight: 450; color: var(--text-muted, #6b7280); font-size: 10.5px; }
.transition-acct {
  display: block; border: 1px solid var(--border-subtle, #e5e7eb); border-radius: 9px;
  padding: 7px 10px; margin-bottom: 6px; background: var(--surface, #fff);
  text-decoration: none; color: inherit; font-size: 12px;
}
a.transition-acct:hover { border-color: var(--border-strong, #c7cdd6); }
.transition-acct--ghost { border-style: dashed; background: #f7f9fc; }
.transition-acct--ghost em { font-style: normal; font-size: 10px; color: var(--text-muted, #6b7280); }
.transition-acct__row { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.transition-acct__row--meta { margin-top: 2px; justify-content: flex-start; }
.transition-acct__name { font-weight: 600; min-width: 0; }
.transition-acct__val { font-variant-numeric: tabular-nums; color: #4b5563; }
.transition-acct__reg { font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted, #6b7280); }
.transition-verified { font-size: 10px; font-weight: 700; color: #1b7f1b; }
.transition-empty-side { font-size: 12px; color: var(--text-muted, #6b7280); padding: 14px 16px; }

.transition-badge {
  font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 1.5px 7px; border-radius: 999px; white-space: nowrap;
}
.transition-badge--acat_transfer { background: #e3edfb; color: #2a5fa8; }
.transition-badge--rollover { background: #f8ecd2; color: #8f6400; }
.transition-badge--liquidate_transfer { background: #fbe5e5; color: #b03434; }
.transition-badge--consolidate { background: #def1ea; color: #177a58; }
.transition-badge--open_account { background: #e2f2e2; color: #1b7f1b; }
.transition-badge--keep_in_place, .transition-badge--close_account { background: #f0f0ef; color: #6f6f6a; }
.transition-badge--change_registration { background: #eae7f8; color: #4a3aa7; }
.transition-badge--set_beneficiary { background: #f8e4ee; color: #a8477a; }
.transition-badge--missing { background: #fbe5e5; color: #b03434; }

.transition-arrow { fill: none; stroke-width: 1.7; opacity: .75; stroke: #98a1ad; }
.transition-arrow--dashed { stroke-dasharray: 5 4; }
.transition-arrow--acat_transfer { stroke: #2a78d6; }
.transition-arrow--rollover { stroke: #b97f00; }
.transition-arrow--liquidate_transfer { stroke: #cf3d3c; }
.transition-arrow--consolidate { stroke: #178f66; }
.transition-arrow--set_beneficiary { stroke: #c2557f; }
.transition-arrow-dot { stroke: none; fill: #98a1ad; }
circle.transition-arrow--acat_transfer { fill: #2a78d6; }
circle.transition-arrow--rollover { fill: #b97f00; }
circle.transition-arrow--liquidate_transfer { fill: #cf3d3c; }
circle.transition-arrow--consolidate { fill: #178f66; }
circle.transition-arrow--set_beneficiary { fill: #c2557f; }

.transition-phase { padding: 12px 16px 2px; }
.transition-phase__head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.transition-phase__head h4 { margin: 0; font-size: 12px; }
.transition-phase__n { width: 18px; height: 18px; border-radius: 50%; background: #eef0f3; color: #52616e; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.transition-phase__est { font-size: 10.5px; color: var(--text-muted, #6b7280); }
.transition-phase__bar { flex: 1; max-width: 120px; height: 4px; border-radius: 2px; background: #eef0f3; overflow: hidden; }
.transition-phase__bar i { display: block; height: 100%; background: #1b9e1b; }
.transition-phase__frac { font-size: 10.5px; color: #4b5563; font-variant-numeric: tabular-nums; }

.transition-action { border: 1px solid var(--border-subtle, #e5e7eb); border-radius: 9px; margin-bottom: 6px; background: var(--surface, #fff); }
.transition-action summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; font-size: 12px; list-style: none; }
.transition-action summary::-webkit-details-marker { display: none; }
.transition-action__title { font-weight: 600; min-width: 0; flex: 1; }
.transition-action__amt { font-variant-numeric: tabular-nums; color: #4b5563; }
.transition-action__body { padding: 0 10px 10px 36px; font-size: 12px; color: #4b5563; }
.transition-action__body p { margin: 4px 0; }
.transition-action__waiting { color: #b03434; }
.transition-action__chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.transition-action__link { font-size: 11px; margin-left: auto; }
.transition-mchip { font-size: 10px; padding: 2px 8px; border-radius: 999px; background: #eef0f3; color: #52616e; }
.transition-mchip--client { background: #f8e4ee; color: #a8477a; }
.transition-mchip--paper { background: transparent; border: 1px dashed var(--border-subtle, #d5d9df); }

.transition-dot {
  width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid #d0d5dc; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: #fff;
}
.transition-dot--ready { border-color: #2a78d6; }
.transition-dot--in_progress { border-color: #2a78d6; background: #dbe9fb; color: #2a5fa8; }
.transition-dot--done { border-color: #1b9e1b; background: #1b9e1b; }
.transition-dot--verified { border-color: #1b9e1b; background: #1b9e1b; box-shadow: 0 0 0 2.5px #d7eed7; }
.transition-dot--blocked { border-color: #cf3d3c; color: #cf3d3c; }
.transition-dot--cancelled, .transition-dot--skipped { border-style: dashed; }

.transition-docs { list-style: none; margin: 0; padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.transition-doc { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-subtle, #e5e7eb); border-radius: 9px; padding: 8px 10px; font-size: 12px; }
.transition-doc__name { font-weight: 600; }
.transition-doc__for { color: var(--text-muted, #6b7280); font-size: 11px; flex: 1; }
.transition-tax__note { font-size: 12px; color: #4b5563; padding: 0 16px; }

.workspace-transition-detail { container-type: inline-size; }
@container (max-width: 520px) {
  .transition-map { grid-template-columns: 1fr; gap: 14px; }
  .transition-map__arrows { display: none; }
}

/* Work shelf (docs/platform/client-outputs.md) */
.work-shelf__icon { flex: none; width: 26px; height: 26px; border-radius: 7px; background: #eef0f3; display: inline-flex; align-items: center; justify-content: center; color: #52616e; }
.work-shelf__icon .hi { width: 14px; height: 14px; }
.work-shelf__section { padding: 14px 12px 0; }
.work-shelf__section h4 { margin: 0; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted, #6b7280); }
.work-shelf__offer { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed var(--border-subtle, #e5e7eb); border-radius: 10px; }
.work-shelf--quiet .transition-roster__title { font-weight: 550; }
