:root {
  /* ---- Surfaces · Mercury palette (very dark charcoal w/ cool tint) ------- */
  --bg:                #090A0E;          /* page · deepest dark */
  --bg-elev-1:         #0F1114;          /* nav / chrome */
  --bg-elev-2:         #12131A;          /* card */
  --bg-elev-3:         #161821;          /* nested card / hover */
  --bg-input:          #12131A;          /* input field */

  /* ---- Ink (text) · cool near-white scale --------------------------------- */
  --ink:               #E6EEF8;          /* primary · near-white cool */
  --ink-mute:          #9AA0A8;          /* secondary */
  --ink-soft:          #6F7478;          /* tertiary / placeholder */
  --ink-faint:         #26292E;          /* borders */
  --ink-divider:       #1B1E23;          /* very subtle divider */

  /* ---- Mercury blue · primary accent -------------------------------------- */
  --accent:            #5D6BD7;          /* base Mercury indigo */
  --accent-hov:        #6F7DE3;          /* hover · brighter */
  --accent-bright:     #4F7CFF;          /* charts / strokes / vivid moments */
  --accent-soft:       rgba(93, 107, 215, 0.10);
  --accent-ring:       rgba(93, 107, 215, 0.34);

  /* ---- Functional signals (Mercury-aligned) ------------------------------- */
  --signal-pass:       #6EE7B7;          /* mercury green */
  --signal-info:       #4F7CFF;          /* mercury blue bright */
  --signal-warn:       #F0A040;
  --signal-flag:       #B794F4;          /* mercury purple */
  --signal-danger:     #FF7A7A;          /* mercury salmon */
  --signal-pass-bg:    rgba(110, 231, 183, 0.10);
  --signal-info-bg:    rgba(79, 124, 255, 0.10);
  --signal-warn-bg:    rgba(240, 160, 64, 0.10);
  --signal-flag-bg:    rgba(183, 148, 244, 0.10);

  /* ---- Type · Inter Tight — Arcadia-substitute --------------------------- */
  --font-body:         'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:         'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  /* ---- Aliases for newer components ---------------------------------------- */
  --surface:           #12131A;           /* same as --bg-elev-2 · card */
  --surface-2:         #161821;           /* same as --bg-elev-3 · hover */
  --border:            #26292E;           /* same as --ink-faint · subtle border */
  --ink-dim:           #6F7478;           /* same as --ink-soft · tertiary */

  /* ---- Radius / spacing --------------------------------------------------- */
  --r-button:          8px;
  --r-card:            12px;
  --r-firm-card:       8px;
  --r-input:           8px;
  --r-pill:            9999px;

  --section-gap:       72px;
}

/* ============================================================================= */
/* Base                                                                          */
/* ============================================================================= */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  color: inherit;
}

/* Override the browser default italic on <em> — we use it for ACCENT COLOR only */
em {
  font-style: normal;
  color: var(--accent);
  font-weight: inherit;
}

::selection { background: var(--accent); color: #000000; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================================= */
/* Firm header (landing nav)                                                     */
/* ============================================================================= */

.firm-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--ink-faint);
}

.firm-nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 24px;
}

.firm-nav__brand { display: flex; align-items: center; gap: 12px; }

.firm-nav__brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: #000000;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  border-radius: 6px;
  flex-shrink: 0;
}

.firm-nav__brand-text { display: flex; flex-direction: column; gap: 2px; }

.firm-nav__brand-name {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.1;
}

.firm-nav__brand-sub {
  font-size: 10.5px;
  color: var(--ink-mute);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

.firm-nav__links {
  display: flex;
  gap: 30px;
  font-size: 14px;
  color: var(--ink-mute);
}

.firm-nav__links a { padding: 4px 0; transition: color 0.15s; }
.firm-nav__links a:hover { color: var(--ink); }

.firm-nav__lang {
  font-size: 13px;
  color: var(--ink-mute);
  border-left: 1px solid var(--ink-faint);
  padding-left: 18px;
  margin-left: 4px;
}

.firm-nav__cta {
  background: var(--accent);
  color: #000000;
  padding: 10px 18px;
  border-radius: var(--r-button);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background 0.15s ease;
}

.firm-nav__cta:hover { background: var(--accent-hov); }

/* ============================================================================= */
/* Hero / landing                                                                */
/* ============================================================================= */

.hero {
  padding: 72px 0 40px;
  max-width: 820px;
}

.hero__rule {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 24px;
  border-radius: 2px;
}

.hero__eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 28px;
  font-weight: 600;
}

.hero__title {
  font-size: clamp(40px, 5.6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 28px;
  color: var(--ink);
  font-weight: 600;
}

.hero__title em {
  color: var(--accent);
  font-weight: 600;
}

.hero__sub {
  font-size: 17px;
  color: var(--ink-mute);
  max-width: 580px;
  margin: 0 0 40px;
  line-height: 1.6;
}

.hero__stats {
  display: flex;
  gap: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--ink-faint);
  border-bottom: 1px solid var(--ink-faint);
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; gap: 6px; }

.stat__value {
  font-size: 26px;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
  font-weight: 700;
}

.stat__label {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ============================================================================= */
/* Intake form                                                                   */
/* ============================================================================= */

.intake-card {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 36px;
  margin-bottom: 80px;
}

.intake-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink-faint);
  flex-wrap: wrap;
}

.intake-card__title {
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--ink);
  line-height: 1.15;
  font-weight: 600;
}

.intake-card__sub {
  font-size: 13.5px;
  color: var(--ink-mute);
  margin: 0;
}

.onix-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-pill);
  font-size: 10.5px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg-elev-3);
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}

.onix-badge:hover { color: var(--ink); border-color: var(--ink-mute); }

.onix-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-ring);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  background: var(--bg-input);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-input);
  padding: 12px 14px;
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.55;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--ink-soft); }

.submit-row {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--ink-faint);
}

.btn-primary {
  background: var(--accent);
  color: #000000;
  padding: 13px 24px;
  border-radius: var(--r-button);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover { background: var(--accent-hov); }
.btn-primary:active { transform: translateY(1px); }

.submit-meta {
  font-size: 12px;
  color: var(--ink-mute);
  max-width: 420px;
  line-height: 1.55;
}

.submit-meta strong { color: var(--ink); font-weight: 600; }

/* ============================================================================= */
/* Footer (landing)                                                              */
/* ============================================================================= */

.foot {
  border-top: 1px solid var(--ink-faint);
  padding: 32px 0 48px;
  color: var(--ink-mute);
  font-size: 12.5px;
  line-height: 1.7;
}

.foot strong { color: var(--ink); font-weight: 600; }

.foot a {
  color: var(--ink);
  border-bottom: 1px solid var(--ink-faint);
}
.foot a:hover { border-bottom-color: var(--accent); }

.foot__row {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

/* ============================================================================= */
/* Demo — top chrome                                                             */
/* ============================================================================= */

.demo {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.demo-top {
  background: var(--bg-elev-1);
  border-bottom: 1px solid var(--ink-faint);
  padding: 13px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.demo-top__brand { display: flex; align-items: center; gap: 12px; }

.demo-top__brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #000000;
  font-weight: 700;
  font-size: 13px;
  border-radius: 5px;
}

.demo-top__brand-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.01em;
}

.demo-top__brand-sub {
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-left: 1px solid var(--ink-faint);
  padding-left: 10px;
  font-weight: 500;
}

.demo-top__live {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
  color: var(--ink-mute);
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
  color: var(--ink);
  font-weight: 600;
}

.live-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-ring);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.demo-top__intake-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
}

.demo-top__restart, .demo-top__show-summary {
  border: 1px solid var(--ink-faint);
  color: var(--ink-mute);
  padding: 6px 13px;
  border-radius: var(--r-button);
  font-size: 12px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
  background: transparent;
}

.demo-top__restart:hover, .demo-top__show-summary:hover {
  color: var(--ink);
  border-color: var(--ink-mute);
}

.demo-top__show-summary { display: none; }
.demo-top__show-summary.is-visible { display: inline-flex; align-items: center; gap: 4px; }

/* ============================================================================= */
/* Demo — split grid                                                             */
/* ============================================================================= */

.demo-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
  transition: grid-template-columns 0.45s cubic-bezier(.4, 0, .2, 1);
}

/* ----- Fullscreen toggle states ----- */
.demo-grid.is-visitor-full { grid-template-columns: 1fr 0fr; }
.demo-grid.is-visitor-full .demo-col--firm {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.demo-grid.is-firm-full { grid-template-columns: 0fr 1fr; }
.demo-grid.is-firm-full .demo-col--visitor {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.demo-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.demo-col--visitor {
  background: var(--bg-elev-2);
  border-right: 1px solid var(--ink-faint);
}

.demo-grid.is-visitor-full .demo-col--visitor { border-right: none; }

.demo-col--firm {
  background: var(--bg);
}

.col-head {
  padding: 16px 28px;
  border-bottom: 1px solid var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-elev-1);
}

.col-head__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  margin-bottom: 4px;
  font-weight: 600;
}

.col-head__title {
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.15;
  font-weight: 600;
}

.col-head__title em { color: var(--accent); font-weight: 600; }

.col-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scroll-behavior: smooth;
}

/* ============================================================================= */
/* Attorney roster — persistent on firm side                                     */
/* ============================================================================= */

.roster {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-firm-card);
  padding: 14px 16px;
  margin-bottom: 18px;
}

.roster__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink-faint);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  font-weight: 600;
}

.roster__head .roster__title {
  text-transform: none;
  letter-spacing: -0.005em;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

.roster__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.atty {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-firm-card);
  transition: all 0.4s ease;
}

.atty.is-chosen {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 16px var(--accent-ring);
}

.atty.is-faded { opacity: 0.4; }

.atty__head {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 11px;
  color: var(--ink);
  flex-shrink: 0;
  border: 1px solid var(--ink-faint);
  letter-spacing: -0.01em;
}

.atty.is-chosen .atty__head {
  background: var(--accent);
  color: #000000;
  border-color: var(--accent);
}

.atty__body { flex: 1; min-width: 0; }

.atty__name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.atty__title {
  font-size: 10px;
  color: var(--ink-mute);
  margin-bottom: 6px;
}

.atty__title .tier {
  font-family: var(--font-mono);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 5px;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 4px;
  border-radius: 2px;
  font-weight: 500;
}

.atty__load {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--ink-mute);
  font-family: var(--font-mono);
}

.atty__bar {
  flex: 1;
  height: 3px;
  background: var(--ink-faint);
  border-radius: 999px;
  overflow: hidden;
}

.atty__bar-fill {
  height: 100%;
  background: var(--ink-mute);
  transition: background 0.3s;
}

.atty.is-chosen .atty__bar-fill { background: var(--accent); }

/* ============================================================================= */
/* Visitor side — chat bubbles                                                   */
/* ============================================================================= */

.bubble {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(8px);
  animation: bubbleIn 0.42s ease forwards;
}

@keyframes bubbleIn { to { opacity: 1; transform: translateY(0); } }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
  flex-shrink: 0;
  letter-spacing: -0.005em;
}

.avatar--agent {
  background: var(--accent);
  color: #000000;
  border-color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.bubble__body { flex: 1; min-width: 0; }

.bubble__name {
  font-size: 10.5px;
  color: var(--ink-mute);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.bubble__text {
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  padding: 13px 16px;
  border-radius: var(--r-card);
  font-size: 14.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--ink);
}

.bubble--client .bubble__text {
  background: var(--accent-soft);
  border-color: rgba(79,124,255, 0.2);
}

.typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 6px 0;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-mute);
  animation: typingDot 1s infinite;
}

.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-3px); opacity: 1; }
}

/* ============================================================================= */
/* Firm side — event cards                                                       */
/* ============================================================================= */

.event {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-firm-card);
  padding: 16px 18px;
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(8px);
  animation: eventIn 0.45s ease forwards;
}

@keyframes eventIn { to { opacity: 1; transform: translateY(0); } }

.event__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.event__tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 500;
}

.event__title {
  font-size: 14.5px;
  color: var(--ink);
  letter-spacing: -0.005em;
  flex: 1;
  font-weight: 600;
}

.event__rows {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  margin: 0;
}

.event__rows dt {
  color: var(--ink-mute);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 2px;
  font-weight: 600;
}

.event__rows dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.event__lines {
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-mute);
}

.event__lines li {
  list-style: none;
  padding: 3px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.event__lines li::before {
  content: "›";
  color: var(--ink-soft);
  font-weight: 700;
  flex-shrink: 0;
}

/* status pills */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 9.5px;
  font-family: var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.pill--pass    { color: var(--signal-pass); background: var(--signal-pass-bg); }
.pill--info    { color: var(--signal-info); background: var(--signal-info-bg); }
.pill--warn    { color: var(--signal-warn); background: var(--signal-warn-bg); }
.pill--flag    { color: var(--signal-flag); background: var(--signal-flag-bg); }
.pill--high    { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }

.pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* Clickable pill (used to toggle fullscreen for a pane) */
.pill--toggle {
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
}

.pill--toggle:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.pill--toggle:active { transform: translateY(1px); }

.pill__expand {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  margin-left: 2px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.pill--toggle:hover .pill__expand { opacity: 1; }

.pill--toggle.is-active {
  background: var(--accent);
  color: #000000;
  border-color: var(--accent);
}

.pill--toggle.is-active .pill__expand::before {
  content: "⤡";  /* compress icon when in fullscreen */
}

.pill--toggle.is-active .pill__expand {
  display: inline-flex;
}

/* ESC hint shown when fullscreen is active */
.fullscreen-hint {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  color: var(--ink-mute);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.fullscreen-hint.is-visible {
  opacity: 1;
}

.fullscreen-hint kbd {
  font-family: var(--font-mono);
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  color: var(--ink);
  padding: 1px 6px;
  margin: 0 4px;
  border-radius: 3px;
  font-size: 10px;
}

/* extraction (JSON-ish) */

.extract {
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-input);
  padding: 14px 16px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.9;
}

.extract__row { display: flex; gap: 14px; align-items: baseline; }
.extract__key { color: var(--signal-info); min-width: 175px; font-size: 11px; }
.extract__val { color: var(--ink); }
.extract__val.is-flag { color: var(--signal-warn); }
.extract__val.is-high { color: var(--accent); font-weight: 600; }

/* routing — special event card */

.routing__rows { margin-bottom: 12px; }

.routing__algorithm {
  background: var(--bg-elev-3);
  border-left: 2px solid var(--accent);
  padding: 10px 14px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
}

.routing__algorithm-head {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 8px;
}

.routing__algorithm ol, .routing__algorithm ul {
  margin: 0;
  padding: 0;
}

.routing__algorithm li {
  list-style: none;
  padding: 2px 0;
}

/* queue */

.queue { margin: 12px 0 0; padding: 0; list-style: none; }

.queue li {
  display: grid;
  grid-template-columns: 1fr max-content;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-faint);
  align-items: center;
}

.queue li:last-child { border-bottom: 0; }

.queue__name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.queue__name small {
  display: block;
  color: var(--ink-soft);
  font-size: 11.5px;
  margin-top: 3px;
  font-weight: 400;
}

.queue__status {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal-warn);
  font-weight: 700;
}

.queue__footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--ink-faint);
  font-size: 11px;
  color: var(--ink-mute);
  font-family: var(--font-mono);
}

.queue__footer p {
  margin: 4px 0;
  display: flex;
  gap: 6px;
}

.queue__footer p::before { content: "›"; color: var(--ink-soft); }

/* ============================================================================= */
/* Summary overlay (Stage 3) — with exit button                                  */
/* ============================================================================= */

.summary-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.summary-overlay.is-open { opacity: 1; pointer-events: auto; }

.summary {
  position: relative;
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 44px 48px 36px;
  max-width: 560px;
  width: 100%;
  text-align: center;
  transform: translateY(12px);
  transition: transform 0.5s ease;
}

.summary-overlay.is-open .summary { transform: translateY(0); }

.summary__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--ink-faint);
  background: var(--bg-elev-3);
  color: var(--ink-mute);
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-weight: 500;
}

.summary__close:hover {
  background: var(--accent);
  color: #000000;
  border-color: var(--accent);
}

.summary__seal {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  font-weight: 700;
}

.summary__time {
  font-size: 88px;
  line-height: 0.95;
  margin: 0 0 8px;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-weight: 700;
}

.summary__time em { color: var(--accent); font-weight: 700; }

.summary__sub {
  font-size: 14px;
  color: var(--ink-mute);
  margin: 0 0 32px;
}

.summary__list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
}

.summary__list li {
  padding: 11px 0;
  border-bottom: 1px solid var(--ink-faint);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.summary__list li:last-child { border-bottom: 0; }

.summary__check {
  color: var(--signal-pass);
  font-weight: 700;
  font-size: 13px;
}

.summary__compare {
  background: var(--bg-elev-3);
  border-radius: var(--r-card);
  padding: 18px 20px;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--ink-mute);
  line-height: 1.6;
}

.summary__compare strong {
  color: var(--ink);
  font-weight: 600;
}

.summary__compare em {
  color: var(--accent);
  font-weight: 600;
}

.summary__cta {
  display: inline-block;
  background: var(--accent);
  color: #000000;
  padding: 13px 26px;
  border-radius: var(--r-button);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
  transition: background 0.15s ease;
}

.summary__cta:hover { background: var(--accent-hov); }

.summary__contact {
  font-size: 12px;
  color: var(--ink-mute);
}

.summary__contact a {
  color: var(--ink);
  border-bottom: 1px solid var(--ink-faint);
  margin: 0 2px;
}

.summary__contact a:hover { border-bottom-color: var(--accent); }

.summary__explore-hint {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--ink-faint);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.summary__explore-hint strong {
  color: var(--ink-mute);
  font-weight: 600;
}

/* ============================================================================= */
/* Speed toggle                                                                  */
/* ============================================================================= */

.speed-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-mute);
  cursor: pointer;
}

.speed-toggle input { accent-color: var(--accent); }

/* ============================================================================= */
/* Responsive                                                                    */
/* ============================================================================= */

@media (max-width: 1000px) {
  .roster__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .demo-grid {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(50vh, auto) minmax(50vh, auto);
  }
  .demo-col--visitor {
    border-right: none;
    border-bottom: 1px solid var(--ink-faint);
  }
  .field-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 32px; }
  .hero__stats { gap: 24px; }
  .intake-card { padding: 24px; }
  .summary { padding: 32px 22px 28px; }
  .summary__time { font-size: 64px; }
}

@media (max-width: 600px) {
  .firm-nav__links { display: none; }
  .demo-top { padding: 12px 16px; }
  .col-body { padding: 16px; }
  .hero__title { font-size: 36px; }
  .roster__grid { grid-template-columns: 1fr; }
}


/* ============================================================================= */
/* ============================================================================= */
/* ATTORNEY WORKSPACE — Cursor / Codex layout                                     */
/* Left sidebar nav · chat-first main area · clickable matter references         */
/* ============================================================================= */
/* ============================================================================= */

.ws-body {
  overflow: hidden;  /* the shell handles its own scrolling per pane */
}

.ws-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: 100vh;
  width: 100vw;
  background: var(--bg);
  color: var(--ink);
}

/* ============================================================================= */
/* LEFT SIDEBAR                                                                   */
/* ============================================================================= */

.ws-side {
  background: var(--bg-elev-1);
  border-right: 1px solid var(--ink-faint);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 14px 20px;
}

.ws-side::-webkit-scrollbar { width: 8px; }
.ws-side::-webkit-scrollbar-thumb { background: var(--ink-faint); border-radius: 4px; }
.ws-side::-webkit-scrollbar-track { background: transparent; }

/* ----- Brand block ----- */

.ws-side__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 14px;
  border-bottom: 1px solid var(--ink-faint);
}

.ws-side__brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #000000;
  font-weight: 700;
  font-size: 13px;
  border-radius: 5px;
  flex-shrink: 0;
}

.ws-side__brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ws-side__brand-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-side__brand-sub {
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}

/* ----- Attorney switcher ----- */

.ws-switcher { position: relative; }

.ws-switcher > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 6px;
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-button);
  background: var(--bg-elev-2);
  transition: border-color 0.15s, background 0.15s;
}

.ws-switcher > summary::-webkit-details-marker { display: none; }
.ws-switcher > summary:hover { border-color: var(--ink-mute); background: var(--bg-elev-3); }

.ws-switcher__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: -0.005em;
  flex-shrink: 0;
}

.ws-switcher__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.ws-switcher__name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-switcher__title {
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ws-switcher__chevron {
  font-size: 10px;
  color: var(--ink-mute);
}

.ws-switcher__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 30;
  max-height: 360px;
  overflow-y: auto;
}

.ws-switcher__menu-head {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  padding: 6px 10px;
  font-weight: 600;
  border-bottom: 1px solid var(--ink-faint);
  margin-bottom: 4px;
}

.ws-switcher__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 6px;
  transition: background 0.12s;
}

.ws-switcher__opt:hover { background: var(--bg-elev-3); }
.ws-switcher__opt.is-active { background: var(--accent-soft); }

.ws-switcher__opt-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 10.5px;
  color: var(--ink-mute);
  flex-shrink: 0;
}

.ws-switcher__opt.is-active .ws-switcher__opt-avatar {
  background: var(--accent);
  color: #000000;
  border-color: var(--accent);
}

.ws-switcher__opt-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.ws-switcher__opt-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-switcher__opt-title {
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ----- Quick chips block ----- */

.ws-side__chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.ws-chip {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  color: var(--ink);
  padding: 9px 10px;
  border-radius: var(--r-button);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ws-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.ws-chip__count {
  background: var(--ink-faint);
  color: var(--ink);
  border-radius: 8px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.ws-chip:hover .ws-chip__count {
  background: var(--accent);
  color: #000000;
}

/* ----- Sidebar sections ----- */

.ws-side__section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--ink-faint);
}

.ws-side__section--alert {
  border-color: rgba(79,124,255, 0.2);
}

.ws-side__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  font-weight: 600;
}

.ws-side__count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-soft);
  letter-spacing: 0;
  text-transform: none;
}

.ws-side__action {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 10px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0;
  font-family: inherit;
}

.ws-side__action:hover { opacity: 0.8; }

.ws-side__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ws-side__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: background 0.12s, border-color 0.12s;
}

.ws-side__item:hover {
  background: var(--bg-elev-3);
  border-color: var(--ink-faint);
}

.ws-side__item.is-new {
  background: var(--accent-soft);
  border-color: rgba(79,124,255, 0.3);
}

.ws-side__item.is-new:hover {
  background: rgba(79,124,255, 0.14);
}

.ws-side__item--compact { gap: 2px; padding: 6px 10px; }

.ws-side__item-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ws-side__item-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  flex: 1;
  min-width: 0;
}

.ws-side__item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--ink-mute);
}

.ws-side__item-meta strong {
  color: var(--accent);
  font-weight: 600;
}

.ws-side__badge {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.ws-side__badge--new {
  background: var(--accent);
  color: #000000;
}

.ws-side__sev {
  font-size: 9px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 5px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-weight: 600;
}

.ws-side__sev--high { color: var(--accent); }
.ws-side__sev--med  { color: var(--signal-info); }

/* Calendar entries in sidebar (non-clickable) */

.ws-side__list--cal .ws-side__cal {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 10px;
  font-size: 11.5px;
}

.ws-side__cal-time {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-mute);
  white-space: nowrap;
  min-width: 64px;
}

.ws-side__cal-title {
  color: var(--ink);
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

/* ============================================================================= */
/* MAIN CHAT AREA                                                                 */
/* ============================================================================= */

.ws-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.ws-main__head {
  padding: 16px 32px;
  border-bottom: 1px solid var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elev-1);
}

.ws-main__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  margin-bottom: 3px;
  font-weight: 600;
}

.ws-main__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.ws-main__head-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ws-main__home {
  font-size: 12px;
  color: var(--ink-mute);
  padding: 6px 12px;
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-button);
  transition: color 0.15s, border-color 0.15s;
}

.ws-main__home:hover {
  color: var(--ink);
  border-color: var(--ink-mute);
}

/* ----- Chat thread ----- */

.ws-chat {
  flex: 1;
  overflow-y: auto;
  padding: 32px 0 32px;
  scroll-behavior: smooth;
}

.ws-chat .bubble {
  max-width: 760px;
  margin: 0 auto 22px;
  padding: 0 32px;
}

.ws-chat .bubble__text {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  padding: 16px 18px;
  border-radius: var(--r-card);
  font-size: 14.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  color: var(--ink);
}

.ws-chat .bubble--client .bubble__text {
  background: var(--accent-soft);
  border-color: rgba(79,124,255, 0.2);
}

/* Clickable references inside agent responses */

.agent-link {
  color: var(--accent);
  border-bottom: 1px dashed rgba(79,124,255, 0.5);
  padding: 0 2px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  border-radius: 2px;
  font-weight: 500;
}

.agent-link:hover {
  background: var(--accent-soft);
  border-bottom-color: var(--accent);
}

.agent-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ----- Chat input ----- */

.ws-chat__input {
  border-top: 1px solid var(--ink-faint);
  background: var(--bg-elev-1);
  padding: 18px 32px 20px;
}

.ws-chat__input form {
  display: flex;
  gap: 10px;
  max-width: 760px;
  margin: 0 auto;
}

.ws-chat__input input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-input);
  padding: 13px 16px;
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
}

.ws-chat__input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.ws-chat__input input::placeholder { color: var(--ink-soft); }

.ws-chat__input button {
  background: var(--accent);
  color: #000000;
  padding: 12px 22px;
  border-radius: var(--r-button);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}

.ws-chat__input button:hover { background: var(--accent-hov); }

.ws-chat__hint {
  text-align: center;
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

.ws-chat__hint code {
  font-family: var(--font-mono);
  background: var(--bg-elev-3);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--ink-mute);
  font-size: 10.5px;
  margin: 0 2px;
}

/* ============================================================================= */
/* Responsive                                                                    */
/* ============================================================================= */

@media (max-width: 1000px) {
  .ws-shell { grid-template-columns: 260px 1fr; }
}

@media (max-width: 800px) {
  .ws-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .ws-side {
    max-height: 240px;
    border-right: none;
    border-bottom: 1px solid var(--ink-faint);
  }
  .ws-side__chips { grid-template-columns: 1fr 1fr; }
  .ws-main { height: auto; }
  .ws-chat__input { padding: 14px 16px 16px; }
  .ws-chat .bubble { padding: 0 16px; }
}

/* ============================================================================= */
/* ============================================================================= */
/* WORKSPACE VIEWS — Cases, Documents, Inbox, Search, Firm                       */
/* ============================================================================= */
/* ============================================================================= */

/* ---- Sub-nav tabs in workspace main head ---- */
.ws-main__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.ws-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-elev-3);
  padding: 4px;
  border-radius: var(--r-button);
}

.ws-tab {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-mute);
  letter-spacing: -0.005em;
  transition: background 0.15s, color 0.15s;
}

.ws-tab:hover { color: var(--ink); background: var(--bg-elev-2); }

.ws-tab.is-active {
  background: var(--accent);
  color: #000000;
}

/* ---- Search bar in main header ---- */
.ws-search {
  display: flex;
  align-items: center;
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-button);
  padding: 0 2px 0 10px;
  min-width: 260px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ws-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.ws-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  padding: 8px 4px;
  min-width: 0;
}

.ws-search input::placeholder { color: var(--ink-soft); }

.ws-search button {
  background: transparent;
  border: none;
  color: var(--ink-mute);
  font-size: 15px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
}

.ws-search button:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ---- Intro block on chat page ---- */
.ws-main__intro {
  padding: 24px 32px 8px;
  border-bottom: 1px solid var(--ink-faint);
}

.ws-main__intro-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 3px;
}

.ws-main__intro-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ---- Sidebar: anchor variant of items ---- */
.ws-side__item {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.ws-side__item--closed { opacity: 0.65; }
.ws-side__item--closed:hover { opacity: 1; }

.ws-switcher__opt--firm {
  border-top: 1px solid var(--ink-faint);
  margin-top: 4px;
  padding-top: 10px;
}

.ws-switcher__opt--firm .ws-switcher__opt-avatar {
  background: linear-gradient(135deg, var(--accent) 0%, #6F7DE3 100%);
  color: #000000;
  border: none;
}

/* ============================================================================= */
/* CASE DETAIL                                                                   */
/* ============================================================================= */

.case {
  padding: 28px 32px 48px;
  overflow-y: auto;
  flex: 1;
}

.case__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink-faint);
  flex-wrap: wrap;
}

.case__eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 6px;
}

.case__title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.1;
}

.case__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.case__meta-item {
  font-size: 12px;
  color: var(--ink-mute);
}

.case__meta-item strong { color: var(--ink); font-weight: 600; }

.case__tag {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 6px;
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  border-radius: 3px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.case__perm {
  text-align: right;
  font-size: 11px;
  color: var(--ink-mute);
}

.case__perm-label {
  display: block;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.case__perm-value {
  font-family: var(--font-mono);
  color: var(--ink);
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  padding: 3px 9px;
  border-radius: 3px;
  font-size: 11px;
}

.case__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.case__block {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 20px 22px;
}

.case__block--wide { grid-column: 1 / -1; }

.case__block-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.case__block-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 500;
}

.case__block-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 3px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.case__kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  margin: 0;
  font-size: 13px;
}

.case__kv dt {
  color: var(--ink-mute);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  padding-top: 2px;
}

.case__kv dd {
  margin: 0;
  color: var(--ink);
}

.case__sub {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--ink-faint);
}

.case__sub-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 10px;
}

.case__timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.case__timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--ink-faint);
}

.case__timeline li {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 8px 0 8px 26px;
  position: relative;
  font-size: 13px;
}

.case__timeline li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-elev-2);
}

.case__timeline-date {
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 11px;
}

.case__timeline-event { color: var(--ink); }

.case__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.case__table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-weight: 600;
  padding: 6px 12px 10px 0;
  border-bottom: 1px solid var(--ink-faint);
}

.case__table th.num, .case__table td.num { text-align: right; padding-right: 12px; font-family: var(--font-mono); }

.case__table td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--ink-faint);
  color: var(--ink);
}

.case__table tbody tr:last-child td { border-bottom: 0; }

.case__block--notes {
  background: var(--accent-soft);
  border-color: rgba(79,124,255, 0.2);
}

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

.case__notes li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(79,124,255, 0.15);
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.55;
}

.case__notes li:last-child { border-bottom: 0; padding-bottom: 0; }

.case__notes li::before {
  content: "›";
  color: var(--accent);
  font-weight: 700;
  margin-right: 8px;
}

.case__docs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.case__doc {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-firm-card);
  transition: background 0.15s, border-color 0.15s;
}

.case__doc:hover {
  background: var(--bg-elev-2);
  border-color: var(--accent);
}

.case__doc-icon {
  background: var(--accent);
  color: #000000;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  align-self: flex-start;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.case__doc-body { flex: 1; min-width: 0; }

.case__doc-name {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  word-break: break-all;
}

.case__doc-meta {
  display: block;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--ink-mute);
  margin-bottom: 6px;
}

.case__doc-snip {
  display: block;
  font-size: 11.5px;
  color: var(--ink-mute);
  line-height: 1.4;
}

.case__emails {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case__email {
  display: grid;
  grid-template-columns: 200px 1fr max-content;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  padding: 12px;
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-firm-card);
  transition: background 0.15s, border-color 0.15s;
}

.case__email:hover { background: var(--bg-elev-2); border-color: var(--accent); }

.case__email-from {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.case__email-subj {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.case__email-snip {
  grid-column: 1 / -1;
  font-size: 11.5px;
  color: var(--ink-mute);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.case__email-date {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--ink-soft);
  white-space: nowrap;
}

.case__email-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  background: var(--accent);
  color: #000000;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  margin-left: 6px;
}

.case__empty {
  font-size: 12.5px;
  color: var(--ink-soft);
  padding: 12px 0;
}

/* ============================================================================= */
/* DOCUMENTS view                                                                */
/* ============================================================================= */

.docs-view, .inbox-view, .search-view, .doc-view, .email-view {
  padding: 28px 32px 48px;
  overflow-y: auto;
  flex: 1;
}

.docs-view__head, .inbox-view__head, .search-view__head, .doc-view__head, .email-view__head {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ink-faint);
}

.docs-view__eyebrow, .inbox-view__eyebrow, .search-view__eyebrow, .email-view__eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 6px;
}

.docs-view__title, .inbox-view__title, .search-view__title, .email-view__title, .doc-view__title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  color: var(--ink);
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.docs-view__count, .inbox-view__count, .search-view__count {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--ink-soft);
  font-weight: 500;
}

.docs-view__sub, .inbox-view__sub {
  font-size: 14px;
  color: var(--ink-mute);
  margin: 4px 0 0;
  max-width: 720px;
  line-height: 1.5;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.doc-card {
  display: flex;
  gap: 14px;
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 16px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.doc-card:hover {
  background: var(--bg-elev-3);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.doc-card__type {
  background: var(--accent);
  color: #000000;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  align-self: flex-start;
  flex-shrink: 0;
}

.doc-card__body { flex: 1; min-width: 0; }

.doc-card__name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  word-break: break-all;
}

.doc-card__case {
  font-size: 11px;
  color: var(--ink-mute);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.doc-card__snippet {
  font-size: 11.5px;
  color: var(--ink-mute);
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doc-card__meta {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--ink-soft);
  display: flex;
  gap: 6px;
  align-items: center;
}

.doc-card__meta .dot, .doc-view__meta .dot, .doc-view__crumb .dot, .email-view__crumb .dot {
  color: var(--ink-faint);
}

/* ---- Document detail ---- */

.doc-view__crumb, .email-view__crumb {
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.doc-view__crumb a, .email-view__crumb a {
  color: var(--ink);
  border-bottom: 1px dotted var(--ink-faint);
}

.doc-view__crumb a:hover, .email-view__crumb a:hover { border-bottom-color: var(--accent); color: var(--accent); }

.doc-view__meta, .email-view__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 8px;
}

.doc-view__panel {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  overflow: hidden;
}

.doc-view__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-elev-1);
  border-bottom: 1px solid var(--ink-faint);
  font-size: 11px;
}

.doc-view__panel-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
  font-weight: 600;
}

.doc-view__panel-meta {
  font-family: var(--font-mono);
  color: var(--ink-mute);
}

.doc-view__text {
  margin: 0;
  padding: 24px 28px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ============================================================================= */
/* INBOX view                                                                    */
/* ============================================================================= */

.inbox-section {
  margin-bottom: 28px;
}

.inbox-section__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  font-weight: 600;
}

.inbox-section__title { color: var(--ink); }

.inbox-section__count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0;
  text-transform: none;
}

.inbox-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }

.inbox-row {
  display: grid;
  grid-template-columns: 200px 280px 1fr 140px 100px;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-firm-card);
  transition: background 0.12s, border-color 0.12s;
  align-items: center;
}

.inbox-row:hover { background: var(--bg-elev-3); border-color: var(--accent); }

.inbox-row.is-unread { border-left: 3px solid var(--accent); }

.inbox-row--draft { background: var(--accent-soft); border-color: rgba(79,124,255, 0.25); }
.inbox-row--draft:hover { background: rgba(79,124,255, 0.12); }

.inbox-row__from {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.inbox-row__subj {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-row__snip {
  font-size: 11.5px;
  color: var(--ink-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-row__case {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
  font-family: var(--font-mono);
}

.inbox-row__date {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--ink-soft);
  text-align: right;
}

/* ---- Email detail / thread ---- */

.email-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 880px;
}

.email-msg {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 20px 24px;
}

.email-msg.is-focused { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.email-msg.is-draft { background: var(--accent-soft); border-color: rgba(79,124,255, 0.3); }

.email-msg__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
}

.email-msg__from {
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
}

.email-msg__tag {
  background: var(--accent);
  color: #000000;
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.email-msg__date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  margin-left: auto;
}

.email-msg__subj {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink-faint);
}

.email-msg__body {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.6;
  white-space: pre-wrap;
}

.email-msg__actions {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--ink-faint);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: var(--r-button);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.email-msg__hint {
  margin-left: auto;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================================= */
/* SEARCH                                                                        */
/* ============================================================================= */

.search-view__hint {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 4px 0 0;
}

.search-view__hint code {
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  padding: 1px 7px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
  margin: 0 2px;
}

.search-view__title em {
  color: var(--accent);
  font-style: normal;
  font-weight: 700;
}

.search-view__empty {
  font-size: 14px;
  color: var(--ink-mute);
  padding: 24px 0;
}

.search-section { margin-bottom: 28px; }

.search-section__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
  font-weight: 600;
}

.search-section__count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0;
  text-transform: none;
}

.search-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }

.search-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-firm-card);
  transition: background 0.12s, border-color 0.12s;
  align-items: flex-start;
}

.search-row:hover { background: var(--bg-elev-3); border-color: var(--accent); }

.search-row__type {
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

.search-row__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  display: block;
}

.search-row__tag {
  background: var(--accent);
  color: #000000;
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-left: 6px;
}

.search-row__meta {
  font-size: 11.5px;
  color: var(--ink-mute);
  line-height: 1.5;
}

.search-row__snippet {
  color: var(--ink);
  background: var(--accent-soft);
  padding: 2px 4px;
  border-radius: 3px;
}

.search-row__status { font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft); }

/* ============================================================================= */
/* FIRM VIEW                                                                     */
/* ============================================================================= */

.firm-body {
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

.firm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--bg-elev-1);
  border-bottom: 1px solid var(--ink-faint);
}

.firm-top__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.firm-top__brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #000000;
  font-weight: 700;
  font-size: 16px;
  border-radius: 6px;
}

.firm-top__brand-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.firm-top__brand-sub {
  font-size: 10.5px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  margin-top: 2px;
}

.firm-top__right { display: flex; align-items: center; gap: 16px; }

.firm-shell { padding: 32px 32px 48px; max-width: 1480px; margin: 0 auto; }

.firm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 18px 20px;
}

.stat-card__value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card__sub {
  font-size: 16px;
  color: var(--ink-mute);
  margin-left: 2px;
  font-weight: 500;
}

.stat-card__label {
  font-size: 10.5px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.firm-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.firm-panel {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 22px 26px;
}

.firm-panel__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink-faint);
}

.firm-panel__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

.firm-panel__sub {
  font-size: 11.5px;
  color: var(--ink-mute);
}

.firm-roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 12px;
}

.firm-atty {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-firm-card);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.firm-atty:hover {
  background: var(--bg-elev-2);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.firm-atty__head {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #000000;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.firm-atty__body { flex: 1; min-width: 0; }

.firm-atty__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.firm-atty__title {
  font-size: 11px;
  color: var(--ink-mute);
  margin-bottom: 4px;
}

.firm-atty__title .tier {
  font-family: var(--font-mono);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 5px;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
}

.firm-atty__blurb {
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 8px;
  font-style: normal;
}

.firm-atty__load {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

.firm-atty__bar {
  flex: 1;
  height: 3px;
  background: var(--ink-faint);
  border-radius: 999px;
  overflow: hidden;
}

.firm-atty__bar-fill { height: 100%; background: var(--accent); }

.firm-atty__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 10.5px;
  color: var(--ink-mute);
  font-family: var(--font-mono);
}

.firm-atty__stats strong { color: var(--ink); font-weight: 600; }

.firm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.firm-table th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-weight: 600;
  padding: 8px 12px 12px 0;
  border-bottom: 1px solid var(--ink-faint);
}

.firm-table th.num, .firm-table td.num { text-align: right; padding-right: 12px; font-family: var(--font-mono); }

.firm-table td {
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--ink-faint);
  color: var(--ink);
}

.firm-table td a {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px dotted var(--ink-faint);
}

.firm-table td a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.firm-table tbody tr:last-child td { border-bottom: 0; }

/* ============================================================================= */
/* Responsive — workspace views                                                  */
/* ============================================================================= */

@media (max-width: 1100px) {
  .case__grid { grid-template-columns: 1fr; }
  .inbox-row { grid-template-columns: 1fr; gap: 4px; }
  .inbox-row__date { text-align: left; }
  .ws-search { min-width: 200px; }
}

@media (max-width: 800px) {
  .case, .docs-view, .inbox-view, .search-view, .doc-view, .email-view { padding: 20px 16px 32px; }
  .firm-shell { padding: 20px 16px 32px; }
  .ws-main__head { flex-direction: column; align-items: stretch; gap: 12px; }
  .ws-tabs { overflow-x: auto; }
}

/* ============================================================================= */
/* ============================================================================= */
/* CAPABILITIES · MATTERS · REPORTS · ROI · LITIFY COMPARISON                    */
/* ============================================================================= */
/* ============================================================================= */

/* ---- Shared top chrome for capabilities + reports ---- */
.caps-body, .reports-body {
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

.caps-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--bg-elev-1);
  border-bottom: 1px solid var(--ink-faint);
}

.caps-top__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.caps-top__brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #000000;
  font-weight: 700;
  font-size: 16px;
  border-radius: 6px;
}

.caps-top__brand-name { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.caps-top__brand-sub  { font-size: 10.5px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500; margin-top: 2px; }

.caps-top__right { display: flex; align-items: center; gap: 16px; }

/* =============================================================================
   CAPABILITIES PAGE
   ============================================================================= */

.caps { padding: 48px 32px 64px; max-width: 1280px; margin: 0 auto; }

.caps-hero { text-align: center; margin-bottom: 56px; }

.caps-hero__eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 20px;
}

.caps-hero__title {
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 20px;
  color: var(--ink);
}

.caps-hero__title em {
  font-style: normal;
  color: var(--accent);
}

.caps-hero__sub {
  font-size: 17px;
  color: var(--ink-mute);
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.caps-counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  max-width: 880px;
  margin: 0 auto;
}

.caps-count {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 20px 22px;
}

.caps-count--accent {
  background: var(--accent);
  color: #000000;
  border-color: var(--accent);
}

.caps-count__val {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--ink);
}

.caps-count--accent .caps-count__val { color: #000000; }

.caps-count__label {
  font-size: 11px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.caps-count--accent .caps-count__label { color: #000000; opacity: 0.85; }

/* Status dots */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot--live    { background: var(--signal-pass); }
.dot--ready   { background: var(--accent); }
.dot--roadmap { background: var(--ink-mute); }

/* Integration stack */
.caps-stack {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 24px 28px;
  margin-bottom: 48px;
}

.caps-stack__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink-faint);
}

.caps-stack__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

.caps-stack__sub {
  font-size: 11.5px;
  color: var(--ink-mute);
}

.caps-stack__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.caps-tool {
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-firm-card);
  padding: 12px 14px;
  transition: border-color 0.15s, background 0.15s;
}

.caps-tool:hover { border-color: var(--accent); }

.caps-tool--core { border-left: 3px solid var(--accent); }

.caps-tool__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}

.caps-tool__blurb {
  font-size: 11px;
  color: var(--ink-mute);
  line-height: 1.4;
}

/* Capability categories */
.caps-cat { margin-bottom: 40px; }

.caps-cat__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink-faint);
}

.caps-cat__icon {
  width: 44px;
  height: 44px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--r-firm-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.caps-cat__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.caps-cat__count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}

.caps-cat__blurb {
  font-size: 14px;
  color: var(--ink-mute);
  margin: 0;
  line-height: 1.5;
}

.caps-cat__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.caps-item {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 16px 18px;
  transition: border-color 0.15s, background 0.15s;
}

.caps-item:hover { border-color: var(--accent); background: var(--bg-elev-3); }

.caps-item--live    { border-left: 3px solid var(--signal-pass); }
.caps-item--ready   { border-left: 3px solid var(--accent); }
.caps-item--roadmap { border-left: 3px solid var(--ink-mute); opacity: 0.82; }

.caps-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.caps-item__status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.caps-item--live    .caps-item__status { color: var(--signal-pass); }
.caps-item--ready   .caps-item__status { color: var(--accent); }
.caps-item--roadmap .caps-item__status { color: var(--ink-mute); }

.caps-item__power {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-soft);
}

.caps-item__name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}

.caps-item__desc {
  font-size: 12.5px;
  color: var(--ink-mute);
  line-height: 1.5;
}

.caps-cta {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 40px;
  text-align: center;
  margin-top: 32px;
}

.caps-cta__title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ink);
}

.caps-cta__sub {
  font-size: 15px;
  color: var(--ink-mute);
  margin-bottom: 24px;
}

.caps-cta__btns {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.caps-cta__link {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  border-bottom: 1px solid var(--ink-faint);
}

.caps-cta__link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* =============================================================================
   MATTERS DASHBOARD
   ============================================================================= */

.matters-view {
  padding: 28px 32px 48px;
  overflow-y: auto;
  flex: 1;
}

.matters-view__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ink-faint);
  flex-wrap: wrap;
}

.matters-view__eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 6px;
}

.matters-view__title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  color: var(--ink);
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.matters-view__count {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--ink-soft);
  font-weight: 500;
}

.matters-view__sub {
  font-size: 14px;
  color: var(--ink-mute);
  margin: 4px 0 0;
  max-width: 720px;
  line-height: 1.5;
}

.matters-view__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.matters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 14px;
}

.matter-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 18px 20px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.matter-card:hover {
  background: var(--bg-elev-3);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.matter-card.is-closed { opacity: 0.7; }
.matter-card.is-closed:hover { opacity: 1; }

.matter-card.is-new {
  border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, var(--accent-soft) 0%, var(--bg-elev-2) 60%);
}

.matter-card__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.matter-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
}

.matter-card__new {
  background: var(--accent);
  color: #000000;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 700;
}

.matter-card__sub {
  font-size: 12px;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

.matter-card__body { flex: 1; }

.matter-card__status {
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.4;
}

.matter-card__action {
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 500;
}

.matter-card__foot {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--ink-faint);
}

.matter-card__metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.matter-card__metric-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.matter-card__metric-lbl {
  font-size: 10px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =============================================================================
   REPORTS PAGE
   ============================================================================= */

.reports { padding: 48px 32px 64px; max-width: 1480px; margin: 0 auto; }

.reports-hero { margin-bottom: 32px; }

.reports-hero__eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 10px;
}

.reports-hero__title {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
  color: var(--ink);
}

.reports-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.kpi {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 20px 22px;
}

.kpi__val {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 8px;
}

.kpi__label {
  font-size: 10.5px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 4px;
}

.kpi__trend {
  font-size: 11px;
  color: var(--signal-pass);
  font-family: var(--font-mono);
}

.reports-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.reports-panel {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 22px 24px;
}

.reports-panel--wide { grid-column: 1 / -1; }

.reports-panel__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
  letter-spacing: -0.005em;
}

.reports-panel__sub {
  font-size: 12px;
  color: var(--ink-mute);
  margin: 0 0 18px;
}

.reports-muted { color: var(--ink-mute); font-weight: 400; }

/* Bar charts */
.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  height: 200px;
  padding-top: 24px;
}

.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.chart-bar__col {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.chart-bar__fill {
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: all 0.5s;
  min-height: 6px;
}

.chart-bar__fill--inverse { background: var(--signal-pass); }

.chart-bar__val {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
  font-weight: 600;
}

.chart-bar__lbl {
  font-size: 10.5px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Severity bars */
.sev-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 0;
}

.sev-bar {
  display: grid;
  grid-template-columns: 60px 1fr 40px;
  gap: 12px;
  align-items: center;
}

.sev-bar__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.sev-bar__track {
  background: var(--bg-elev-3);
  border-radius: 4px;
  height: 18px;
  overflow: hidden;
}

.sev-bar__fill {
  height: 100%;
  transition: width 0.5s;
  border-radius: 4px;
}

.sev-bar__fill--high { background: var(--accent); }
.sev-bar__fill--med  { background: var(--signal-info); }
.sev-bar__fill--low  { background: var(--ink-mute); }

.sev-bar__count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

/* Load bars in attorney table */
.load-bar {
  display: grid;
  grid-template-columns: 1fr 50px;
  gap: 10px;
  align-items: center;
}

.load-bar__track {
  background: var(--bg-elev-3);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--ink-faint);
}

.load-bar__fill {
  height: 100%;
  background: var(--signal-pass);
  border-radius: 4px;
  transition: width 0.5s;
}

.load-bar__fill.is-hot { background: var(--accent); }

.load-bar__val {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
  text-align: right;
}

/* =============================================================================
   ROI CALCULATOR + LITIFY COMPARISON
   ============================================================================= */

.roi-panel {
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg-elev-2) 50%);
  border: 1px solid rgba(79,124,255, 0.3);
  border-radius: var(--r-card);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.roi-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.roi-panel__eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}

.roi-panel__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.2;
}

.roi-panel__sub {
  font-size: 14px;
  color: var(--ink-mute);
  margin: 0;
  max-width: 700px;
  line-height: 1.5;
}

.roi-panel__sub strong { color: var(--ink); font-weight: 600; }

.roi-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-button);
  padding: 6px 6px 6px 14px;
}

.roi-input label {
  font-size: 11px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  white-space: nowrap;
}

.roi-input input {
  background: var(--bg-elev-3);
  border: 1px solid var(--ink-faint);
  color: var(--ink);
  padding: 7px 10px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 13px;
  width: 70px;
  text-align: center;
}

.roi-input button {
  background: var(--accent);
  color: #000000;
  border: none;
  padding: 8px 14px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

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

.roi-card {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 20px 22px;
}

.roi-card--savings {
  background: var(--accent);
  color: #000000;
  border-color: var(--accent);
}

.roi-card__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 12px;
}

.roi-card--savings .roi-card__label { color: #000000; opacity: 0.7; }

.roi-card__amount {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}

.roi-card--savings .roi-card__amount { color: #000000; }

.roi-card__amount--accent { color: #000000; }

.roi-card__sub {
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 16px;
}

.roi-card--savings .roi-card__sub { color: #000000; opacity: 0.7; }

.roi-breakdown {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--ink-faint);
  padding-top: 12px;
}

.roi-card--savings .roi-breakdown { border-top-color: rgba(0,0,0,0.15); }

.roi-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  font-size: 12px;
  color: var(--ink-mute);
}

.roi-card--savings .roi-breakdown li { color: #000000; opacity: 0.8; }

.roi-breakdown li span:last-child {
  font-family: var(--font-mono);
  color: var(--ink);
  font-weight: 600;
}

.roi-card--savings .roi-breakdown li span:last-child { color: #000000; opacity: 1; }

/* Litify comparison */
.litify-compare {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 22px 26px;
  margin-bottom: 24px;
}

.litify-compare__head { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--ink-faint); }
.litify-compare__title { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 4px; letter-spacing: -0.01em; }
.litify-compare__sub { font-size: 12px; color: var(--ink-mute); margin: 0; }

.litify-compare__table th:nth-child(2),
.litify-compare__table td:nth-child(2),
.litify-compare__table th:nth-child(3),
.litify-compare__table td:nth-child(3) {
  text-align: center;
}

.litify-compare__table td:nth-child(3) { color: var(--signal-pass); font-weight: 700; }

.litify-compare__table td:nth-child(4) {
  font-size: 12px;
  color: var(--accent);
  font-family: var(--font-body);
}

/* ============================================================================= */
/* Responsive                                                                    */
/* ============================================================================= */

@media (max-width: 900px) {
  .roi-grid { grid-template-columns: 1fr; }
  .reports-grid { grid-template-columns: 1fr; }
  .matters-grid { grid-template-columns: 1fr; }
  .caps-cat__grid { grid-template-columns: 1fr; }
  .caps-stack__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .caps { padding: 24px 16px 32px; }
  .reports { padding: 24px 16px 32px; }
  .matters-view, .docs-view, .inbox-view, .search-view, .case { padding: 20px 16px 32px; }
}

/* ============================================================================= */
/* AGENTS ROSTER · DEADLINES · FIRM HEALTH · CLIENT PORTAL · COVERAGE · LIENS    */
/* SETTLEMENT · DAMAGES · DEMAND · DISCOVERY                                     */
/* ============================================================================= */

/* ---- Multi-link case__perm row ---- */
.case__perm .case__perm-value a { color: var(--accent); border-bottom: 1px dotted var(--accent); }
.case__perm .case__perm-value a:hover { color: var(--accent-hov); }
.case__perm .case__perm-value + .case__perm-value { margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--ink-faint); display: inline-block; }

/* ---- Agent card grid ---- */
.agent-card {
  background: var(--bg-elev-2);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-card);
  padding: 18px 20px;
  transition: border-color 0.15s, background 0.15s;
}
.agent-card:hover { border-color: var(--accent); background: var(--bg-elev-3); }
.agent-card--live    { border-left: 3px solid var(--signal-pass); }
.agent-card--ready   { border-left: 3px solid var(--accent); }
.agent-card--roadmap { border-left: 3px solid var(--ink-mute); opacity: 0.82; }

.agent-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.agent-card__icon { width: 36px; height: 36px; background: var(--accent-soft); color: var(--accent); border-radius: var(--r-firm-card); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; flex-shrink: 0; }
.agent-card__head-text { flex: 1; min-width: 0; }
.agent-card__name  { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; line-height: 1.1; }
.agent-card__title { font-size: 11px; color: var(--ink-mute); margin-top: 2px; }
.agent-card__blurb { font-size: 12.5px; color: var(--ink); line-height: 1.5; margin-bottom: 10px; }
.agent-card__power { font-size: 10.5px; color: var(--ink-soft); font-family: var(--font-mono); }

/* ---- Deadlines view ---- */
.deadlines-view { padding: 28px 32px 48px; overflow-y: auto; flex: 1; }
.deadlines-view__head { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--ink-faint); }
.deadlines-view__eyebrow { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-mute); font-weight: 600; margin-bottom: 6px; }
.deadlines-view__title { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); margin: 0 0 6px; }
.deadlines-view__sub { font-size: 14px; color: var(--ink-mute); margin: 0; }

.deadlines-section { margin-bottom: 28px; }
.deadlines-section__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-mute); font-weight: 600; }
.deadlines-section--hot .deadlines-section__title { color: var(--accent); }
.deadlines-section__count { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); letter-spacing: 0; }

.deadlines-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }

.deadline-row { display: grid; grid-template-columns: 120px 1fr 100px; gap: 16px; padding: 12px 16px; background: var(--bg-elev-2); border: 1px solid var(--ink-faint); border-radius: var(--r-firm-card); align-items: center; transition: background 0.12s, border-color 0.12s; }
.deadline-row:hover { background: var(--bg-elev-3); border-color: var(--accent); }
.deadline-row--high { border-left: 3px solid var(--accent); }
.deadline-row--med  { border-left: 3px solid var(--signal-info); }
.deadline-row--low  { border-left: 3px solid var(--ink-mute); opacity: 0.85; }

.deadline-row__date { font-family: var(--font-mono); font-size: 12px; color: var(--ink); font-weight: 600; }
.deadline-row__body { display: flex; flex-direction: column; gap: 3px; }
.deadline-row__case  { font-size: 12px; color: var(--accent); font-weight: 600; }
.deadline-row__event { font-size: 13px; color: var(--ink); }
.deadline-row__kind { font-family: var(--font-mono); font-size: 10px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.08em; text-align: right; }

.deadlines-empty { color: var(--ink-mute); font-size: 13px; padding: 16px 0; }

/* ---- Firm health findings ---- */
.findings-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.finding { display: grid; grid-template-columns: 80px 1fr; gap: 12px; padding: 12px 14px; background: var(--bg-elev-3); border: 1px solid var(--ink-faint); border-radius: var(--r-firm-card); align-items: flex-start; }
.finding--high  { border-left: 3px solid var(--accent); }
.finding--med   { border-left: 3px solid var(--signal-warn); }
.finding--low   { border-left: 3px solid var(--ink-mute); }
.finding--info  { border-left: 3px solid var(--signal-pass); }

.finding__sev { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-mute); }
.finding--high .finding__sev { color: var(--accent); }
.finding--info .finding__sev { color: var(--signal-pass); }
.finding__body { display: flex; flex-direction: column; gap: 4px; }
.finding__case { font-size: 12px; font-weight: 600; color: var(--ink); }
.finding__detail { font-size: 12.5px; color: var(--ink-mute); line-height: 1.4; }

/* ---- Client portal preview ---- */
.portal-view { padding: 28px 32px 48px; overflow-y: auto; flex: 1; }

.portal-banner { background: var(--accent-soft); border: 1px dashed var(--accent); border-radius: var(--r-card); padding: 14px 18px; margin-bottom: 24px; display: flex; align-items: center; gap: 16px; }
.portal-banner__label { background: var(--accent); color: #000000; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; padding: 3px 8px; border-radius: 3px; font-weight: 700; }
.portal-banner__text { font-size: 13px; color: var(--ink); }

.portal { background: linear-gradient(180deg, #fafaf7 0%, #ffffff 100%); border: 1px solid #e5e5dd; border-radius: var(--r-card); color: #1A1A1A; overflow: hidden; }
.portal__top { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; background: #ffffff; border-bottom: 1px solid #ececea; }
.portal__brand { display: flex; align-items: center; gap: 12px; }
.portal__brand-mark { width: 32px; height: 32px; background: var(--accent); color: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.portal__brand-name { font-size: 14px; font-weight: 600; color: #1A1A1A; }
.portal__brand-sub { font-size: 10.5px; color: #6A6A6A; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500; }
.portal__user { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.portal__user-name { font-size: 13px; font-weight: 600; color: #1A1A1A; }
.portal__user-status { font-size: 11px; color: #1F6E3C; }

.portal__hero { padding: 28px 24px 18px; background: #ffffff; border-bottom: 1px solid #ececea; }
.portal__hero-eyebrow { font-size: 10.5px; color: #6A6A6A; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; margin-bottom: 6px; }
.portal__hero-title { font-size: 22px; font-weight: 700; color: #1A1A1A; margin: 0 0 10px; letter-spacing: -0.02em; }
.portal__hero-status { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #5A5A5A; flex-wrap: wrap; }
.portal__hero-stat { font-size: 12px; color: #5A5A5A; }

.portal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px; }
.portal__panel { background: #ffffff; border: 1px solid #ececea; border-radius: var(--r-card); padding: 18px 20px; }
.portal__panel--wide { grid-column: 1 / -1; }
.portal__panel-title { font-size: 13px; font-weight: 700; color: #1A1A1A; margin: 0 0 12px; letter-spacing: -0.005em; }
.portal__update p { font-size: 14px; line-height: 1.55; color: #2A2A2A; margin: 0 0 10px; }
.portal__signed { font-size: 12px; color: #5A5A5A; font-style: italic; margin-top: 14px; padding-top: 12px; border-top: 1px solid #ececea; }
.portal__hint { font-size: 10.5px; color: #8B8B8B; font-family: var(--font-mono); }

.portal__steps { list-style: none; padding: 0; margin: 0; }
.portal__steps li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f5f5f0; align-items: flex-start; }
.portal__steps li:last-child { border-bottom: 0; }
.portal__step-icon { color: var(--accent); font-size: 16px; line-height: 1; padding-top: 2px; }
.portal__step-title { font-size: 13px; font-weight: 600; color: #1A1A1A; margin-bottom: 3px; }
.portal__step-sub { font-size: 12px; color: #5A5A5A; line-height: 1.4; }

.portal__upload { margin-top: 8px; background: var(--accent); color: #000000; border: none; padding: 8px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; opacity: 0.7; }

.portal__providers { list-style: none; padding: 0; margin: 0; }
.portal__providers li { padding: 10px 0; border-bottom: 1px solid #f5f5f0; }
.portal__providers li:last-child { border-bottom: 0; }
.portal__provider-name { font-size: 13px; font-weight: 600; color: #1A1A1A; display: block; }
.portal__provider-meta { font-size: 11.5px; color: #6A6A6A; display: block; margin-top: 2px; }

.portal__msg { background: #f7f7f3; border: 1px solid #ececea; border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.portal__msg-from { font-size: 11.5px; font-weight: 600; color: #1A1A1A; margin-bottom: 4px; }
.portal__msg-body { font-size: 12.5px; color: #2A2A2A; line-height: 1.5; margin-bottom: 6px; }
.portal__msg-date { font-size: 10.5px; color: #8B8B8B; font-family: var(--font-mono); }

.portal__settings { list-style: none; padding: 0; margin: 0; font-size: 12px; color: #5A5A5A; }
.portal__settings li { padding: 6px 0; border-bottom: 1px solid #f5f5f0; }
.portal__settings li:last-child { border-bottom: 0; }
.portal__settings strong { color: #1A1A1A; }

/* ---- Coverage view ---- */
.coverage-list { display: flex; flex-direction: column; gap: 12px; }
.coverage-item { background: var(--bg-elev-3); border: 1px solid var(--ink-faint); border-radius: var(--r-firm-card); padding: 14px 16px; }
.coverage-item--tendering { border-left: 3px solid var(--signal-warn); }
.coverage-item--available { border-left: 3px solid var(--signal-pass); }
.coverage-item--pending_confirmation { border-left: 3px solid var(--ink-mute); }
.coverage-item__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.coverage-item__carrier { font-size: 14px; font-weight: 700; color: var(--ink); }
.coverage-item__type { font-size: 11.5px; color: var(--accent); font-weight: 500; }
.coverage-item__status { font-size: 9.5px !important; padding: 2px 7px !important; }
.coverage-item__insured { font-size: 11.5px; color: var(--ink-mute); margin-bottom: 6px; font-family: var(--font-mono); }
.coverage-item__limits { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; font-size: 11.5px; color: var(--ink-mute); }
.coverage-item__limit strong { color: var(--ink); font-weight: 700; font-family: var(--font-mono); }
.coverage-item__note { font-size: 12.5px; color: var(--ink); line-height: 1.55; padding-top: 8px; border-top: 1px solid var(--ink-faint); }

.coverage-misses { list-style: none; padding: 0; margin: 0; }
.coverage-misses li { padding: 10px 0; border-bottom: 1px solid var(--ink-faint); display: grid; grid-template-columns: 1fr; gap: 4px; }
.coverage-misses li:last-child { border-bottom: 0; }
.coverage-misses__type { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.coverage-misses__result { font-size: 12px; color: var(--ink-mute); }
.coverage-misses__next { font-size: 12px; color: var(--accent); }

/* ---- Liens view ---- */
.lien-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 24px; }
.lien-summary__card { background: var(--bg-elev-2); border: 1px solid var(--ink-faint); border-radius: var(--r-card); padding: 16px 18px; }
.lien-summary__card--saved { background: var(--accent); color: #000000; border-color: var(--accent); }
.lien-summary__val { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; line-height: 1; margin-bottom: 6px; color: var(--ink); }
.lien-summary__card--saved .lien-summary__val { color: #000000; }
.lien-summary__lbl { font-size: 10.5px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.lien-summary__card--saved .lien-summary__lbl { color: #000000; opacity: 0.8; }

.liens-list { display: flex; flex-direction: column; gap: 12px; }
.lien { background: var(--bg-elev-2); border: 1px solid var(--ink-faint); border-radius: var(--r-card); padding: 18px 20px; }
.lien--negotiated { border-left: 3px solid var(--signal-info); }
.lien--paid       { border-left: 3px solid var(--signal-pass); }
.lien--claimed    { border-left: 3px solid var(--signal-warn); }
.lien--under_review { border-left: 3px solid var(--ink-mute); }
.lien--no_lien    { border-left: 3px solid var(--signal-pass); opacity: 0.8; }
.lien--waived     { border-left: 3px solid var(--signal-pass); }
.lien__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.lien__type { font-size: 14.5px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.lien__claimant { font-size: 12.5px; color: var(--ink-mute); margin-bottom: 2px; }
.lien__claim-no { font-size: 10.5px; color: var(--ink-soft); font-family: var(--font-mono); }
.lien__amounts { display: flex; gap: 20px; align-items: center; }
.lien__amount { display: flex; flex-direction: column; align-items: flex-end; }
.lien__amount-val { font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: var(--ink); }
.lien__amount--accent .lien__amount-val { color: var(--accent); }
.lien__amount-lbl { font-size: 10px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.lien__status { margin: 8px 0; display: inline-flex; }
.lien__notes { font-size: 12.5px; color: var(--ink); line-height: 1.55; padding: 10px 0 0; border-top: 1px solid var(--ink-faint); margin-top: 10px; }
.lien__timeline { list-style: none; padding: 10px 0 0; margin: 10px 0 0; border-top: 1px solid var(--ink-faint); font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); }
.lien__timeline li { padding: 3px 0; display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.lien__tl-date { color: var(--ink-soft); }
.lien__tl-event { color: var(--ink); }

/* ---- Settlement view ---- */
.settlement { display: flex; flex-direction: column; }

.settlement-waterfall { background: var(--bg-elev-2); border: 1px solid var(--ink-faint); border-radius: var(--r-card); padding: 22px 26px; }
.settlement-row { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--ink-faint); font-size: 15px; }
.settlement-row:last-child { border-bottom: 0; }
.settlement-row__label { color: var(--ink); }
.settlement-row__amount { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.settlement-row--gross .settlement-row__amount { color: var(--ink); font-size: 18px; }
.settlement-row--minus .settlement-row__amount { color: var(--signal-warn); }
.settlement-row--net { padding: 18px 0 6px; border-top: 2px solid var(--ink); margin-top: 6px; font-size: 18px; font-weight: 700; }
.settlement-row--net .settlement-row__label { color: var(--ink); }
.settlement-row--net .settlement-row__amount { color: var(--accent); font-size: 24px; font-weight: 700; }

/* ---- Damages view ---- */
.damages-stack { display: flex; flex-direction: column; gap: 18px; }
.damages-group { background: var(--bg-elev-2); border: 1px solid var(--ink-faint); border-radius: var(--r-card); padding: 22px 26px; }
.damages-group--ps { background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg-elev-2) 100%); border-color: rgba(79,124,255, 0.3); }
.damages-group__title { font-size: 14px; font-weight: 600; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--ink-faint); }
.damages-row { display: grid; grid-template-columns: 280px 1fr 120px; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ink-divider); }
.damages-row:last-child { border-bottom: 0; }
.damages-row__label { font-size: 13px; color: var(--ink); }
.damages-row__bar { height: 8px; background: var(--bg-elev-3); border-radius: 4px; overflow: hidden; border: 1px solid var(--ink-faint); }
.damages-row__fill { display: block; height: 100%; background: var(--signal-info); border-radius: 4px; }
.damages-row__fill--ps { background: var(--accent); }
.damages-row__amount { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--ink); text-align: right; }
.damages-row--subtotal { padding-top: 14px; border-top: 1px solid var(--ink); margin-top: 6px; font-weight: 700; }
.damages-row--subtotal .damages-row__amount { font-size: 16px; }

.damages-totals { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-top: 6px; }
.damages-totals__card { background: var(--bg-elev-2); border: 1px solid var(--ink-faint); border-radius: var(--r-card); padding: 20px 22px; }
.damages-totals__card--accent { background: var(--accent); color: #000000; border-color: var(--accent); }
.damages-totals__val { font-family: var(--font-mono); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 6px; }
.damages-totals__card--accent .damages-totals__val { color: #000000; }
.damages-totals__lbl { font-size: 10.5px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.damages-totals__card--accent .damages-totals__lbl { color: #000000; opacity: 0.8; }

@media (max-width: 900px) {
  .case__grid { grid-template-columns: 1fr; }
  .damages-row { grid-template-columns: 1fr; gap: 6px; }
  .damages-row__amount { text-align: left; }
  .damages-totals { grid-template-columns: 1fr; }
  .portal__grid { grid-template-columns: 1fr; }
  .deadline-row { grid-template-columns: 1fr; gap: 4px; }
  .deadline-row__kind { text-align: left; }
  .lien__head { flex-direction: column; gap: 12px; }
  .lien__amounts { width: 100%; justify-content: space-between; }
  .case__perm-value + .case__perm-value { border-left: 0; padding-left: 0; margin-left: 0; display: block; }
}

/* ---- Firm-level quick-links ---- */
.firm-quicklinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 28px; }
.firm-quick { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--bg-elev-2); border: 1px solid var(--ink-faint); border-radius: var(--r-card); transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.firm-quick:hover { background: var(--bg-elev-3); border-color: var(--accent); transform: translateY(-2px); }
.firm-quick__icon { width: 36px; height: 36px; background: var(--accent-soft); color: var(--accent); border-radius: var(--r-firm-card); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex-shrink: 0; }
.firm-quick__body { display: flex; flex-direction: column; gap: 2px; }
.firm-quick__title { font-size: 13.5px; font-weight: 700; color: var(--ink); letter-spacing: -0.005em; }
.firm-quick__sub { font-size: 11px; color: var(--ink-mute); }

/* ---- Demand builder ---- */
.demand-pipeline { list-style: none; padding: 0; margin: 0; }
.demand-pipeline li { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--ink-divider); }
.demand-pipeline li:last-child { border-bottom: 0; }
.demand-pipe__icon { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.demand-pipe--done .demand-pipe__icon { background: var(--signal-pass); color: #000000; }
.demand-pipe--pending .demand-pipe__icon { background: var(--accent); color: #000000; animation: pulse 1.6s ease-in-out infinite; }

.demand-doc-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.demand-doc-actions { display: flex; gap: 8px; }
.demand-doc { background: var(--bg-elev-3); border: 1px solid var(--ink-faint); border-radius: var(--r-input); max-height: 480px; overflow-y: auto; }
.demand-doc-footer { display: flex; justify-content: space-between; gap: 14px; margin-top: 12px; font-size: 12px; }
.demand-doc-meta { color: var(--ink-mute); font-family: var(--font-mono); }
.demand-doc-link { color: var(--accent); border-bottom: 1px dotted var(--accent); }



/* ============================================================================
   MATTERS V2 · Litify-killer table view
   ============================================================================ */
.matters-v2 { padding: 28px 36px 60px; max-width: 1480px; margin: 0 auto; }
.matters-v2__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.matters-v2__eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.matters-v2__title { font-size: 28px; font-weight: 700; color: var(--ink); margin: 0 0 6px; letter-spacing: -0.01em; }
.matters-v2__count { display: inline-block; margin-left: 10px; padding: 2px 10px; background: var(--surface-2); border-radius: 4px; font-size: 14px; font-weight: 500; color: var(--ink-mute); vertical-align: 4px; }
.matters-v2__sub { font-size: 13px; color: var(--ink-mute); line-height: 1.55; max-width: 640px; margin: 0; }
.matters-v2__pills { display: flex; gap: 8px; flex-wrap: wrap; }

.matters-v2__views { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.matters-v2__tab { padding: 8px 14px; font-size: 12px; font-weight: 500; color: var(--ink-mute); border-radius: 6px; text-decoration: none; transition: all 0.15s; display: inline-flex; gap: 6px; align-items: center; }
.matters-v2__tab span { background: var(--surface-2); padding: 1px 7px; border-radius: 9px; font-size: 11px; font-weight: 600; color: var(--ink); }
.matters-v2__tab:hover { background: var(--surface-2); color: var(--ink); }
.matters-v2__tab.is-active { background: var(--accent); color: #0A0A0A; }
.matters-v2__tab.is-active span { background: rgba(0,0,0,0.18); color: #0A0A0A; }

.matters-v2__tablewrap { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.matters-v2__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.matters-v2__table thead { background: var(--surface-2); }
.matters-v2__table th { text-align: left; padding: 14px 16px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); border-bottom: 1px solid var(--border); }
.matters-v2__table th.num { text-align: right; }
.m-row { cursor: pointer; transition: background 0.12s; border-bottom: 1px solid var(--border); }
.m-row:hover { background: var(--surface-2); }
.m-row.is-closed { opacity: 0.7; }
.m-row.is-high { background: linear-gradient(90deg, rgba(79,124,255,0.04) 0%, transparent 200px); }
.m-row td { padding: 14px 16px; vertical-align: top; }
.m-row__title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.m-row__sub { font-size: 11px; color: var(--ink-mute); font-family: var(--font-mono); letter-spacing: 0.02em; }
.m-row__client { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 3px; }
.m-row__value { font-size: 13px; font-weight: 600; color: var(--accent); }
.m-row__sol { font-size: 12px; color: var(--ink); font-weight: 500; }
.m-row__dim { font-size: 11px; color: var(--ink-mute); }
.m-row__empty { text-align: center; padding: 48px 16px; color: var(--ink-mute); font-size: 13px; }
.m-pip { display: inline-block; padding: 2px 8px; margin-right: 4px; font-size: 11px; font-weight: 600; background: var(--surface-2); border-radius: 4px; }
.m-pip em { font-style: normal; font-weight: 400; color: var(--ink-mute); margin-left: 3px; }
.m-stage { display: inline-block; padding: 3px 9px; font-size: 11px; font-weight: 600; border-radius: 4px; letter-spacing: 0.02em; }
.m-stage--info { background: rgba(91,141,239,0.18); color: #b7d0f5; }
.m-stage--warn { background: rgba(255,176,40,0.18); color: #ffd989; }
.m-stage--high { background: rgba(255,90,90,0.18); color: #ffb0b0; }
.m-stage--pass { background: rgba(100,210,150,0.16); color: #b3edcc; }
.m-tag { display: inline-block; padding: 1px 6px; font-size: 10px; font-weight: 700; border-radius: 3px; letter-spacing: 0.04em; margin-right: 3px; vertical-align: 1px; }
.m-tag--high          { background: var(--accent); color: #0A0A0A; }
.m-tag--stowers-active { background: rgba(255,176,40,0.24); color: #ffd989; border: 1px solid rgba(255,176,40,0.4); }
.m-tag--stowers-expired{ background: rgba(255,90,90,0.24); color: #ffb0b0; border: 1px solid rgba(255,90,90,0.4); }
.m-tag--ch55          { background: rgba(91,141,239,0.18); color: #b7d0f5; }
.m-tag--ttca          { background: rgba(200,140,255,0.20); color: #dcc4ff; }
.m-tag--ns            { background: rgba(220,200,150,0.20); color: #ffe9b8; }
.matters-v2__footer { padding: 18px 4px 0; color: var(--ink-mute); font-size: 12px; }


/* ============================================================================
   INTAKE PIPELINE · Kanban board
   ============================================================================ */
.pipe { padding: 28px 36px 60px; }
.pipe__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.pipe__eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.pipe__title { font-size: 28px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.pipe__count { display: inline-block; margin-left: 10px; padding: 2px 10px; background: var(--surface-2); border-radius: 4px; font-size: 14px; font-weight: 500; color: var(--ink-mute); vertical-align: 4px; }
.pipe__sub { font-size: 13px; color: var(--ink-mute); line-height: 1.55; max-width: 640px; margin: 0; }
.pipe__stats { display: flex; gap: 18px; }
.pipe__stat { background: var(--surface); border: 1px solid var(--border); padding: 12px 18px; border-radius: 8px; min-width: 92px; text-align: center; }
.pipe__stat-val { display: block; font-size: 22px; font-weight: 700; color: var(--accent); }
.pipe__stat-lbl { display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase; color: var(--ink-mute); margin-top: 2px; }

.pipe__board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1400px) { .pipe__board { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1000px) { .pipe__board { grid-template-columns: repeat(2, 1fr); } }
.pipe__col { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; min-height: 280px; display: flex; flex-direction: column; }
.pipe__col--info    { border-top: 3px solid #5b8def; }
.pipe__col--warn    { border-top: 3px solid #ffb028; }
.pipe__col--pass    { border-top: 3px solid #64d296; }
.pipe__col--neutral { border-top: 3px solid #5A5A5A; }
.pipe__col--high    { border-top: 3px solid #ff5a5a; }
.pipe__col-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.pipe__col-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.pipe__col-count { font-size: 11px; font-weight: 700; color: var(--ink-mute); background: var(--surface-2); padding: 2px 8px; border-radius: 9px; }
.pipe__col-desc { font-size: 11px; color: var(--ink-mute); margin-bottom: 10px; }
.pipe__col-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }

.pipe-card { background: var(--surface-2); padding: 11px 12px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; transition: border 0.12s; }
.pipe-card:hover { border-color: var(--accent); }
.pipe-card__head { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 3px; }
.pipe-card__name { font-size: 12px; font-weight: 600; color: var(--ink); }
.pipe-card__case { font-size: 11px; color: var(--accent); font-weight: 500; margin-bottom: 4px; }
.pipe-card__meta { font-size: 10px; color: var(--ink-mute); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.pipe-card__meta .dot { color: var(--border); }
.pipe-card__src { font-size: 10px; color: var(--ink-dim); font-family: var(--font-mono); margin-bottom: 6px; }
.pipe-card__blurb { font-size: 11px; color: var(--ink-mute); line-height: 1.45; margin-bottom: 4px; }
.pipe-card__agent { font-size: 11px; padding: 6px 8px; background: rgba(79,124,255,0.10); border-left: 2px solid var(--accent); border-radius: 3px; color: #ffd2b6; line-height: 1.4; margin: 4px 0; }
.pipe-card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.pipe-card__assigned { font-size: 10px; color: var(--ink-mute); }
.pipe-card__days { font-size: 10px; color: var(--ink-dim); font-family: var(--font-mono); }
.pipe-card__empty { font-size: 11px; color: var(--ink-dim); text-align: center; padding: 24px 6px; font-style: italic; }


/* ============================================================================
   TIMELINE V2 · activity feed
   ============================================================================ */
.timeline-v2 { padding: 12px 0; max-width: 880px; }
.timeline-v2__row { display: grid; grid-template-columns: 140px 36px 1fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.timeline-v2__row:hover { background: var(--surface); }
.timeline-v2__date { font-size: 11px; color: var(--ink-mute); font-family: var(--font-mono); padding-top: 3px; }
.timeline-v2__icon { font-size: 16px; line-height: 1; padding-top: 1px; }
.timeline-v2__body { min-width: 0; }
.timeline-v2__title { font-size: 13px; color: var(--ink); font-weight: 500; margin-bottom: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.timeline-v2__cat { font-size: 10px; padding: 1px 6px; background: var(--surface-2); border-radius: 3px; font-weight: 600; color: var(--ink-mute); }
.timeline-v2__draft { font-size: 10px; padding: 1px 6px; background: rgba(255,176,40,0.20); color: #ffd989; border-radius: 3px; font-weight: 700; letter-spacing: 0.05em; }
.timeline-v2__by { font-size: 11px; color: var(--ink-mute); }
.timeline-v2__by a { color: var(--accent); }


/* ============================================================================
   MATTER PLAN · checklist
   ============================================================================ */
.plan { padding: 12px 0; max-width: 960px; display: flex; flex-direction: column; gap: 24px; }
.plan__phase { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px 22px; }
.plan__phase-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.plan__phase-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.plan__phase-count { font-size: 11px; color: var(--ink-mute); font-family: var(--font-mono); }
.plan__phase-bar { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; margin-bottom: 14px; }
.plan__phase-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.2s; }
.plan__tasks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.plan__task { display: grid; grid-template-columns: 28px 1fr 100px; gap: 10px; padding: 8px 12px; background: var(--surface-2); border-radius: 6px; align-items: center; font-size: 12px; }
.plan__task--done .plan__task-check { color: #64d296; }
.plan__task--in_progress .plan__task-check { color: var(--accent); }
.plan__task--pending .plan__task-check { color: var(--ink-dim); }
.plan__task-check { font-size: 16px; text-align: center; }
.plan__task-name { display: block; color: var(--ink); font-weight: 500; }
.plan__task-meta { display: block; font-size: 10px; color: var(--ink-mute); margin-top: 2px; }
.plan__task-status { font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-mute); text-align: right; }


/* ============================================================================
   DISBURSEMENTS
   ============================================================================ */
.disb { padding: 28px 36px 60px; max-width: 1380px; margin: 0 auto; }
.disb__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.disb__eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.disb__title { font-size: 28px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.disb__count { display: inline-block; margin-left: 10px; padding: 2px 10px; background: var(--surface-2); border-radius: 4px; font-size: 14px; font-weight: 500; color: var(--ink-mute); vertical-align: 4px; }
.disb__sub { font-size: 13px; color: var(--ink-mute); line-height: 1.55; max-width: 640px; margin: 0; }
.disb__pills { display: flex; gap: 8px; flex-wrap: wrap; }
.disb__tablewrap { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.disb__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.disb__table thead { background: var(--surface-2); }
.disb__table th { text-align: left; padding: 14px 14px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); border-bottom: 1px solid var(--border); }
.disb__table th.num, .disb__table td.num { text-align: right; font-family: var(--font-mono); }
.disb__table tbody tr { border-bottom: 1px solid var(--border); }
.disb__table td { padding: 14px 14px; vertical-align: middle; }
.disb__note { padding: 18px 4px 0; color: var(--ink-mute); font-size: 12px; }


/* ============================================================================
   PIPE2 · Redesigned intake Kanban (replaces .pipe / .pipe-card above)
   Goals: clean column differentiation · tight cards · scannable hierarchy
   ============================================================================ */
.pipe2 { padding: 28px 36px 60px; max-width: 1860px; margin: 0 auto; }

/* ---- Header strip ---- */
.pipe2__head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px;
  padding-bottom: 22px; margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.pipe2__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.pipe2__title { font-size: 32px; font-weight: 700; color: var(--ink); margin: 0 0 8px; letter-spacing: -0.02em; }
.pipe2__count { display: inline-block; margin-left: 12px; padding: 3px 11px; background: var(--surface-2); border-radius: 5px; font-size: 15px; font-weight: 500; color: var(--ink-mute); vertical-align: 5px; }
.pipe2__sub { font-size: 13px; color: var(--ink-mute); line-height: 1.55; max-width: 580px; margin: 0; }

.pipe2__kpis { display: flex; gap: 28px; align-items: flex-start; }
.pipe2__kpi { text-align: center; min-width: 64px; }
.pipe2__kpi-val { font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1.1; font-variant-numeric: tabular-nums; }
.pipe2__kpi-lbl { font-size: 10px; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase; color: var(--ink-mute); margin-top: 4px; }
.pipe2__kpi--good .pipe2__kpi-val { color: #64d296; }
.pipe2__kpi--dim  .pipe2__kpi-val { color: var(--ink-dim); }

/* ---- Active workflow board: horizontal lanes ---- */
.pipe2__board {
  display: grid;
  /* Auto-flow column. Each lane gets a fixed minimum width so cards have
     room to breathe. The board scrolls horizontally — standard Kanban UX. */
  grid-auto-flow: column;
  grid-auto-columns: 300px;
  gap: 14px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 10px;
  /* Custom scrollbar */
  scrollbar-color: var(--border) transparent;
  scrollbar-width: thin;
}
.pipe2__board::-webkit-scrollbar { height: 8px; }
.pipe2__board::-webkit-scrollbar-track { background: transparent; }
.pipe2__board::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.pipe2__board::-webkit-scrollbar-thumb:hover { background: var(--ink-dim); }

/* ---- Lane (column) ---- */
.lane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 240px;
}

/* Distinct color band + tinted bg per stage */
.lane--new            { --lane-c: #5b8def; --lane-bg: rgba(91,141,239,0.04); }
.lane--attempting     { --lane-c: #ffb028; --lane-bg: rgba(255,176,40,0.04); }
.lane--info_gathering { --lane-c: #b794f4; --lane-bg: rgba(183,148,244,0.04); }
.lane--qualify        { --lane-c: #ff8c42; --lane-bg: rgba(255,140,66,0.05); }
.lane--pending_signup { --lane-c: #4fd1c5; --lane-bg: rgba(79,209,197,0.04); }
.lane--signed         { --lane-c: #64d296; --lane-bg: rgba(100,210,150,0.05); }

.lane__head {
  background: var(--lane-bg);
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  border-top: 3px solid var(--lane-c);
}
.lane__head-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.lane__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--lane-c); color: #0A0A0A;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.lane__title {
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--ink); margin: 0;
  flex: 1; min-width: 0;
}
.lane__count {
  font-size: 11px; font-weight: 700;
  color: var(--lane-c);
  background: rgba(255,255,255,0.04);
  padding: 2px 9px; border-radius: 10px;
  border: 1px solid currentColor;
  font-variant-numeric: tabular-nums;
}
.lane__desc {
  font-size: 11px; color: var(--ink-mute); margin: 0;
  line-height: 1.4;
}

.lane__body {
  padding: 10px 10px 14px;
  display: flex; flex-direction: column; gap: 9px;
  flex: 1;
}
.lane__empty {
  text-align: center; font-size: 11px; color: var(--ink-dim);
  padding: 28px 10px; font-style: italic;
}

/* ---- Lead card ---- */
.lead {
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 11px;
  transition: border-color 0.15s, transform 0.05s;
  cursor: pointer;
}
.lead:hover {
  border-color: var(--lane-c);
}
.lead:active { transform: translateY(1px); }
.lead--high { border-left: 3px solid var(--accent); padding-left: 8px; }

.lead__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; margin-bottom: 6px;
}
.lead__name {
  font-size: 13px; font-weight: 600; color: var(--ink);
  line-height: 1.25;
}
.lead__sev {
  font-size: 9px; font-weight: 800; letter-spacing: 0.06em;
  background: var(--accent); color: #0A0A0A;
  padding: 2px 6px; border-radius: 3px;
  flex-shrink: 0;
}

.lead__chips {
  display: flex; gap: 5px; flex-wrap: wrap;
  margin-bottom: 7px;
}
.chip {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 4px;
  letter-spacing: 0.02em;
}
.chip--type {
  background: rgba(79,124,255,0.12);
  color: #ffb088;
}
.chip--venue {
  background: rgba(255,255,255,0.04);
  color: var(--ink-mute);
  border: 1px solid var(--border);
}

.lead__blurb {
  font-size: 11px; color: var(--ink-mute);
  line-height: 1.45; margin: 0 0 7px;
}

.lead__agent {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 10px; line-height: 1.4;
  background: rgba(79,124,255,0.08);
  border-left: 2px solid var(--accent);
  padding: 6px 8px;
  border-radius: 3px;
  color: #ffd0b3;
  margin-bottom: 7px;
}
.lead__agent-icon { line-height: 1; padding-top: 1px; }

/* Card footer: clean definition list (label / value, 2 columns × 2 rows) */
.lead__facts {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 4px 10px;
  margin: 0;
  padding: 8px 0 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 11px;
  line-height: 1.35;
}
.lead__facts dt {
  color: var(--ink-dim);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 9px;
  padding-top: 2px;
  white-space: nowrap;
}
.lead__facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* ---- Terminal strip (declined / referred) ---- */
.pipe2__terminal {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.pipe2__terminal-head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 12px;
}
.pipe2__terminal-title {
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--ink); margin: 0; text-transform: uppercase;
}
.pipe2__terminal-sub {
  font-size: 11px; color: var(--ink-mute);
}
.pipe2__terminal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.term-lead {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  opacity: 0.75;
}
.term-lead:hover { opacity: 1; }
.term-lead__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 4px;
}
.term-lead__name { font-size: 12px; font-weight: 600; color: var(--ink-mute); }
.term-lead__tag {
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 6px; border-radius: 3px;
  background: rgba(255,255,255,0.04);
  color: var(--ink-dim);
}
.term-lead__tag--ref {
  background: rgba(91,141,239,0.10); color: #8aa9e0;
}
.term-lead__type {
  font-size: 11px; color: var(--ink-mute); margin-bottom: 4px;
}
.term-lead__blurb {
  font-size: 11px; color: var(--ink-dim); line-height: 1.4;
}


/* ============================================================================
   AGENT TOOL PALETTE — visible proof of agentic capability
   Sits above the chat. Collapsible. Categories collapse independently.
   ============================================================================ */
.toolpal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0 24px 16px;
  overflow: hidden;
}
.toolpal__head {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: linear-gradient(90deg, rgba(79,124,255,0.06) 0%, transparent 100%);
}
.toolpal__head::-webkit-details-marker { display: none; }
.toolpal__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.toolpal__icon { color: var(--accent); font-size: 14px; }
.toolpal__count {
  margin-left: auto;
  font-size: 11px; color: var(--ink-mute);
  font-family: var(--font-mono);
}
.toolpal__caret {
  display: inline-block; font-size: 10px;
  color: var(--ink-mute);
  transition: transform 0.2s;
}
details[open] .toolpal__caret { transform: rotate(180deg); }

.toolpal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border);
}
.toolpal__cat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
}
.toolpal__cat-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  cursor: pointer; user-select: none;
  list-style: none;
  font-size: 12px;
}
.toolpal__cat-head::-webkit-details-marker { display: none; }
.toolpal__cat-icon { font-size: 14px; line-height: 1; }
.toolpal__cat-name {
  font-weight: 600; color: var(--ink);
  letter-spacing: 0.02em;
}
.toolpal__cat-count {
  margin-left: auto;
  font-size: 10px; font-weight: 700;
  color: var(--ink-mute);
  background: rgba(255,255,255,0.04);
  padding: 1px 7px; border-radius: 9px;
  font-variant-numeric: tabular-nums;
}
.toolpal__cat[open] {
  background: var(--surface);
  border-color: rgba(79,124,255,0.30);
}
.toolpal__tools {
  list-style: none; padding: 4px 10px 10px; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--border);
}
.toolpal__tool {
  display: flex; flex-direction: column; gap: 2px;
  padding: 4px 0;
}
.toolpal__tool-name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: rgba(79,124,255,0.08);
  padding: 2px 6px; border-radius: 3px;
  display: inline-block; width: fit-content;
}
.toolpal__tool-desc {
  font-size: 11px;
  color: var(--ink-mute);
  line-height: 1.4;
}

/* ============================================================================
   INLINE TOOL-CALL TRACE — Claude-Code-style rendering inside agent bubbles
   ============================================================================ */
.bubble__text code {
  background: rgba(255,255,255,0.04);
  padding: 1px 5px; border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: #ffd0b3;
}
.bubble__text pre, .bubble__text code.block {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: pre-wrap;
  margin: 6px 0;
  color: var(--ink-mute);
}


/* ============================================================================
   Free Law Project attribution + powered-by tags in tool palette
   ============================================================================ */
.toolpal__cat--flp summary.toolpal__cat-head {
  background: linear-gradient(90deg, rgba(91,141,239,0.10) 0%, transparent 100%);
}
.toolpal__cat--flp .toolpal__cat-name::after {
  content: " · open source";
  font-size: 9px;
  font-weight: 500;
  color: #8aa9e0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 6px;
}

.toolpal__tool-powered {
  display: block;
  font-size: 9px;
  color: #8aa9e0;
  background: rgba(91,141,239,0.06);
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 4px;
  font-style: italic;
  letter-spacing: 0.02em;
  width: fit-content;
}

.toolpal__attribution {
  padding: 10px 16px 14px;
  font-size: 11px;
  color: var(--ink-mute);
  border-top: 1px solid var(--border);
  line-height: 1.55;
}
.toolpal__attribution-eyebrow {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8aa9e0;
  margin-right: 6px;
}
.toolpal__attribution a {
  color: var(--accent);
  border-bottom: 1px dotted var(--accent);
  text-decoration: none;
}
.toolpal__attribution a:hover {
  color: var(--ink);
  border-bottom-style: solid;
}


/* ============================================================================


/* ============================================================================
   CALENDAR V2 · real day/week/month/year grid
   ============================================================================ */
.cal2 { padding: 18px 24px 48px; max-width: 1660px; margin: 0 auto; }

/* ---- Control bar ---- */
.cal2__bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.cal2__bar-left  { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cal2__bar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.cal2__nav { display: flex; align-items: center; gap: 4px; }
.cal2__nav-btn, .cal2__nav-today {
  display: inline-flex; align-items: center; justify-content: center;
  height: 32px; min-width: 32px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  color: var(--ink); font-size: 13px; font-weight: 500;
  text-decoration: none; user-select: none;
  transition: all 0.12s;
}
.cal2__nav-btn { font-size: 18px; line-height: 1; padding: 0; }
.cal2__nav-btn:hover, .cal2__nav-today:hover {
  background: var(--surface-2); border-color: var(--accent);
}
.cal2__nav-today { padding: 0 14px; }

.cal2__title {
  font-size: 22px; font-weight: 700; color: var(--ink); margin: 0;
  letter-spacing: -0.01em;
}

.cal2__scope, .cal2__views {
  display: inline-flex; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 7px;
  padding: 3px;
}
.cal2__scope-btn, .cal2__view-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  color: var(--ink-mute); border-radius: 5px;
  text-decoration: none; transition: all 0.12s;
}
.cal2__scope-btn:hover, .cal2__view-btn:hover { color: var(--ink); }
.cal2__scope-btn.is-active, .cal2__view-btn.is-active {
  background: var(--accent); color: #0A0A0A;
}

/* ---- Legend strip ---- */
.cal2__legend {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  padding: 10px 0 14px;
  align-items: center;
  font-size: 11px;
}
.cal2__legend-item { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-mute); }
.cal2__legend-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
}
.cal2__legend-dot--trial          { background: var(--accent); }
.cal2__legend-dot--deposition     { background: #5b8def; }
.cal2__legend-dot--mediation      { background: #64d296; }
.cal2__legend-dot--court          { background: #ffb028; }
.cal2__legend-dot--deadline       { background: #ff5a5a; }
.cal2__legend-dot--depo_prep      { background: #8aa9e0; }
.cal2__legend-dot--trial_prep     { background: #ffb088; }
.cal2__legend-dot--ime            { background: #b794f4; }
.cal2__legend-dot--client_meeting { background: #4fd1c5; }
.cal2__legend-dot--internal       { background: #6A6A6A; }
.cal2__legend-count {
  background: var(--surface-2); padding: 1px 6px; border-radius: 9px;
  font-size: 10px; font-weight: 700; color: var(--ink);
}
.cal2__legend-total {
  margin-left: auto; font-size: 11px; color: var(--ink-dim);
  font-family: var(--font-mono);
}

/* ========== MONTH VIEW ========== */
.cal2-month { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cal2-month__weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.cal2-month__weekday {
  padding: 10px 12px; font-size: 10px; font-weight: 700;
  letter-spacing: 0.10em; color: var(--ink-mute);
  text-align: left;
}
.cal2-month__grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(120px, auto);
}
.cal2-cell {
  display: flex; flex-direction: column;
  padding: 6px 8px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  min-height: 120px;
  text-decoration: none; color: inherit;
  transition: background 0.12s;
  overflow: hidden;
}
.cal2-cell:nth-child(7n) { border-right: none; }
.cal2-cell:hover { background: var(--surface-2); }
.cal2-cell.is-other { background: rgba(0,0,0,0.20); }
.cal2-cell.is-other .cal2-cell__num { color: var(--ink-dim); }
.cal2-cell.is-weekend { background: rgba(255,255,255,0.015); }
.cal2-cell.is-today { background: rgba(79,124,255,0.08); }
.cal2-cell.is-today .cal2-cell__num {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #0A0A0A;
  width: 24px; height: 24px; border-radius: 50%;
  padding: 0;
}
.cal2-cell__num {
  font-size: 12px; font-weight: 600; color: var(--ink);
  margin-bottom: 4px;
  align-self: flex-start;
  padding: 1px 4px;
}
.cal2-cell__events {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 10px;
}
.cal2-chip {
  display: flex; align-items: center; gap: 4px;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
  border-left: 2px solid var(--ink-dim);
  font-size: 10px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal2-chip__time { color: var(--ink-mute); font-family: var(--font-mono); font-size: 9px; flex-shrink: 0; }
.cal2-chip__text { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.cal2-chip--trial          { border-left-color: var(--accent); background: rgba(79,124,255,0.10); }
.cal2-chip--deposition     { border-left-color: #5b8def; background: rgba(91,141,239,0.08); }
.cal2-chip--mediation      { border-left-color: #64d296; background: rgba(100,210,150,0.08); }
.cal2-chip--court          { border-left-color: #ffb028; background: rgba(255,176,40,0.10); }
.cal2-chip--deadline       { border-left-color: #ff5a5a; background: rgba(255,90,90,0.10); }
.cal2-chip--depo_prep      { border-left-color: #8aa9e0; }
.cal2-chip--trial_prep     { border-left-color: #ffb088; }
.cal2-chip--ime            { border-left-color: #b794f4; background: rgba(183,148,244,0.08); }
.cal2-chip--client_meeting { border-left-color: #4fd1c5; background: rgba(79,209,197,0.08); }
.cal2-chip--internal       { border-left-color: #6A6A6A; background: rgba(255,255,255,0.02); }
.cal2-cell__more {
  font-size: 10px; color: var(--ink-mute); padding: 1px 4px;
  font-weight: 500;
}

/* ========== WEEK VIEW ========== */
.cal2-week {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal2-week__col {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
  min-height: 480px;
  display: flex; flex-direction: column;
}
.cal2-week__col.is-today { border-color: var(--accent); }
.cal2-week__col.is-weekend { background: rgba(0,0,0,0.10); }
.cal2-week__head {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 8px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
}
.cal2-week__col.is-today .cal2-week__head { background: rgba(79,124,255,0.10); }
.cal2-week__weekday {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-mute);
}
.cal2-week__day {
  font-size: 22px; font-weight: 700; color: var(--ink);
  line-height: 1.1;
}
.cal2-week__col.is-today .cal2-week__day { color: var(--accent); }
.cal2-week__month {
  font-size: 10px; color: var(--ink-dim); font-family: var(--font-mono);
}
.cal2-week__events {
  padding: 8px; display: flex; flex-direction: column; gap: 6px;
  flex: 1;
}
.cal2-week__empty {
  text-align: center; font-size: 11px; color: var(--ink-dim);
  padding: 20px 4px;
}

.cal2-event {
  background: var(--surface-2); padding: 8px 10px; border-radius: 5px;
  border-left: 3px solid var(--ink-dim);
  position: relative;
  font-size: 11px; line-height: 1.4;
  display: flex; flex-direction: column; gap: 2px;
}
.cal2-event__time { color: var(--ink-mute); font-family: var(--font-mono); font-size: 10px; }
.cal2-event__title { color: var(--ink); font-weight: 600; }
.cal2-event__matter {
  color: var(--accent); font-size: 10px; text-decoration: none; margin-top: 2px;
}
.cal2-event__matter:hover { border-bottom: 1px dotted var(--accent); }
.cal2-event__loc { color: var(--ink-dim); font-size: 10px; }
.cal2-event__atty {
  position: absolute; top: 6px; right: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: var(--ink-mute);
}
.cal2-event--trial          { border-left-color: var(--accent); background: rgba(79,124,255,0.10); }
.cal2-event--deposition     { border-left-color: #5b8def; background: rgba(91,141,239,0.08); }
.cal2-event--mediation      { border-left-color: #64d296; background: rgba(100,210,150,0.08); }
.cal2-event--court          { border-left-color: #ffb028; background: rgba(255,176,40,0.10); }
.cal2-event--deadline       { border-left-color: #ff5a5a; background: rgba(255,90,90,0.10); }
.cal2-event--ime            { border-left-color: #b794f4; background: rgba(183,148,244,0.08); }
.cal2-event--client_meeting { border-left-color: #4fd1c5; background: rgba(79,209,197,0.08); }

/* ========== DAY VIEW ========== */
.cal2-day { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cal2-day__row {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 16px; padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  min-height: 56px;
  align-items: start;
}
.cal2-day__row:last-child { border-bottom: none; }
.cal2-day__row--empty { background: rgba(0,0,0,0.06); }
.cal2-day__hour {
  font-size: 12px; font-weight: 600; color: var(--ink-mute);
  font-family: var(--font-mono);
  padding-top: 4px;
}
.cal2-day__events {
  display: flex; flex-direction: column; gap: 6px;
}
.cal2-event--wide {
  padding: 10px 14px;
}
.cal2-event__head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px;
}
.cal2-event__type-tag {
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 3px;
  background: rgba(255,255,255,0.06);
}
.cal2-event__type-tag--trial          { background: var(--accent); color: #0A0A0A; }
.cal2-event__type-tag--deposition     { background: rgba(91,141,239,0.22); color: #b7d0f5; }
.cal2-event__type-tag--mediation      { background: rgba(100,210,150,0.20); color: #b3edcc; }
.cal2-event__type-tag--court          { background: rgba(255,176,40,0.22); color: #ffd989; }
.cal2-event__type-tag--deadline       { background: rgba(255,90,90,0.22); color: #ffb0b0; }
.cal2-event__type-tag--ime            { background: rgba(183,148,244,0.20); color: #d6c2ff; }
.cal2-event__type-tag--client_meeting { background: rgba(79,209,197,0.18); color: #a9eae3; }
.cal2-event__head .cal2-event__atty   { position: static; margin-left: auto; }
.cal2-event__head .cal2-event__time   { font-size: 11px; }
.cal2-event__meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 11px; color: var(--ink-mute); margin-top: 4px;
}
.cal2-event--wide .cal2-event__title {
  font-size: 14px; margin-bottom: 4px;
}

/* ========== YEAR VIEW ========== */
.cal2-year {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.cal2-year__month {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px;
  text-decoration: none; color: inherit;
  transition: border-color 0.15s;
  display: block;
}
.cal2-year__month:hover { border-color: var(--accent); }
.cal2-year__month-name {
  font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 8px;
}
.cal2-year__weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 0;
}
.cal2-year__wd {
  font-size: 9px; color: var(--ink-dim);
  text-align: center; padding: 2px 0;
}
.cal2-year__grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}
.cal2-year__cell {
  font-size: 9px; text-align: center;
  padding: 4px 0;
  color: var(--ink-mute);
  background: transparent;
  border-radius: 2px;
}
.cal2-year__cell.is-other { color: rgba(255,255,255,0.18); }
.cal2-year__cell.has-events {
  background: rgba(79,124,255,0.18);
  color: var(--ink);
  font-weight: 600;
}
.cal2-year__cell.is-today {
  background: var(--accent); color: #0A0A0A; font-weight: 700;
}


/* ============================================================================
   MASS-TORT PORTFOLIOS
   ============================================================================ */
.port { padding: 28px 36px 60px; max-width: 1480px; margin: 0 auto; }
.port__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--border); }
.port__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.port__title { font-size: 30px; font-weight: 700; color: var(--ink); margin: 0 0 6px; letter-spacing: -0.01em; }
.port__count { display: inline-block; margin-left: 10px; padding: 2px 10px; background: var(--surface-2); border-radius: 4px; font-size: 14px; font-weight: 500; color: var(--ink-mute); vertical-align: 5px; }
.port__sub { font-size: 13px; color: var(--ink-mute); line-height: 1.55; max-width: 580px; margin: 0; }
.port__topkpis { display: flex; gap: 22px; }
.port__topkpi { text-align: center; min-width: 80px; }
.port__topkpi-val { font-size: 28px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.port__topkpi-lbl { font-size: 10px; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase; color: var(--ink-mute); margin-top: 4px; }
.port__topkpi--good .port__topkpi-val { color: #64d296; }
.port__topkpi--warn .port__topkpi-val { color: #ffb028; }

.port-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 22px; overflow: hidden; }
.port-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--border); background: linear-gradient(90deg, rgba(79,124,255,0.05) 0%, transparent 50%); }
.port-card__title { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.port-card__sub { font-size: 12px; color: var(--ink-mute); }
.port-card__pills { display: flex; gap: 6px; flex-wrap: wrap; }
.port-card__kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--border); }
.port-card__kpi { background: var(--surface); padding: 14px 16px; }
.port-card__kpi-val { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.port-card__kpi-lbl { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); margin-top: 4px; }
.port-card__kpi--good .port-card__kpi-val { color: #64d296; }
.port-card__kpi--warn .port-card__kpi-val { color: #ffb028; }

.port-card__main { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; padding: 20px 22px; }
@media (max-width: 900px) { .port-card__main { grid-template-columns: 1fr; } }
.port-card__section-title { font-size: 11px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 10px; }
.port-card__tier-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.port-card__tier-table th { text-align: left; padding: 8px 10px; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); border-bottom: 1px solid var(--border); }
.port-card__tier-table th.num, .port-card__tier-table td.num { text-align: right; font-family: var(--font-mono); }
.port-card__tier-table td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--ink); }
.port-card__defendants, .port-card__notes { list-style: none; padding: 0; margin: 0 0 18px; font-size: 12px; line-height: 1.55; }
.port-card__defendants li { padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--ink); }
.port-card__notes li { padding: 6px 0 6px 16px; position: relative; color: var(--ink-mute); }
.port-card__notes li::before { content: "›"; position: absolute; left: 0; color: var(--accent); }
.port-card__foot { display: flex; justify-content: flex-start; align-items: center; gap: 8px; padding: 14px 22px; background: var(--surface-2); border-top: 1px solid var(--border); }
.port-card__foot-note { margin-left: auto; font-size: 12px; color: var(--ink-mute); }


/* ============================================================================
   FIRM ACTIVITY STREAM
   ============================================================================ */
.actstream { padding: 28px 36px 60px; max-width: 1200px; margin: 0 auto; }
.actstream__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.actstream__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.actstream__title { font-size: 28px; font-weight: 700; color: var(--ink); margin: 0 0 6px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 12px; }
.actstream__pulse { display: inline-block; width: 10px; height: 10px; background: #64d296; border-radius: 50%; box-shadow: 0 0 0 0 rgba(100,210,150,0.7); animation: actpulse 1.6s infinite; }
@keyframes actpulse { 0%   { box-shadow: 0 0 0 0 rgba(100,210,150,0.7); } 70% { box-shadow: 0 0 0 12px rgba(100,210,150,0); } 100% { box-shadow: 0 0 0 0 rgba(100,210,150,0); } }
.actstream__sub { font-size: 13px; color: var(--ink-mute); line-height: 1.55; max-width: 580px; margin: 0; }
.actstream__kpis { display: flex; gap: 18px; }
.actstream__kpi { text-align: center; }
.actstream__kpi-val { font-size: 24px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.actstream__kpi-lbl { font-size: 10px; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase; color: var(--ink-mute); margin-top: 4px; }

.actstream__types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.actstream__type-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; font-size: 11px; font-weight: 600; color: var(--ink); }
.actstream__type-pill em { color: var(--ink-mute); font-weight: 500; font-style: normal; margin-left: 2px; }

.actstream__list { display: flex; flex-direction: column; gap: 0; position: relative; }
.actstream__list::before { content: ""; position: absolute; left: 78px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.act { display: grid; grid-template-columns: 60px 18px 1fr; gap: 16px; padding: 12px 0; align-items: flex-start; position: relative; }
.act__time { font-size: 12px; font-weight: 600; color: var(--ink-mute); font-family: var(--font-mono); padding-top: 3px; }
.act__bullet { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 6px; margin-left: 4px; position: relative; z-index: 1; box-shadow: 0 0 0 3px var(--bg); }
.act--email .act__bullet         { background: #5b8def; }
.act--demand .act__bullet         { background: var(--accent); }
.act--records .act__bullet       { background: #4fd1c5; }
.act--lien .act__bullet           { background: #b794f4; }
.act--stowers .act__bullet        { background: #ff5a5a; }
.act--docket .act__bullet         { background: #ffb028; }
.act--court_research .act__bullet { background: #8aa9e0; }
.act--calendar .act__bullet      { background: #64d296; }
.act--intake .act__bullet         { background: var(--accent); }
.act--trust .act__bullet          { background: #ffb088; }
.act__body { min-width: 0; }
.act__line { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
.act__actor { font-size: 13px; font-weight: 700; color: var(--ink); }
.act__kind-tag { font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; background: rgba(255,255,255,0.05); color: var(--ink-mute); }
.act__action { font-size: 13px; color: var(--ink-mute); line-height: 1.5; }
.act__matter { display: inline-block; margin-top: 4px; font-size: 11px; color: var(--accent); text-decoration: none; }
.act__matter:hover { border-bottom: 1px dotted var(--accent); }
.actstream__foot { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--ink-mute); line-height: 1.55; }


/* ============================================================================
   FIRM MARQUEE + VERDICT ROSTER
   ============================================================================ */
.firm-marquee { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 1px; background: var(--border); border-radius: 12px; overflow: hidden; margin: 20px 0; border: 1px solid var(--border); }
.firm-marquee__col { background: var(--surface); padding: 22px 26px; }
.firm-marquee__col--big { background: linear-gradient(135deg, rgba(79,124,255,0.10), var(--surface)); }
.firm-marquee__num { font-size: 32px; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.firm-marquee__col:not(.firm-marquee__col--big) .firm-marquee__num { font-size: 24px; color: var(--ink); }
.firm-marquee__lbl { font-size: 11px; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase; color: var(--ink-mute); margin-top: 8px; }
@media (max-width: 1000px) { .firm-marquee { grid-template-columns: 1fr 1fr; } }

.firm-verdicts { margin: 30px 0; }
.firm-verdicts__head { display: flex; align-items: baseline; gap: 14px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.firm-verdicts__title { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0; }
.firm-verdicts__sub { font-size: 12px; color: var(--ink-mute); }
.firm-verdicts__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.verdict { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; align-items: center; transition: border-color 0.15s; }
.verdict:hover { border-color: var(--accent); }
.verdict__amount { font-size: 22px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1; }
.verdict__matter { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.verdict__meta { font-size: 11px; color: var(--ink-mute); font-family: var(--font-mono); margin-bottom: 4px; }
.verdict__note { font-size: 11px; color: var(--ink-dim); line-height: 1.4; font-style: italic; }


/* ============================================================================
   FLOATING AGENT WIDGET · global launcher + draggable/resizable chat panel
   ============================================================================ */

/* --- Launcher FAB (bottom right) --- */
.ofab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #0A0A0A;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
  box-shadow: 0 10px 30px rgba(79,124,255,0.30), 0 4px 10px rgba(0,0,0,0.4);
  z-index: 9999;
  transition: transform 0.15s ease;
  position: fixed;
}
.ofab:hover { transform: scale(1.05); }
.ofab__pulse {
  position: absolute; top: -2px; right: -2px;
  width: 12px; height: 12px;
  background: #64d296;
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 0 rgba(100,210,150,0.7);
  animation: ofabPulse 1.8s infinite;
}
@keyframes ofabPulse {
  0%   { box-shadow: 0 0 0 0 rgba(100,210,150,0.6); }
  70%  { box-shadow: 0 0 0 12px rgba(100,210,150,0); }
  100% { box-shadow: 0 0 0 0 rgba(100,210,150,0); }
}
.ofab__mark { display: block; }

/* --- Floating panel --- */
.fchat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 420px;
  height: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 8px 20px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  z-index: 9998;
  overflow: hidden;
  min-width: 320px;
  min-height: 280px;
}
.fchat.is-mini { height: 56px !important; }
.fchat.is-mini .fchat__body,
.fchat.is-mini .fchat__input,
.fchat.is-mini .fchat__resize { display: none; }
.fchat.is-max {
  width: calc(100vw - 48px) !important;
  height: calc(100vh - 80px) !important;
}

/* --- Header (drag handle) --- */
.fchat__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--border);
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}
.fchat__title { display: flex; align-items: center; gap: 8px; }
.fchat__mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #0A0A0A;
  font-weight: 800; font-size: 12px;
}
.fchat__name { font-size: 13px; font-weight: 700; color: var(--ink); }
.fchat__sub { font-size: 11px; color: var(--ink-mute); }
.fchat__controls { display: flex; gap: 4px; }
.fchat__ctrl {
  width: 24px; height: 24px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--ink-mute);
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: all 0.12s;
}
.fchat__ctrl:hover { background: var(--surface-2); color: var(--ink); border-color: var(--accent); }

/* --- Body (chat scroll) --- */
.fchat__body {
  flex: 1; overflow-y: auto;
  padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--bg);
}

/* --- Bubbles --- */
.fbubble { display: flex; gap: 8px; align-items: flex-start; }
.fbubble--user { flex-direction: row-reverse; }
.fbubble__av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-mute);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  flex-shrink: 0;
}
.fbubble__av--agent {
  background: var(--accent);
  color: #0A0A0A;
}
.fbubble__text {
  background: var(--surface-2);
  padding: 8px 12px;
  border-radius: 10px;
  max-width: 85%;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.fbubble--user .fbubble__text {
  background: var(--accent);
  color: #0A0A0A;
}
.fbubble__text pre {
  background: rgba(0,0,0,0.20);
  padding: 6px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: pre-wrap;
  margin: 4px 0;
  color: var(--ink-mute);
}
.fbubble__text code {
  background: rgba(255,255,255,0.06);
  padding: 1px 4px; border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #ffd0b3;
}

.fbubble--typing .fbubble__text {
  display: inline-flex; gap: 4px; padding: 12px;
}
.fbubble--typing .dot {
  width: 6px; height: 6px; background: var(--ink-mute);
  border-radius: 50%; animation: fdot 1.2s infinite;
}
.fbubble--typing .dot:nth-child(2) { animation-delay: 0.15s; }
.fbubble--typing .dot:nth-child(3) { animation-delay: 0.30s; }
@keyframes fdot {
  0%,80%,100% { opacity: 0.3; transform: translateY(0); }
  40%         { opacity: 1.0; transform: translateY(-3px); }
}

/* --- Input footer --- */
.fchat__input {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.fchat__input form {
  display: flex; gap: 8px;
}
.fchat__input input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 12px;
  font-family: inherit;
  outline: none;
}
.fchat__input input:focus { border-color: var(--accent); }
.fchat__input button {
  background: var(--accent);
  color: #0A0A0A;
  border: none;
  border-radius: 6px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

/* --- Resize handle (bottom-right) --- */
.fchat__resize {
  position: absolute;
  right: 0; bottom: 0;
  width: 16px; height: 16px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 50%, var(--ink-dim) 50%, var(--ink-dim) 60%, transparent 60%, transparent 70%, var(--ink-dim) 70%, var(--ink-dim) 80%, transparent 80%);
  z-index: 10;
}

@media (max-width: 600px) {
  .fchat { width: calc(100vw - 24px); height: calc(100vh - 100px); right: 12px; bottom: 12px; }
  .ofab { right: 12px; bottom: 12px; }
}


/* ============================================================================
   SETTINGS · plug in real API keys for demo day
   ============================================================================ */
.sett { padding: 28px 36px 60px; max-width: 880px; margin: 0 auto; }
.sett__head { padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.sett__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.sett__title { font-size: 28px; font-weight: 700; color: var(--ink); margin: 0 0 8px; letter-spacing: -0.01em; }
.sett__sub { font-size: 13px; color: var(--ink-mute); line-height: 1.55; margin: 0; }
.sett__saved {
  padding: 12px 16px; background: rgba(100,210,150,0.12); border: 1px solid rgba(100,210,150,0.4);
  color: #b3edcc; border-radius: 8px; font-size: 13px; margin-bottom: 18px;
}
.sett__form { display: flex; flex-direction: column; gap: 18px; }
.sett-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 22px 24px; }
.sett-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; gap: 14px; }
.sett-card__title { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0; }
.sett-card__status { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 12px; letter-spacing: 0.04em; }
.sett-card__status.is-on  { background: rgba(100,210,150,0.16); color: #b3edcc; }
.sett-card__status.is-off { background: rgba(255,255,255,0.06); color: var(--ink-mute); }
.sett-card__sub { font-size: 12px; color: var(--ink-mute); line-height: 1.5; margin: 6px 0 14px; }
.sett__label { display: block; margin-bottom: 12px; }
.sett__label span:first-child {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 6px;
}
.sett__input {
  width: 100%; box-sizing: border-box;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 10px 12px; color: var(--ink);
  font-family: var(--font-mono); font-size: 12px; outline: none;
}
.sett__input:focus { border-color: var(--accent); }
.sett__check { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink); cursor: pointer; }
.sett__check input { accent-color: var(--accent); }
.sett__hint { font-size: 11px; color: var(--ink-dim); margin: 6px 0 0; line-height: 1.5; }
.sett__hint a, .sett-card__sub a, .sett__footer a { color: var(--accent); border-bottom: 1px dotted var(--accent); text-decoration: none; }
.sett__save {
  background: var(--accent); color: #0A0A0A; border: none;
  padding: 12px 24px; border-radius: 8px; font-weight: 700; font-size: 13px;
  cursor: pointer; align-self: flex-start;
}
.sett__footer { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--ink-mute); line-height: 1.6; }

/* Settings gear icon in the top nav */
.ws-main__settings {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 6px;
  color: var(--ink-mute); text-decoration: none;
  font-size: 18px;
  transition: all 0.12s;
}
.ws-main__settings:hover { background: var(--surface-2); color: var(--accent); }

/* Inbox live-mode bits */
.inbox-view__mode { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; }
.inbox-mode-btn {
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  color: var(--ink-mute); border-radius: 5px;
  text-decoration: none; transition: all 0.12s;
}
.inbox-mode-btn:hover { color: var(--ink); }
.inbox-mode-btn.is-active { background: var(--accent); color: #0A0A0A; }
.inbox-row--live { background: rgba(100,210,150,0.06); border-left: 3px solid #64d296; }
.inbox-live-error {
  margin: 14px 0; padding: 14px 18px;
  background: rgba(255,176,40,0.10); border: 1px solid rgba(255,176,40,0.4);
  border-radius: 8px; color: #ffd989; font-size: 13px; line-height: 1.6;
}
.inbox-live-error a { color: var(--accent); border-bottom: 1px dotted var(--accent); text-decoration: none; }
