/* ─────────────────────────────────────────────────────────────────────────
   Ward's World CRM — Design System (Classic theme, single-theme)
   ─────────────────────────────────────────────────────────────────────────

   The Classic theme is the only theme. There is no light, no dark, no
   prefers-color-scheme, no DodgerBlue. The shell pins
   <html data-theme="classic"> defensively, but every selector below targets
   :root because Classic is the default.

   Source-of-truth token values live in this file. The wardcrm-classic-ui
   skill (.claude/skills/wardcrm-classic-ui/) mirrors them inline so agents
   building UIs don't have to grep — if values move, both files move in the
   same PR.

   Companion: WardCRM-Brain/Frontend/Design System.md (vault, human-facing).

   ─── LOAD-BEARING PIXELS — DO NOT TOKENIZE ──────────────────────────────
   These values are tuned for specific layouts. Replacing them with
   --space-* or --radius-* variables will break the rhythm.

     · Probate / intake spreadsheet grid:    36px 1fr 150px 110px 80px 200px
     · Calendar cell minimum height:         minmax(110px, auto)
     · Today-pill min-width:                 22px (with border-radius: 999)
     · Spreadsheet row height:               28px (--ss-cell-h, density-aware)
     · Owner-circle diameter:                22px
     · Section-strip height:                 30px
     · Sticky-toolbar height:                44px
     · Section-nav strip height:             32px
   ────────────────────────────────────────────────────────────────────── */

:root {
  /* ── Layered backgrounds (BG / BG_2 / BG_3 / ELEVATED) ────────────── */
  --color-bg-primary:    #0A1628;                /* Page bg */
  --color-bg-secondary:  #0F1E33;                /* Sidebar, panels */
  --color-bg-tertiary:   #162840;                /* Cards, list items, headers (was #162B47) */
  --color-bg-hover:      #162840;
  --color-bg-active:     #1F3A5C;
  --color-bg-elevated:   rgba(15, 30, 51, 0.9);  /* Floating: modals, popovers */
  --color-bg-surface:    #0F1E33;                /* Card surface */
  --color-bg-input:      rgba(7, 18, 36, 0.6);   /* Form input fill */
  --color-bg-drawer-content: var(--color-bg-primary); /* Matter drawer content background */

  /* Borders */
  --color-border:        #1F3A5C;
  --color-border-light:  rgba(31, 58, 92, 0.5);
  --color-border-subtle: #162840;
  --color-border-strong: #2D4A6F;

  /* Text — parchment cream, not pure white */
  --color-text-primary:   #F0E6D2;   /* Body, headings */
  --color-text-secondary: #D4C9B0;   /* Muted body */
  --color-text-muted:     #8090A5;   /* Labels, captions */
  --color-text-dim:       #576B85;   /* Placeholders, disabled */

  /* Gold accents (antique gold) */
  --color-accent:           #C9A05F;
  --color-accent-hover:     #E6C47F;                           /* Bright variant for hover / focus */
  --color-accent-light:     rgba(201, 160, 95, 0.08);          /* Soft fill */
  --color-accent-light-hi:  rgba(201, 160, 95, 0.16);          /* Active fill */
  --color-accent-border:    rgba(201, 160, 95, 0.25);          /* Hairline + section divider */

  /* Primary gold gradient + inset highlight (CTA buttons, SAVED button, view-switcher pill) */
  --gradient-gold-primary: linear-gradient(180deg, #d6ad6a, #b88a44);
  --shadow-gold-inset:     inset 0 1px 0 rgba(255, 255, 255, 0.25);
  --color-on-gold:         #1a0e00;                              /* Dark-roast brown for text/icons on gold-gradient fills */

  /* Secondary accents — warmed for Classic */
  --color-accent-green:        #7FB582;
  --color-accent-green-light:  rgba(127, 181, 130, 0.12);
  --color-accent-purple:       #B89F7A;
  --color-accent-purple-light: rgba(184, 159, 122, 0.12);

  /* ── Status palette (semantic) ────────────────────────────────────
     Five statuses × four channels. Use these for status pills, dots,
     row borders, and any "what state is this in" UI. Never solid red /
     green / yellow blocks. */
  --status-done-bg:        rgba(127, 181, 130, 0.18);
  --status-done-fg:        #A7D4AA;
  --status-done-border:    rgba(127, 181, 130, 0.35);
  --status-done-dot:       #7FB582;

  --status-progress-bg:    rgba(212, 168, 96, 0.18);
  --status-progress-fg:    #E6C580;
  --status-progress-border: rgba(212, 168, 96, 0.35);
  --status-progress-dot:   #D4A860;

  --status-pending-bg:     rgba(128, 144, 165, 0.10);
  --status-pending-fg:     #B8C4D0;
  --status-pending-border: rgba(128, 144, 165, 0.25);
  --status-pending-dot:    #6B7B92;

  --status-blocked-bg:     rgba(201, 122, 109, 0.18);
  --status-blocked-fg:     #E6A096;
  --status-blocked-border: rgba(201, 122, 109, 0.35);
  --status-blocked-dot:    #C97A6D;

  --status-na-bg:          transparent;
  --status-na-fg:          #576B85;
  --status-na-border:      rgba(128, 144, 165, 0.18);
  --status-na-dot:         #3D4754;

  /* ── Owner-chip palette ──────────────────────────────────────────
     Five legal roles. Use for responsibility badges, attribution
     pills. Each role has a foreground color, a low-alpha background,
     and a matching border. */
  --owner-pr-color:       #E6C47F;
  --owner-pr-bg:          rgba(201, 160, 95, 0.08);
  --owner-pr-border:      rgba(201, 160, 95, 0.25);

  --owner-counsel-color:  #A7D4AA;
  --owner-counsel-bg:     rgba(127, 181, 130, 0.10);
  --owner-counsel-border: rgba(127, 181, 130, 0.25);

  --owner-court-color:    #C5D5E8;
  --owner-court-bg:       rgba(140, 165, 200, 0.10);
  --owner-court-border:   rgba(140, 165, 200, 0.25);

  --owner-cpa-color:      #D5C2E8;
  --owner-cpa-bg:         rgba(165, 140, 200, 0.10);
  --owner-cpa-border:     rgba(165, 140, 200, 0.25);

  --owner-client-color:   #E8D2C2;
  --owner-client-bg:      rgba(200, 165, 140, 0.10);
  --owner-client-border:  rgba(200, 165, 140, 0.25);

  /* ── Event-kind palette ──────────────────────────────────────────
     Four kinds for calendar chips and timeline markers. Each has a
     color (text + icon), a low-alpha background, and a matching
     border tint. */
  --event-consult-color:    #C9A05F;
  --event-consult-bg:       rgba(201, 160, 95, 0.18);
  --event-consult-border:   rgba(201, 160, 95, 0.45);

  --event-meeting-color:    #E6C580;
  --event-meeting-bg:       rgba(230, 197, 128, 0.16);
  --event-meeting-border:   rgba(230, 197, 128, 0.40);

  --event-comm-out-color:   #A7C9E8;
  --event-comm-out-bg:      rgba(140, 180, 230, 0.14);
  --event-comm-out-border:  rgba(140, 180, 230, 0.35);

  --event-comm-in-color:    #C7A8E0;
  --event-comm-in-bg:       rgba(180, 140, 210, 0.14);
  --event-comm-in-border:   rgba(180, 140, 210, 0.35);

  /* ── Status (legacy aliases — kept for older component CSS) ──────
     Prefer the semantic --status-* tokens above for new work. These
     remain so billing.css, matter-drawer.css, etc. stay valid. */
  --color-success:      #7FB582;
  --color-success-bg:   rgba(127, 181, 130, 0.10);
  --color-warning:      #D4A860;
  --color-warning-bg:   rgba(212, 168, 96, 0.10);
  --color-danger:       #C97A6D;
  --color-danger-bg:    rgba(201, 122, 109, 0.10);
  --color-info:         #C9A05F;
  --color-info-bg:      rgba(201, 160, 95, 0.10);

  /* Badge text */
  --color-accent-text:  #E6C47F;
  --color-success-text: #A7D4AA;
  --color-warning-text: #E6C580;
  --color-danger-text:  #E09A8E;
  --color-info-text:    #E6C47F;
  --color-neutral-text: var(--color-text-muted);

  /* Backward-compat aliases (billing.css, matter-drawer.css, chat-drawer.css) */
  --color-primary:    var(--color-accent);
  --color-primary-bg: var(--color-accent-light);

  /* ── Typography ──────────────────────────────────────────────────
     Three families, fixed. No new font families without an ADR.
     Headings serif, body sans, all numbers / IDs / dates / money mono. */
  --font-heading: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans:    var(--font-body);
  --font-mono:    'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', monospace;

  --text-3xs:  0.625rem;    /* 10px */
  --text-2xs:  0.6875rem;   /* 11px */
  --text-xs:   0.75rem;     /* 12px */
  --text-field: 0.8125rem;   /* 13px */
  --text-sm:   0.875rem;    /* 14px */
  --text-base: 0.9375rem;   /* 15px */
  --text-lg:   1.125rem;    /* 18px */
  --text-xl:   1.375rem;    /* 22px */
  --text-2xl:  1.75rem;     /* 28px */
  --text-3xl:  2.25rem;     /* 36px */

  /* Spacing scale — for content rhythm only.
     Layout-critical pixel widths (grid templates, cell heights) live
     as literal pixel values in component CSS; do NOT replace them
     with these. See "LOAD-BEARING PIXELS" comment at top of file. */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Radius scale — formal, tight. No 20+ pixel rounding.
     4px reserved for hardcoded use in dense UI (cells, status pills). */
  --radius-sm:   6px;     /* Inputs, small buttons */
  --radius-md:   10px;    /* Cards */
  --radius-lg:   14px;    /* Panels */
  --radius-xl:   18px;    /* Large cards */
  --radius-full: 9999px;  /* Pills, owner circles */

  /* Shadows — dark, opaque. Never DodgerBlue-tinted. */
  --shadow-sm: 0 1px 3px  rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);

  /* Pipeline stage colors — antique gold progression */
  --pipeline-new-lead:          #E6C47F;
  --pipeline-consult-scheduled: #D4B072;
  --pipeline-active-client:     #C9A05F;
  --pipeline-matter-complete:   #A88145;
  --pipeline-closed:            #576B85;

  /* Layout */
  --sidebar-width: 240px;
  --header-height: 56px;
}

/* ─── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient warmth — radial gradient overlay on body */
body {
  background:
    radial-gradient(ellipse at top, rgba(31, 58, 92, 0.4) 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(201, 160, 95, 0.04) 0%, transparent 50%),
    var(--color-bg-primary);
}

/* ─── Heading typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.heading {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  font-weight: 600;
}
h1 { font-size: var(--text-3xl); line-height: 1.2; }
h2 { font-size: var(--text-2xl); line-height: 1.3; }
h3 { font-size: var(--text-xl);  line-height: 1.4; }
h4 { font-size: var(--text-base); line-height: 1.4; }

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); }

/* ─── Selection + scrollbar ─────────────────────────────────────────── */
::selection {
  background: rgba(201, 160, 95, 0.35);
  color: #F0E6D2;
}

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-bg-tertiary);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-border-strong);
  background-clip: padding-box;
}
* { scrollbar-width: auto; scrollbar-color: var(--color-bg-tertiary) transparent; }

/* ─── Utility ───────────────────────────────────────────────────────── */
.font-mono { font-family: var(--font-mono); }

/* ─── Form select arrow (gold) ──────────────────────────────────────── */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23C9A05F' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
}

/* Native <select> dropdown menu — force readable contrast on the OS-default
   white menu. Without this, Classic's parchment text rendered against the
   white menu background was unreadable on Chrome / Firefox / Edge. */
select option,
.ifc-input option,
.ifc-select option {
  background-color: #1a2238;
  color: #F0E6D2;
}

/* ─── Intake form section headers ───────────────────────────────────── */
/* Gold border + gold icon + gold title across the board. Each section's
   inline per-section color is overridden so the header reads as gold. */
.ifc-section-header {
  border-bottom-color: var(--color-accent) !important;
}
.ifc-section-header > i,
.ifc-section-header > .ph,
.ifc-section-header > [class*="ph-"] {
  color: var(--color-accent) !important;
}
.ifc-section-header > span {
  color: var(--color-accent) !important;
}
/* Spouse-related section headers use parchment text for stronger contrast.
   Gold-on-navy reads as muted; parchment makes spouse-owned categories pop
   when reviewing a couple's plan (Spouse, Spouse Agents, etc.). */
.ifc-section[data-section="spouse"] .ifc-section-header > span,
.ifc-section[data-section="spouse_agents"] .ifc-section-header > span {
  color: var(--color-text-primary) !important;
}
.ifc-section--completed .ifc-section-header {
  background: rgba(201, 160, 95, 0.06) !important;
}

/* Chrome/Edge/Safari autofill forces -webkit-text-fill-color: black and a
   light-blue background regardless of any inline color: rule. On the Classic
   navy theme that paints autofilled inputs (first/last name, address, city,
   state, zip on Probate Decedent and Personal sections, plus Agents) as
   unreadable black-on-blue until the field is focused. Override the special
   property and use the giant-inset-box-shadow trick to mask the autofill
   bg, plus a 9999s transition so the real background-color animation never
   visibly fires. Backlog item from 2026-05-07 surfaced specifically on
   probate intake. */
[data-theme="classic"] input:-webkit-autofill,
[data-theme="classic"] select:-webkit-autofill,
[data-theme="classic"] textarea:-webkit-autofill,
[data-theme="dark"] input:-webkit-autofill,
[data-theme="dark"] select:-webkit-autofill,
[data-theme="dark"] textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--color-text-primary) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--color-bg-primary) inset !important;
  caret-color: var(--color-text-primary) !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* ─── Assets v2 grouped sub-panel headings ──────────────────────────── */
/* Gold across the board: text, icons, totals, AND the left-border sliver. */
.ifc-assets-group__title,
.ifc-assets-group__total {
  color: var(--color-accent) !important;
}
.ifc-assets-group__header > i,
.ifc-assets-group__header > .ph,
.ifc-assets-group__header > [class*="ph-"] {
  color: var(--color-accent) !important;
}
.ifc-assets-group {
  border-left-color: var(--color-accent) !important;
}

/* Handout asset group titles (Real Estate / Individual / Spouse / Joint /
   Other in Client Visuals panel) and Beneficiary Designation Checklist
   group titles share the same gold treatment. */
.estate-visuals__asset-group-title,
.estate-visuals__bdc-group-title {
  border-left-color: var(--color-accent) !important;
  color: var(--color-accent) !important;
}
.estate-visuals__asset-group-title i,
.estate-visuals__bdc-group-title i {
  color: var(--color-accent) !important;
}

/* ──────────────────────────────────────────────────────────────────────
   Living Intake — split-pane consultation view (slice 1: typed only).
   All colors via Classic tokens. No literal hex.
   ────────────────────────────────────────────────────────────────────── */

/* Mode toggle inside the matter-drawer Intake tab. Sits above the form. */
.li-mode-toggle {
  display: inline-flex;
  gap: 0;
  padding: 2px;
  margin: 0 0 var(--space-3) 0;
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.li-mode-toggle__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms, color 120ms;
}
.li-mode-toggle__btn i { font-size: 12px; }
.li-mode-toggle__btn:hover { color: var(--color-text-primary); }
.li-mode-toggle__btn.is-active {
  background: var(--color-bg-active);
  color: var(--color-accent);
  box-shadow: var(--shadow-gold-inset);
}

/* Living Intake full-screen shell — owns the viewport while open. */
.li-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-body);
}
/* Embedded inside the matter drawer: the shell owns the one scroll path
   inside the bounded drawer content, so Ward Output, the left pane, and the
   bottom dock all move together. Keeps the transcript pane
   from pushing the drawer body into a page scroll (Karen-incident
   followup — Taylor flagged narrative mode running off the page). */
.li-shell--embedded {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.li-error {
  padding: var(--space-6);
  margin: var(--space-6);
  background: var(--status-blocked-bg);
  color: var(--status-blocked-fg);
  border: 1px solid var(--status-blocked-border);
  border-radius: var(--radius-md);
}
.li-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
}
.li-header__right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
}
.li-header__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-primary);
}
.li-header__sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}
.li-header__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color 120ms, border-color 120ms;
}
.li-header__back:hover { color: var(--color-accent); border-color: var(--color-accent-border); }

.li-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(360px, 0.84fr) minmax(640px, 1.16fr);
  gap: 1px;
  background: var(--color-border-subtle);
  min-height: 0;
}
@media (max-width: 1000px) {
  .li-grid { grid-template-columns: 1fr; }
}
.li-left, .li-right {
  background: var(--color-bg-primary);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.li-left__header, .li-right__header {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-border-subtle);
}
.li-left__title, .li-right__title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text-primary);
}
.li-left__hint, .li-right__hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.li-transcript-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5) var(--space-2);
  background: var(--color-bg-primary);
  border-bottom: 1px solid var(--color-accent-border);
  box-shadow: inset 0 -1px 0 var(--color-accent-border), 0 1px 0 var(--color-accent-light-hi);
}
.li-transcript-head__left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.li-capture-status {
  padding: 0;
  color: var(--color-text-secondary);
  background: transparent;
  border-bottom: 0;
  font-size: var(--text-xs);
}
.li-capture-status--warn {
  color: var(--status-progress-fg);
  background: transparent;
  border-bottom-color: transparent;
}

/* Timeline pane — grows to fill the remaining left-column height so the
   transcript matches the structured intake on the right. The inner
   .li-timeline-mount does the scrolling; this frame just defines the
   bounding box. min-height keeps it usable when the composer + Ward
   questions consume a lot of vertical space. */
.li-transcript-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 300px;
  overflow: hidden;
  display: flex;
}
.li-timeline-mount {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-4) var(--space-5);
}
.li-past-transcripts {
  position: relative;
  flex: 0 0 auto;
}
.li-past-transcripts__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 26px;
  padding: 0 var(--space-2);
  color: var(--color-accent);
  background: transparent;
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-3xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.li-past-transcripts__toggle:hover {
  background: var(--color-accent-light);
}
.li-past-transcripts__menu {
  position: absolute;
  top: calc(100% + var(--space-1));
  right: 0;
  z-index: 20;
  width: min(24rem, calc(100vw - var(--space-8)));
  max-height: 15rem;
  overflow-y: auto;
  padding: var(--space-1);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.li-past-transcripts__menu[hidden],
.li-past-transcript-overlay[hidden] {
  display: none;
}
.li-past-transcripts__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: var(--space-2);
  color: var(--color-text-primary);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
}
.li-past-transcripts__item:hover {
  background: var(--color-accent-light);
}
.li-past-transcripts__item strong {
  color: var(--color-text-primary);
  font-size: var(--text-xs);
}
.li-past-transcripts__item span,
.li-past-transcripts__empty {
  color: var(--color-text-muted);
  font-size: var(--text-3xs);
}
.li-past-transcripts__empty {
  padding: var(--space-2);
  font-style: italic;
}
.li-past-transcript-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-strong);
}
.li-past-transcript-overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border-subtle);
  background: var(--color-bg-secondary);
}
.li-past-transcript-overlay__title {
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
}
.li-past-transcript-overlay__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--color-text-secondary);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.li-past-transcript-overlay__close:hover {
  color: var(--color-accent);
  border-color: var(--color-accent-border);
}
.li-past-transcript-overlay__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-3);
}
.li-past-transcript-empty {
  padding: var(--space-6) var(--space-3);
  color: var(--color-text-muted);
  text-align: center;
  font-size: var(--text-sm);
}
.li-past-transcript-line {
  display: grid;
  grid-template-columns: 3.25rem 5.5rem minmax(0, 1fr);
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border-subtle);
}
.li-past-transcript-line__time {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
}
.li-past-transcript-line__speaker {
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 700;
}
.li-past-transcript-line__text {
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  line-height: 1.45;
}
.li-timeline-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-8) var(--space-4);
  pointer-events: none;
}
.li-timeline-row {
  position: relative;
  z-index: 1;
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-border);
  transition: background 200ms, border-left-color 200ms;
}
.li-timeline-row--flash {
  background: var(--color-accent-light-hi);
  border-left-color: var(--color-accent);
}
.li-timeline-row__meta {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.li-timeline-row__kind {
  font-weight: 700;
  color: var(--color-accent);
}
.li-timeline-row__time { color: var(--color-text-muted); }
.li-timeline-row__body {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  line-height: 1.5;
  word-wrap: break-word;
}
.li-timeline-row__speaker {
  font-weight: 600;
  color: var(--color-text-secondary);
}
.li-timeline-row--directive .li-timeline-row__body {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  color: var(--color-accent);
}
.li-timeline-row--scribble .li-timeline-row__body {
  font-style: italic;
  color: var(--color-text-secondary);
}

/* Ward questions */
.li-questions-panel {
  flex: 0 0 auto;
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--color-accent-border);
  background: var(--color-bg-secondary);
  box-shadow: 0 0 0 1px var(--color-accent-light);
}
.li-questions-panel--has-question {
  animation: liQuestionPulse 2.4s ease-in-out infinite;
}
.li-questions-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.li-questions-panel__title {
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
}
.li-questions-panel__hint {
  color: var(--color-text-muted);
  font-size: var(--text-3xs);
}
.li-ward-pill-mount { padding: 0; }
.li-transcript-label {
  padding: 0;
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
}
.li-interim {
  display: none;
  margin: var(--space-2) var(--space-5) 0;
  padding: var(--space-2) var(--space-3);
  color: var(--status-progress-fg);
  background: var(--status-progress-bg);
  border: 1px dashed var(--status-progress-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  line-height: 1.4;
}
.li-interim--visible { display: block; }
.li-ward-questions {
  display: block;
}
.li-ward-question-empty {
  padding: var(--space-2) 0;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-style: italic;
}
.li-ward-question-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-accent-light);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-md);
}
.li-ward-pill__label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.04em;
}
.li-ward-pill__text {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  line-height: 1.4;
}
.li-ward-pill__choices {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.li-ward-pill__choice {
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-primary);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 120ms;
}
.li-ward-pill__choice:hover {
  background: var(--color-accent-light-hi);
  color: var(--color-accent);
}
.li-ward-pill__choice--skip {
  color: var(--color-text-muted);
  border-color: var(--color-border);
}
.li-ward-answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: var(--space-2);
  align-items: stretch;
}
.li-ward-answer {
  width: 100%;
  min-height: 48px;
  resize: vertical;
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-primary);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  outline: none;
}
.li-ward-answer:focus {
  border-color: var(--color-accent);
  box-shadow: inset 0 0 0 1.5px var(--color-accent);
}
.li-ward-answer__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-on-gold);
  background: var(--gradient-gold-primary);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-gold-inset);
  cursor: pointer;
}

/* Input composer */
.li-composer {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: var(--space-3) var(--space-3) var(--space-5) var(--space-5);
  border-top: 1px solid var(--color-accent-border);
  background: linear-gradient(180deg, var(--color-bg-secondary), var(--color-bg-primary));
  box-shadow: var(--shadow-md);
}
.li-composer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}
.li-composer__title {
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
}
.li-composer__hint {
  color: var(--color-text-muted);
  font-size: var(--text-3xs);
}
.li-note-toolbar {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  gap: var(--space-1);
  margin: 0;
}
.li-note-toolbar__btn {
  width: var(--space-6);
  height: var(--space-6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 120ms, background 120ms, border-color 120ms, box-shadow 120ms;
}
.li-note-toolbar__btn:hover,
.li-note-toolbar__btn:focus {
  color: var(--color-accent);
  background: var(--color-accent-light);
  border-color: var(--color-accent-border);
  box-shadow: inset 0 0 0 1px var(--color-accent-border);
  outline: none;
}
.li-input-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.li-input {
  width: 100%;
  flex: 1 1 auto;
  min-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  resize: none;
  padding: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-field);
  color: var(--color-text-primary);
  background: var(--color-bg-input);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.li-input:focus {
  border-color: var(--color-accent);
  box-shadow: inset 0 0 0 1.5px var(--color-accent), 0 0 0 3px var(--color-accent-light);
}
.li-input-tools {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.li-tool-btn {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 0 var(--space-2);
  color: var(--color-text-muted);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.li-tool-btn:hover,
.li-tool-btn.is-active {
  color: var(--color-accent);
  background: var(--color-accent-light);
  border-color: var(--color-accent-border);
}
.li-tool-btn__label {
  font-size: var(--text-xs);
  font-weight: 700;
}
.li-listening-pulse {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.li-listening-pulse::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-accent);
  box-shadow: 0 0 0 0 var(--color-accent-light-hi);
  animation: liPulse 1.8s ease-out infinite;
}
.li-input__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--gradient-gold-primary);
  color: var(--color-bg-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-gold-inset);
}
.li-input__submit:hover { filter: brightness(1.05); }

.li-recording-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 32px;
  padding: 0 var(--space-3);
  color: var(--color-text-secondary);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-accent-border);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.li-recording-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--color-accent);
  animation: liPulse 1.8s ease-out infinite;
}
.li-recording-pill__wave {
  font-family: var(--font-mono);
  color: var(--color-accent);
}
.li-recording-pill__timer {
  font-family: var(--font-mono);
  color: var(--color-text-muted);
}
.li-recording-pill--processing {
  color: var(--color-accent);
  background: var(--color-accent-light);
}
.li-header__end {
  cursor: pointer;
}
@keyframes liPulse {
  0% { box-shadow: 0 0 0 0 var(--color-accent-light-hi); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes liQuestionPulse {
  0%, 100% {
    box-shadow: 0 0 0 1px var(--color-accent-border), 0 0 8px var(--color-accent-light);
  }
  50% {
    box-shadow: 0 0 0 1px var(--color-accent), 0 0 18px var(--color-accent-light-hi);
  }
}

/* Right pane — wraps the existing IntakeForm */
.li-right > #li-form-mount {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--space-5) var(--space-4) 0;
}
.li-shell--embedded .li-grid {
  flex: 0 0 auto;
  grid-template-columns: minmax(340px, 34%) minmax(0, 1fr);
  min-height: 100%;
  align-items: stretch;
}
.li-shell--embedded .li-right,
.li-shell--embedded .li-right > #li-form-mount,
.li-shell--embedded .lip-root {
  min-height: auto;
  overflow: visible;
}
.li-shell--embedded .li-right > #li-form-mount {
  flex: 0 0 auto;
  padding-right: 0;
  padding-bottom: var(--space-6);
}
.li-shell--embedded .lip-root,
.li-shell--embedded .lip-body {
  flex: 0 0 auto;
}
.li-shell--embedded .lip-body {
  min-height: auto;
  max-height: none;
  overflow-y: visible;
}
.li-right__header {
  justify-content: space-between;
  align-items: center;
}
.li-right__heading {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}
.li-mode-toggle--living {
  margin: 0;
}
.li-mode-toggle__btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}
.nb-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: var(--space-4) 0 0 var(--space-5);
}
.nb-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-subtle);
}
.nb-panel__title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  color: var(--color-text-primary);
}
.nb-panel__actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.nb-panel__history {
  min-height: 30px;
  max-width: 190px;
  color: var(--color-text-primary);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}
.nb-panel__btn,
.nb-panel__start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 30px;
  padding: 0 var(--space-2);
  color: var(--color-text-secondary);
  background: transparent;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nb-panel__btn:hover,
.nb-panel__start:hover {
  color: var(--color-accent);
  border-color: var(--color-accent-border);
}
.nb-panel__btn--primary,
.nb-panel__start {
  color: var(--color-on-gold);
  background: var(--gradient-gold-primary);
  box-shadow: var(--shadow-gold-inset);
  border-color: var(--color-accent-border);
}
.nb-panel__status {
  padding: var(--space-2) 0;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  border-bottom: 1px solid var(--color-border-subtle);
}
.nb-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-4) var(--space-6) 0;
}
.nb-panel__empty,
.nb-panel__error {
  display: grid;
  gap: var(--space-3);
  justify-items: start;
  padding: var(--space-4);
  color: var(--color-text-secondary);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.nb-panel__error {
  color: var(--status-blocked-fg);
  background: var(--status-blocked-bg);
  border-color: var(--status-blocked-border);
}
.nb-markdown {
  color: var(--color-text-secondary);
  line-height: 1.55;
  font-size: var(--text-sm);
}
.nb-markdown h1,
.nb-markdown h2,
.nb-markdown h3 {
  margin: var(--space-4) 0 var(--space-2);
  color: var(--color-text-primary);
  letter-spacing: 0;
}
.nb-markdown h1 {
  font-size: var(--text-xl);
  font-family: var(--font-heading);
}
.nb-markdown h2 {
  font-size: var(--text-base);
  font-family: var(--font-heading);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--color-accent-border);
}
.nb-markdown h3 {
  margin-top: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
}
.nb-markdown p {
  margin: 0 0 var(--space-2);
}
.nb-markdown ul {
  margin: 0 0 var(--space-3) var(--space-4);
  padding: 0;
}
.nb-markdown li ul {
  margin-top: var(--space-1);
  margin-bottom: var(--space-2);
}
.nb-markdown li {
  margin-bottom: var(--space-1);
}

.li-process-panel {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 8;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
  padding: var(--space-3) var(--space-5);
  box-shadow: var(--shadow-md);
}
.li-process-panel[hidden] { display: none; }
.li-process-panel--header {
  flex: 1 1 auto;
  min-width: 0;
  position: static;
  bottom: auto;
  z-index: auto;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0;
  background: transparent;
  border-top: 0;
  border-bottom: 0;
  box-shadow: none;
}
.li-process-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.li-process-panel--header .li-process-panel__head {
  flex: 0 0 auto;
  justify-content: flex-start;
  margin-bottom: 0;
}
.li-process-panel__title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  color: var(--color-text-primary);
}
.li-process-panel__status {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.li-process-panel--header .li-process-panel__status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.li-process-steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.li-process-panel--header .li-process-steps {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.li-process-step {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 28px;
  padding: 0 var(--space-2);
  color: var(--color-text-muted);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-family: var(--font-body);
  cursor: default;
}
.li-process-panel--header .li-process-step {
  flex: 0 0 auto;
}
.li-process-step[aria-disabled="false"] {
  cursor: pointer;
}
.li-process-step[aria-disabled="false"]:hover {
  border-color: var(--color-accent-border);
  background: var(--color-accent-light);
}
.li-process-step i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: inherit;
}
.li-process-step--started {
  color: var(--status-progress-fg);
  background: var(--status-progress-bg);
  border-color: var(--status-progress-border);
}
.li-process-step--completed {
  color: var(--status-done-fg);
  background: var(--status-done-bg);
  border-color: var(--status-done-border);
}
.li-process-step--completed i {
  color: var(--status-done-dot);
}
.li-process-step--active {
  border-color: var(--color-accent);
  box-shadow: inset 0 0 0 1px var(--color-accent-border);
}
.li-process-step--failed,
.li-process-step--skipped {
  color: var(--status-blocked-fg);
  background: var(--status-blocked-bg);
  border-color: var(--status-blocked-border);
}
.li-process-artifacts {
  display: block;
  margin-top: var(--space-3);
}
.li-shell > .li-process-artifacts {
  margin: var(--space-3) var(--space-5) 0;
}
.li-process-artifacts[hidden] { display: none; }
.li-artifact-card {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-primary);
}
.li-artifact-card__title {
  padding: var(--space-2);
  color: var(--color-accent);
  font-size: var(--text-3xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-border-subtle);
}
.li-artifact-card__body {
  max-height: 280px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: var(--space-3);
  color: var(--color-text-secondary);
  font: var(--text-sm)/1.55 var(--font-body);
}
.li-draft-ready {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--color-accent-light);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-md);
}
.li-shell > .li-draft-ready {
  margin: var(--space-3) var(--space-5);
}
.li-draft-ready[hidden] { display: none; }
.li-draft-ready__copy {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}
.li-draft-ready__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 32px;
  padding: 0 var(--space-3);
  color: var(--color-bg-primary);
  background: var(--gradient-gold-primary);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-gold-inset);
  cursor: pointer;
  font-weight: 700;
}

/* Citation pill — gold (auto-applied) / amber (pending) chip under a field */
.ifc-citation-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.li-citation-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-accent);
  background: var(--color-accent-light);
  border: 1px solid var(--color-accent-border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 120ms, color 120ms;
}
.li-citation-pill i { font-size: 10px; }
.li-citation-pill:hover {
  background: var(--color-accent-light-hi);
  color: var(--color-accent-hover);
}
.li-citation-pill--pending {
  color: var(--status-progress-fg);
  background: var(--status-progress-bg);
  border-color: var(--status-progress-border);
}
.li-citation-pill--pending:hover {
  color: var(--status-progress-fg);
  background: var(--status-progress-bg);
}

/* Living Intake panel */
.lip-root {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.lip-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 41px;
  padding: var(--space-3) var(--space-5) var(--space-2);
  border-bottom: 1px solid var(--color-accent-border);
  box-shadow: inset 0 -1px 0 var(--color-accent-border), 0 1px 0 var(--color-accent-light-hi);
}
.lip-top__main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.lip-kicker {
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--color-accent);
}
.lip-completion {
  min-width: 150px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.lip-completion__track {
  height: 6px;
  margin-top: var(--space-1);
  overflow: hidden;
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: 999px;
}
.lip-completion__fill {
  height: 100%;
  background: var(--gradient-gold-primary);
  box-shadow: var(--shadow-gold-inset);
}
.lip-status {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 0;
  padding: 0;
  font-size: var(--text-xs);
  line-height: 1.15;
  color: var(--color-text-secondary);
}
.lip-status--processing::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-accent);
  animation: liPulse 1.8s ease-out infinite;
}
.lip-preview-notice,
.nb-preview-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: var(--space-3) var(--space-4) 0;
  padding: var(--space-3);
  color: var(--color-text-secondary);
  background: var(--color-accent-light);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-md);
}
.nb-preview-notice {
  margin: 0 0 var(--space-3);
}
.lip-preview-notice i,
.nb-preview-notice i {
  flex: 0 0 auto;
  color: var(--color-accent);
  font-size: var(--text-lg);
}
.lip-preview-notice strong,
.nb-preview-notice strong {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--color-text-primary);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
}
.lip-preview-notice span,
.nb-preview-notice span {
  display: block;
  font-size: var(--text-xs);
  line-height: 1.45;
}
.lip-dot-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: 5px var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-3xs);
  font-style: italic;
  border-bottom: 1px solid var(--color-border-subtle);
}
.lip-dot-legend span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.lip-dot-legend .lip-state-dot {
  position: static;
  margin-left: 0;
}
.lip-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
}
.lip-dot--question {
  color: var(--color-bg-primary);
  background: var(--color-accent);
}
.lip-dot--warning {
  min-width: 8px;
  width: 8px;
  height: 8px;
  background: var(--status-blocked-dot);
}
.lip-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-3) var(--space-4) var(--space-5);
  scroll-behavior: smooth;
}
.lip-section {
  border-left: 3px solid var(--color-accent-border);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.lip-section + .lip-section {
  margin-top: var(--space-3);
}
.lip-section + .lip-fiduciary-table-section,
.lip-fiduciary-table-section + .lip-section {
  margin-top: var(--space-3);
}
.lip-section + .lip-spouse-plan-row,
.lip-spouse-plan-row + .lip-section {
  margin-top: var(--space-3);
}
.lip-section--updated {
  box-shadow: 0 0 0 1px var(--color-accent-border), var(--shadow-md);
}
.lip-section--writing {
  border-color: var(--color-accent-border);
}
.lip-section--focus {
  box-shadow: 0 0 0 1px var(--color-accent-border);
}
.lip-section--required-complete {
  border-color: var(--status-done-border);
  box-shadow: 0 0 0 1px var(--status-done-border), 0 0 12px var(--color-success-bg);
}
.lip-section--required-complete .lip-person-initials {
  box-shadow: 0 0 0 1px var(--status-done-border), 0 0 10px var(--color-success-bg);
}
.lip-section--required-complete .lip-personal-row--identity {
  width: fit-content;
  border-radius: var(--radius-xs);
  box-shadow: 0 0 0 1px var(--status-done-border), 0 0 10px var(--color-success-bg);
}
.lip-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 36px;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border-subtle);
}
.lip-section__title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
}
.lip-required-count {
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--text-3xs);
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lip-required-check {
  color: var(--status-done-dot);
  font-size: var(--text-sm);
}
.lip-section__badges {
  display: inline-flex;
  gap: var(--space-2);
}
.lip-section__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  min-width: 0;
  margin-left: auto;
}
.lip-section__toggles {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
  min-width: 0;
}
.lip-spouse-plan-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
}
.lip-section-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  color: var(--color-text-muted);
  font-size: var(--text-3xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lip-section-toggle input {
  width: 12px;
  height: 12px;
  accent-color: var(--color-accent);
  flex: 0 0 auto;
}
.lip-badge {
  padding: 2px var(--space-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--color-accent-border);
}
.lip-badge--updated,
.lip-badge--writing {
  color: var(--color-accent);
  background: var(--color-accent-light);
}
.lip-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3) var(--space-3);
}
.lip-fields--personal,
.lip-fields--spouse,
.lip-fields--children,
.lip-fields--people {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
}
.lip-personal-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-1);
  min-width: 0;
  min-height: 25px;
}
.lip-personal-split {
  display: grid;
  grid-template-columns: max-content 1px minmax(180px, 1fr);
  align-items: stretch;
  gap: var(--space-2);
  width: 100%;
  min-width: 0;
}
.lip-personal-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}
.lip-personal-divider {
  width: 1px;
  min-height: 100%;
  background: var(--color-border-light);
  opacity: 0.85;
}
.lip-personal-row--location,
.lip-personal-row--email,
.lip-spouse-row--contact {
  margin-left: calc(22px + var(--space-2));
}
.lip-person-initials {
  margin-right: var(--space-1);
}
.lip-personal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  color: var(--color-accent);
  font-size: var(--text-field);
  line-height: 1;
}
.lip-personal-icon i {
  font-size: 1em;
  line-height: 1;
}
.lip-personal-icon--dob,
.lip-personal-icon--phone {
  font-size: var(--text-3xs);
  margin-left: auto;
}
.lip-personal-row--location .lip-personal-icon,
.lip-personal-row--email .lip-personal-icon {
  font-size: var(--text-3xs);
}
.lip-personal-pair--state-zip {
  width: fit-content;
}
.lip-personal-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-1);
  min-width: 0;
}
.lip-personal-pair.lip-personal-pair--state-zip {
  display: flex;
  align-items: center;
  width: fit-content;
}
.lip-personal-pair .lip-field {
  min-width: 0;
}
.lip-fields--personal .lip-field,
.lip-fields--spouse .lip-field,
.lip-fields--children .lip-field,
.lip-fields--people .lip-field {
  width: fit-content;
  max-width: 100%;
}
.lip-fields--personal .lip-field__main,
.lip-fields--spouse .lip-field__main,
.lip-fields--children .lip-field__main,
.lip-fields--people .lip-field__main {
  width: auto;
  max-width: 100%;
}
.lip-fields--personal .lip-field__value,
.lip-fields--spouse .lip-field__value,
.lip-fields--children .lip-field__value,
.lip-fields--people .lip-field__value {
  flex: 0 1 auto;
}
.lip-personal__field--street .lip-field__value,
.lip-personal__field--city .lip-field__value,
.lip-personal-pair--state-zip .lip-field__value,
.lip-personal__field--county .lip-field__value,
.lip-personal__field--phone .lip-field__value,
.lip-personal__field--dob .lip-field__value,
.lip-personal__field--email .lip-field__value,
.lip-personal__field--child-flag .lip-field__value,
.lip-assumed-address {
  font-size: var(--text-3xs);
}
.lip-assumed-address {
  color: var(--color-text-secondary);
  font-style: italic;
  font-weight: 650;
}
.lip-child-card {
  width: 100%;
  padding: 0;
}
.lip-child-card .lip-personal-split,
.lip-fiduciary-card .lip-personal-split {
  width: 100%;
}
.lip-child-card + .lip-child-card,
.lip-fiduciary-card + .lip-fiduciary-card,
.lip-child-card + .lip-add-child,
.lip-fiduciary-card + .lip-add-fiduciary {
  margin-top: var(--space-1);
}
.lip-child-flags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  width: 100%;
  min-height: 25px;
  margin-top: var(--space-1);
  padding: 2px var(--space-2);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
}
.lip-child-flag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-text-muted);
  font-size: var(--text-3xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lip-child-flag input {
  width: 12px;
  height: 12px;
  accent-color: var(--color-accent);
}
.lip-fiduciary-card {
  width: 100%;
  padding: 0;
}
.lip-fiduciary-table-wrap {
  width: 100%;
  margin-top: var(--space-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  background: var(--color-bg-input);
  overflow: hidden;
}
.lip-fiduciary-table-section {
  width: 100%;
}
.lip-fiduciary-table-wrap--detached {
  margin-top: 0;
  background: var(--color-bg-secondary);
}
.lip-fiduciary-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-bottom: 1px solid var(--color-border-light);
}
.lip-fiduciary-table-head strong {
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lip-fiduciary-mirror {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lip-fiduciary-mirror input {
  width: 12px;
  height: 12px;
  accent-color: var(--color-accent);
}
.lip-fiduciary-table {
  display: grid;
  width: 100%;
}
.lip-fiduciary-table__row {
  display: grid;
  grid-template-columns: minmax(38px, 0.35fr) repeat(5, minmax(82px, 1fr));
  align-items: stretch;
  min-height: 32px;
  border-top: 1px solid var(--color-border-subtle);
}
.lip-fiduciary-table__row:first-child {
  border-top: 0;
}
.lip-fiduciary-table__row--head {
  min-height: 24px;
  color: var(--color-text-muted);
  background: var(--color-accent-light);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lip-fiduciary-table__row > span,
.lip-fiduciary-table__role,
.lip-fiduciary-table__cell {
  min-width: 0;
  padding: 3px var(--space-1);
  border-left: 1px solid var(--color-border-subtle);
}
.lip-fiduciary-table__row > span:first-child,
.lip-fiduciary-table__role {
  border-left: 0;
}
.lip-fiduciary-table__role {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  color: var(--color-text-primary);
  font-size: var(--text-xs);
  font-weight: 800;
}
.lip-fiduciary-table__cell {
  display: flex;
  justify-content: center;
  align-items: center;
}
.lip-fiduciary-select {
  min-width: 0;
  width: 100%;
  height: 22px;
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xs);
  font-size: var(--text-xs);
}
.lip-fiduciary-select:disabled {
  color: var(--color-text-muted);
  opacity: 0.8;
  cursor: not-allowed;
}
.lip-fiduciary-table-footer {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border-top: 1px solid var(--color-border-light);
}
.lip-fiduciary-mirror-note {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-style: italic;
}
.lip-fiduciary-row-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 22px;
  padding: 0 var(--space-2);
  color: var(--color-accent);
  background: transparent;
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-xs);
  font-size: var(--text-3xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.lip-fiduciary-row-add:hover {
  background: var(--color-accent-light);
}
.lip-add-child {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 25px;
  padding: 0 var(--space-2);
  color: var(--color-accent);
  background: var(--color-accent-light);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-3xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.lip-add-child:hover {
  background: var(--color-accent-light-hi);
}
.lip-distribution-box {
  grid-column: 1 / -1;
  width: 100%;
}
.lip-distribution-narrative {
  width: 100%;
  height: auto;
  min-height: 112px;
  padding: var(--space-2);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
}
.lip-distribution-narrative .lip-field__main {
  align-items: flex-start;
  min-height: 92px;
}
.lip-distribution-narrative .lip-field__value,
.lip-distribution-narrative .lip-field__value--placeholder {
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-style: italic;
  line-height: 1.45;
  white-space: pre-wrap;
}
.lip-distribution-narrative.lip-field--empty .lip-field__value,
.lip-distribution-narrative .lip-field__value--placeholder {
  color: var(--status-blocked-fg);
}
.lip-distribution-narrative.lip-field--editing {
  width: 100%;
  min-height: 112px;
}
.lip-distribution-narrative .lip-editor {
  width: 100%;
  min-height: 96px;
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-style: italic;
  line-height: 1.45;
  resize: vertical;
}
.lip-visuals-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(220px, 1.2fr);
  gap: var(--space-3);
  width: 100%;
}
.lip-visual-field {
  width: 100%;
  height: auto;
  min-height: 38px;
  padding: var(--space-2);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
}
.lip-visual-field .lip-field__main {
  min-height: 20px;
  align-items: flex-start;
}
.lip-visual-field .lip-field__value,
.lip-visual-field .lip-field__value--placeholder {
  font-size: var(--text-xs);
  line-height: 1.4;
}
.lip-visual-field--wide {
  grid-column: 1 / -1;
  min-height: 62px;
}
.lip-visual-field--wide .lip-field__main {
  min-height: 44px;
}
.lip-visual-field--wide .lip-editor,
.lip-visual-field--wide.lip-field--editing {
  width: 100%;
  min-height: 58px;
}
.lip-ward-notes {
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-width: 0;
  color: var(--color-accent);
  font-size: var(--text-3xs);
  font-style: italic;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-left: var(--space-1);
  overflow: visible;
}
.lip-ward-notes .lip-field {
  width: 100%;
  height: 100%;
  min-height: 64px;
  padding: 0 8px 0 0;
}
.lip-ward-notes .lip-field__main {
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  min-height: 64px;
  padding: 1px 10px 1px 0;
}
.lip-ward-notes .lip-field__value {
  color: var(--color-accent);
  font-size: var(--text-3xs);
  font-style: italic;
  font-weight: 650;
  line-height: 1.35;
}
.lip-ward-notes .lip-field--empty .lip-field__value,
.lip-ward-notes .lip-field__value--placeholder {
  color: var(--color-accent);
  opacity: 0.72;
}
.lip-ward-notes .lip-field--editing {
  width: 100%;
  height: 100%;
  min-height: 64px;
}
.lip-ward-notes .lip-editor {
  width: 100%;
  height: 100%;
  min-height: 64px;
  color: var(--color-accent);
  font-size: var(--text-3xs);
  font-style: italic;
  line-height: 1.35;
  resize: vertical;
}
.lip-ward-notes__extras {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--color-accent);
  font-size: var(--text-3xs);
  font-style: italic;
  line-height: 1.35;
}
/* Provenance line inside any Ward Notes panel — where Ward got the info
   from. Sits just below extras so it reads as a footnote rather than a
   field. Used to be inline citation pills on each field row; moved here
   so the form doesn't have "ctx:ward-intake" overlapping address rows. */
.lip-ward-notes__sources {
  margin-top: var(--space-1);
  padding-top: 4px;
  border-top: 1px dashed var(--color-accent-border);
  color: var(--color-text-muted);
  font-size: var(--text-3xs);
  font-style: italic;
  line-height: 1.35;
}
.lip-ward-notes__sources-label {
  color: var(--color-accent);
  font-weight: 600;
  font-style: normal;
}
.lip-ward-notes__sources-value {
  color: var(--color-text-secondary);
}
/* Generic Ward Notes block for sections without a person-style panel
   (assets, agents, distribution, etc.). Renders below the section's
   fields when Ward has populated anything in it. */
.lip-ward-notes--generic {
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg-tertiary);
  border: 1px dashed var(--color-accent-border);
  border-radius: var(--radius-sm);
  width: auto;
  height: auto;
  min-height: 0;
}
.lip-ward-notes__title {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--color-accent);
  font-size: var(--text-3xs);
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.lip-ward-notes__title i { font-size: 11px; }
.lip-suggestion-row,
.lip-item {
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.lip-field {
  position: relative;
  background: transparent;
  border: 0;
  border-radius: 0;
  height: 25px;
  min-height: 25px;
  padding: 3px 8px 3px 2px;
}
.lip-field--pending {
  border: 0;
  background: transparent;
}
.lip-field--committed {
  border: 0;
  background: transparent;
}
.lip-field--warning {
  border: 0;
  background: transparent;
}
.lip-field--pending,
.lip-field--warning {
  height: auto;
}
.lip-field--editing {
  width: fit-content;
  max-width: 100%;
  min-width: 42px;
  height: 25px;
  min-height: 25px;
  padding: 0;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  background: var(--color-bg-input);
}
.lip-field__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  height: 100%;
  width: 100%;
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.lip-field__title-row {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
}
.lip-field__label {
  font-size: var(--text-3xs);
  line-height: 1.2;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lip-field__value {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
  color: var(--color-text-primary);
  font-size: var(--text-field);
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.lip-field--empty .lip-field__value,
.lip-field__value--placeholder {
  color: var(--status-blocked-fg);
  font-style: italic;
  font-weight: 600;
}
.lip-state-dot {
  position: absolute;
  top: 3px;
  right: 1px;
  width: 3.5px;
  height: 3.5px;
  flex: 0 0 3.5px;
  margin-left: auto;
  border-radius: 999px;
  box-shadow: none;
}
.lip-state-dot--filled {
  background: var(--status-done-dot);
}
.lip-state-dot--unknown {
  background: var(--status-blocked-dot);
}
.lip-state-dot--pending {
  background: var(--status-done-dot);
}
.lip-state-dot--user {
  background: var(--color-accent);
}
.lip-state-dot--warning {
  background: var(--status-blocked-dot);
}
.lip-citations {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-1);
}
.lip-field__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.lip-btn {
  min-height: 26px;
  padding: 0 var(--space-2);
  color: var(--color-text-secondary);
  background: transparent;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.lip-btn--primary {
  color: var(--color-on-gold);
  background: var(--gradient-gold-primary);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-gold-inset);
}
.lip-editor {
  width: auto;
  max-width: 100%;
  min-width: 40px;
  height: 23px;
  min-height: 23px;
  padding: 0 5px;
  color: var(--color-text-primary);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: var(--text-field);
  font-weight: 650;
  line-height: 1.25;
  outline: none;
}
.lip-personal__field--street .lip-editor,
.lip-personal__field--city .lip-editor,
.lip-personal-pair--state-zip .lip-editor,
.lip-personal__field--county .lip-editor,
.lip-personal__field--phone .lip-editor,
.lip-personal__field--dob .lip-editor,
.lip-personal__field--email .lip-editor {
  font-size: var(--text-3xs);
}
.lip-item {
  grid-column: 1 / -1;
  padding: var(--space-2);
}
.lip-assets {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}
.lip-asset-group {
  width: 100%;
  overflow: hidden;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
}
.lip-asset-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  padding: 0 var(--space-2);
  color: var(--color-text-secondary);
  background: var(--color-bg-primary);
  border-bottom: 1px solid var(--color-border-light);
}
.lip-asset-group__head strong {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 650;
}
.lip-asset-group__head span {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
}
.lip-asset-group__summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.lip-asset-group__summary b {
  color: var(--color-text-muted);
  font-weight: 700;
}
.lip-asset-group__summary em {
  color: var(--color-accent);
  font-style: normal;
}
.lip-asset-group__rows {
  display: flex;
  flex-direction: column;
}
.lip-asset-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-1);
  min-height: 32px;
  padding: var(--space-1) var(--space-2);
  border-top: 1px solid var(--color-border-light);
  font-size: var(--text-xs);
}
.lip-asset-row:first-child {
  border-top: 0;
}
.lip-asset-row--other {
  display: grid;
  grid-template-columns: minmax(5.5rem, 0.9fr) minmax(8.75rem, 1.4fr) minmax(3.5rem, 0.6fr) minmax(6.875rem, 1fr) minmax(5.25rem, 0.8fr);
  align-items: center;
}
.lip-asset-row--other .lip-asset-field--value {
  justify-self: end;
}
.lip-asset-field--owner .lip-field__value {
  min-width: 2.5rem;
}
.lip-asset-field--description .lip-field__value,
.lip-asset-field--notes .lip-field__value {
  min-width: 5.25rem;
}
.lip-asset-account-block {
  border-top: 1px solid var(--color-border-light);
}
.lip-asset-account-block:first-child {
  border-top: 0;
}
.lip-asset-account-block .lip-asset-row {
  border-top: 0;
}
.lip-asset-beneficiary-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-3);
  min-height: 32px;
  padding: 0 var(--space-2) var(--space-1) calc(var(--space-2) + var(--space-3));
  font-size: var(--text-2xs);
  font-style: italic;
}
.lip-asset-line-field {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  flex: 1 1 0;
  min-width: 0;
}
.lip-asset-line-field__label {
  flex: 0 0 auto;
  color: var(--color-text-secondary);
  font-size: var(--text-2xs);
  font-style: italic;
  font-weight: 800;
  white-space: nowrap;
}
.lip-asset-field {
  width: fit-content;
  max-width: 100%;
}
.lip-asset-row .lip-field {
  height: 26px;
  min-height: 26px;
  padding: 2px 7px 2px 1px;
}
.lip-asset-row .lip-field__value,
.lip-asset-row .lip-field__value--placeholder,
.lip-asset-row .lip-editor {
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.2;
}
.lip-asset-row .lip-editor {
  height: 24px;
  min-height: 24px;
  padding: 0 3px;
}
.lip-asset-beneficiary-row .lip-field {
  flex: 1 1 auto;
  width: auto;
  min-width: 88px;
  height: 20px;
  min-height: 20px;
  padding: 0 7px 0 0;
  border-bottom: 1px solid var(--color-border-light);
}
.lip-asset-beneficiary-row .lip-field__value,
.lip-asset-beneficiary-row .lip-field__value--placeholder,
.lip-asset-beneficiary-row .lip-editor {
  min-width: 88px;
  font-size: var(--text-2xs);
  font-style: italic;
  font-weight: 700;
  line-height: 1.2;
}
.lip-asset-field--line.lip-field--empty .lip-field__value--placeholder {
  opacity: 0;
}
.lip-asset-field--line .lip-editor {
  height: 20px;
  min-height: 20px;
  padding: 0 2px;
}
.lip-asset-field--title .lip-field__value,
.lip-asset-field--wide .lip-field__value {
  min-width: 92px;
}
.lip-asset-field--value {
  margin-left: auto;
  min-width: 78px;
}
.lip-asset-field--value .lip-field__main {
  text-align: right;
}
.lip-asset-field--value .lip-field__value,
.lip-asset-field--value .lip-field__value--placeholder,
.lip-asset-field--value .lip-editor {
  text-align: right;
}
.lip-asset-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: fit-content;
  min-height: 26px;
  padding-right: 7px;
}
.lip-asset-select {
  height: 24px;
  min-width: 92px;
  max-width: none;
  padding: 0 var(--space-3) 0 var(--space-1);
  color: var(--color-text-primary);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 650;
  outline: none;
}
.lip-asset-select:focus {
  border-color: var(--color-accent);
  box-shadow: inset 0 0 0 1px var(--color-accent);
}
.lip-asset-row--real_estate .lip-asset-select-wrap:first-child .lip-asset-select {
  min-width: 124px;
}
.lip-asset-row--real_estate .lip-asset-select-wrap:nth-of-type(2) .lip-asset-select {
  min-width: 54px;
}
.lip-asset-row--accounts .lip-asset-select-wrap:first-child .lip-asset-select {
  min-width: 122px;
}
.lip-asset-row--accounts .lip-asset-select-wrap .lip-asset-select {
  min-width: 118px;
}
.lip-asset-chip,
.lip-asset-empty {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
}
.lip-asset-chip {
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-weight: 700;
}
.lip-asset-empty {
  padding: var(--space-1) var(--space-2);
  color: var(--status-blocked-fg);
  font-style: italic;
  font-weight: 700;
}
.lip-asset-add {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  width: fit-content;
  min-height: 24px;
  margin: var(--space-1) var(--space-2) var(--space-2);
  padding: 0 var(--space-2);
  color: var(--color-accent);
  background: transparent;
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-xs);
  font-size: var(--text-3xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.lip-asset-add:hover {
  background: var(--color-accent-light);
}
.lip-assets-total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-2);
  color: var(--color-text-primary);
  border-top: 1px solid var(--color-accent-border);
  font-size: var(--text-sm);
  font-weight: 800;
}
.lip-assets-total strong {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}
.lip-asset-institution {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  flex: 0 1 auto;
  width: fit-content;
}
.lip-asset-institution__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12px;
}
.lip-item__title {
  margin-bottom: var(--space-1);
  color: var(--color-text-primary);
  font-weight: 700;
  font-size: var(--text-xs);
}
.lip-item__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-2);
}
.lip-ask,
.lip-warning--section {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-2) var(--space-3) 0;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
}
.lip-ask {
  color: var(--color-text-primary);
  background: var(--color-accent-light);
  border: 1px dashed var(--color-accent-border);
}
.lip-ask strong,
.lip-ask span {
  display: block;
}
.lip-ask strong {
  color: var(--color-accent);
  margin-bottom: 2px;
}
.lip-warning {
  margin-top: var(--space-2);
  color: var(--status-blocked-fg);
  font-size: var(--text-xs);
}
.lip-warning--section {
  color: var(--status-blocked-fg);
  background: var(--status-blocked-bg);
  border: 1px solid var(--status-blocked-border);
}
.lip-empty,
.lip-error {
  padding: var(--space-3);
  color: var(--color-text-muted);
}
.lip-empty--dashed {
  grid-column: 1 / -1;
  border: 1px dashed var(--color-accent-border);
  border-radius: var(--radius-md);
  background: var(--color-accent-light);
}
.lip-empty--provide {
  color: var(--status-blocked-fg);
  font-style: italic;
  font-weight: 650;
}
.lip-error {
  color: var(--status-blocked-fg);
  background: var(--status-blocked-bg);
  border: 1px solid var(--status-blocked-border);
  border-radius: var(--radius-md);
}
.lip-suggestion-list {
  display: grid;
  gap: var(--space-2);
  padding: 0 var(--space-3) var(--space-3);
}
.lip-suggestion-row {
  padding: var(--space-2);
}
.lip-suggestion-row strong,
.lip-suggestion-row span {
  display: block;
}
.lip-suggestion-row span {
  margin-top: 2px;
  color: var(--color-text-secondary);
}

/* ─────────────────────────────────────────────────────────────────────
   FAB hide on Live Intake — CSS belt-and-suspenders for the JS guard
   in intake-form.js#_renderApproveAllGreen. CSS refreshes more
   aggressively than cached JS, so this rule catches the case where a
   user has a stale intake-form.js cached and the JS check is missing.
   Karen Dodd incident followup; hit on prod 2026-05-19 even after PR
   #305 deployed the JS DOM check (diagnostic showed Taylor's browser
   had cached the pre-#301 intake-form.js).

   Drawer-embedded selectors are scoped to `.matter-drawer--open`
   because MatterDrawer.close() drops the open class but does not clear
   the drawer's innerHTML; the mount and embedded shell linger in the
   DOM after the drawer is hidden, and :has() matches hidden
   descendants. Without the scope, opening Live Intake once and then
   closing the drawer would hide the FAB on every later intake/consult
   page until reload.
   ─────────────────────────────────────────────────────────────────── */
body:has(.matter-drawer--open .matter-drawer__living-intake-mount) #ward-intake-fab-row,
body:has(.matter-drawer--open .li-shell--embedded) #ward-intake-fab-row,
body:has(.li-shell:not(.li-shell--embedded)) #ward-intake-fab-row {
  display: none !important;
}
