    /* ── REBALANCE PROPOSAL modal ─────────────────────────────────────────── */
    .rb-backdrop {
      position: fixed; inset: 0; z-index: 1000;
      background: rgba(0, 0, 0, 0.42);
      display: flex; align-items: center; justify-content: center;
      opacity: 0; transition: opacity 0.18s ease;
      padding: 24px;
    }
    .rb-backdrop.is-open { opacity: 1; }
    .rb-card {
      background: var(--bg);
      border: 0.5px solid var(--border-md);
      border-radius: 14px;
      box-shadow: var(--card-shadow), 0 12px 40px rgba(0,0,0,0.18);
      width: 100%; max-width: 880px; max-height: calc(100vh - 48px);
      display: flex; flex-direction: column; overflow: hidden;
      transform: translateY(8px); transition: transform 0.18s ease;
    }
    .rb-backdrop.is-open .rb-card { transform: translateY(0); }
    .rb-hdr {
      display: flex; align-items: center; gap: 12px;
      padding: 18px 22px;
      border-bottom: 0.5px solid var(--border);
    }
    .rb-hdr-text { flex: 1; min-width: 0; }
    .rb-eyebrow {
      font-size: 11px; font-weight: 600; text-transform: uppercase;
      letter-spacing: 0.06em; color: var(--text-tertiary);
      margin-bottom: 2px;
    }
    .rb-title {
      font-size: 17px; font-weight: 600; color: var(--text-primary);
      letter-spacing: -0.005em;
    }
    .rb-close-btn {
      width: 28px; height: 28px; padding: 0; flex-shrink: 0;
      background: var(--bg-secondary); border: 0.5px solid var(--border);
      border-radius: 6px; color: var(--text-secondary); cursor: pointer;
      display: inline-flex; align-items: center; justify-content: center;
      transition: background 0.12s, color 0.12s;
    }
    .rb-close-btn:hover {
      background: var(--bg-hover); color: var(--text-primary);
    }
    .rb-body {
      flex: 1; overflow-y: auto;
      padding: 18px 22px;
    }
    .rb-mode-toggle {
      display: inline-flex; padding: 3px; background: var(--bg-secondary);
      border: 0.5px solid var(--border); border-radius: 8px; gap: 2px;
      margin-bottom: 8px;
    }
    .rb-mode-btn {
      padding: 6px 14px; font-size: 13px; font-weight: 500;
      color: var(--text-secondary); background: transparent; border: 0;
      border-radius: 6px; cursor: pointer; font-family: inherit;
      transition: background 0.12s, color 0.12s;
    }
    .rb-mode-btn.is-active {
      background: var(--bg); color: var(--text-primary);
      box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    }
    .rb-mode-desc {
      font-size: 12px; color: var(--text-tertiary); margin-bottom: 18px;
      line-height: 1.5;
    }
    .rb-section { margin-bottom: 20px; }
    .rb-section-title {
      font-size: 11px; font-weight: 600; text-transform: uppercase;
      letter-spacing: 0.06em; color: var(--text-tertiary);
      margin-bottom: 8px;
    }
    .rb-table {
      width: 100%; border-collapse: separate; border-spacing: 0;
      font-size: 13px;
    }
    .rb-table thead th {
      text-align: left; font-weight: 600; font-size: 11px;
      text-transform: uppercase; letter-spacing: 0.04em;
      color: var(--text-tertiary);
      padding: 8px 10px;
      border-bottom: 0.5px solid var(--border-md);
      background: var(--bg-secondary);
    }
    .rb-table tbody td {
      padding: 9px 10px;
      border-bottom: 0.5px solid var(--border);
      color: var(--text-primary);
      vertical-align: top;
    }
    .rb-table tbody tr:last-child td { border-bottom: 0; }
    .rb-num { text-align: right; font-variant-numeric: tabular-nums; }
    .rb-pos { color: var(--green-text, #1b7c4d); font-weight: 600; }
    .rb-neg { color: var(--red-text, #b22d2d); font-weight: 600; }
    .rb-neutral { color: var(--text-tertiary); }
    .rb-pill {
      display: inline-block; padding: 2px 8px; border-radius: 10px;
      font-size: 11px; font-weight: 600; text-transform: uppercase;
      letter-spacing: 0.04em;
    }
    .rb-act-buy   { background: rgba(27, 124, 77, 0.12); color: var(--green-text, #1b7c4d); }
    .rb-act-sell  { background: rgba(178, 45, 45, 0.12); color: var(--red-text, #b22d2d); }
    .rb-act-hold  { background: var(--bg-secondary); color: var(--text-tertiary); }
    .rb-ticker { line-height: 1.4; }
    .rb-ticker-sym { font-weight: 600; }
    .rb-ticker-name {
      display: block; font-size: 11px; color: var(--text-tertiary); margin-top: 1px;
    }
    .rb-ticker-none {
      font-style: italic; color: var(--amber-text, #b45309); font-weight: 500;
    }
    .rb-reason { color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
    .rb-note {
      display: block; font-size: 11px; font-style: italic;
      color: var(--text-tertiary); margin-top: 3px;
    }
    .rb-summary {
      display: grid; grid-template-columns: repeat(4, 1fr);
      gap: 10px;
      padding: 14px;
      background: var(--bg-secondary);
      border: 0.5px solid var(--border);
      border-radius: 10px;
      margin-top: 4px;
    }
    .rb-summary-item { text-align: center; }
    .rb-summary-lbl {
      font-size: 10px; font-weight: 600; text-transform: uppercase;
      letter-spacing: 0.06em; color: var(--text-tertiary);
      margin-bottom: 4px;
    }
    .rb-summary-val {
      font-size: 15px; font-weight: 600; color: var(--text-primary);
      font-variant-numeric: tabular-nums;
    }
    .rb-empty {
      padding: 32px 16px; text-align: center;
      font-size: 14px; color: var(--text-secondary);
      background: var(--bg-secondary);
      border: 0.5px dashed var(--border-md);
      border-radius: 10px;
    }
    .rb-footer {
      display: flex; align-items: center; gap: 12px;
      padding: 14px 22px;
      border-top: 0.5px solid var(--border);
      background: var(--bg-secondary);
    }
    .rb-footer-note {
      flex: 1; font-size: 12px; color: var(--text-tertiary);
    }
    .rb-footer-actions { display: flex; gap: 8px; }
    .rb-btn {
      padding: 7px 14px; font-size: 13px; font-weight: 500;
      border-radius: 6px; cursor: pointer; font-family: inherit;
      transition: background 0.12s, color 0.12s, border-color 0.12s;
    }
    .rb-btn--secondary {
      background: var(--bg); border: 0.5px solid var(--border-md);
      color: var(--text-primary);
    }
    .rb-btn--secondary:hover { background: var(--bg-hover); }
    .rb-btn--secondary.is-disabled,
    .rb-btn--secondary:disabled { opacity: 0.5; cursor: not-allowed; }
    .rb-btn--primary {
      background: var(--blue-mid); border: 0; color: white;
    }
    .rb-btn--primary:hover { background: var(--blue-text, #1351a6); }
    .rb-loading {
      display: flex; flex-direction: column; align-items: center; gap: 12px;
      padding: 48px 16px;
    }
    .rb-spinner {
      width: 24px; height: 24px; border: 2px solid var(--border-md);
      border-top-color: var(--blue-mid); border-radius: 50%;
      animation: rb-spin 0.9s linear infinite;
    }
    @keyframes rb-spin { to { transform: rotate(360deg); } }
    .rb-loading-text { font-size: 13px; color: var(--text-tertiary); }
    .rb-error {
      display: flex; align-items: flex-start; gap: 12px;
      padding: 16px; background: var(--amber-bg);
      border: 0.5px solid var(--amber-mid);
      border-radius: 10px;
      color: var(--text-primary); font-size: 13px; line-height: 1.55;
    }
    .rb-error-icon {
      flex-shrink: 0; width: 22px; height: 22px;
      background: var(--amber-mid); color: white;
      border-radius: 50%; font-weight: 700; font-size: 13px;
      display: inline-flex; align-items: center; justify-content: center;
    }

    @media (max-width: 640px) {
      .rb-summary { grid-template-columns: repeat(2, 1fr); }
      .rb-card { max-height: 100vh; border-radius: 0; }
    }

    /* ── ASK ATLAS — slide-in panel ──────────────────────────────────────────
       Right-side panel that doesn't replace main content. Two-state UI:
       `display:none` when closed; `is-open` adds backdrop fade + panel slide-in. */
    #ask-atlas-overlay {
      position: fixed; inset: 0; z-index: 1050;
      background: rgba(0,0,0,0); /* fades in via .is-open */
      transition: background 0.22s ease;
    }
    #ask-atlas-overlay.is-open { background: rgba(0,0,0,0.35); }

    .ask-atlas-panel {
      position: fixed; top: 0; right: 0; bottom: 0;
      width: 480px; max-width: 100vw;
      background: var(--bg);
      border-left: 0.5px solid var(--border-md);
      box-shadow: -20px 0 60px rgba(0,0,0,0.4);
      display: flex; flex-direction: column;
      transform: translateX(100%);
      transition: transform 0.22s ease;
    }
    #ask-atlas-overlay.is-open .ask-atlas-panel { transform: translateX(0); }
    /* While the user is actively dragging the resize handle, suppress the
       width transition so the panel tracks the cursor in real time. */
    .ask-atlas-panel.is-resizing { transition: transform 0.22s ease !important; }

    /* Drag-to-resize handle — thin strip on the left edge of the panel.
       Mostly invisible at rest; cursor changes to col-resize on hover and a
       subtle blue line appears so the affordance is discoverable. */
    .aa-resize-handle {
      position: absolute; top: 0; bottom: 0; left: 0;
      width: 6px; margin-left: -3px;  /* extend the hit area across the border */
      cursor: col-resize;
      z-index: 2;
      background: transparent;
      transition: background 0.12s;
    }
    .aa-resize-handle::after {
      content: ''; position: absolute; top: 0; bottom: 0;
      left: 50%; width: 2px; transform: translateX(-50%);
      background: var(--blue-mid); opacity: 0;
      transition: opacity 0.12s;
    }
    .aa-resize-handle:hover::after,
    .aa-resize-handle.is-active::after { opacity: 0.5; }

    /* Header */
    .aa-header {
      display: flex; align-items: flex-start; justify-content: space-between;
      padding: 1.25rem 1.5rem; border-bottom: 0.5px solid var(--border);
      gap: 12px; flex-shrink: 0;
    }
    .aa-eyebrow {
      font-size: var(--font-xs); font-weight: 600;
      color: var(--blue-mid); text-transform: uppercase;
      letter-spacing: 0.08em; margin-bottom: 4px;
    }
    .aa-subtitle { font-size: var(--font-sm); color: var(--text-tertiary); }
    .aa-header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
    .aa-icon-btn {
      width: 32px; height: 32px; flex-shrink: 0;
      display: inline-flex; align-items: center; justify-content: center;
      background: transparent; border: 0.5px solid var(--border);
      border-radius: var(--radius-sm); cursor: pointer;
      color: var(--text-tertiary);
      transition: color 0.15s, background 0.15s, border-color 0.15s;
    }
    .aa-icon-btn:hover {
      color: var(--text-primary); background: var(--bg-hover); border-color: var(--border-md);
    }

    /* Body — owns scrolling, hosts mode bar + feed + composer */
    .aa-body {
      flex: 1; display: flex; flex-direction: column;
      min-height: 0;  /* allow inner scroll */
    }

    /* Mode bar — pill row at the top of the body */
    .aa-mode-bar {
      display: flex; align-items: center; gap: 8px;
      padding: 12px 1.5rem; border-bottom: 0.5px solid var(--border);
      flex-shrink: 0; flex-wrap: wrap;
    }
    .aa-mode-label { font-size: var(--font-xs); color: var(--text-tertiary); }
    .aa-mode-indicator {
      font-size: var(--font-xs); font-weight: 600;
      padding: 3px 10px; border-radius: 12px;
    }
    .aa-mode-indicator--firm   { background: var(--blue-bg);   color: var(--blue-mid);   }
    .aa-mode-indicator--client { background: var(--purple-bg); color: var(--purple-mid); }
    .aa-mode-toggle {
      margin-left: auto;
      display: inline-flex; border: 0.5px solid var(--border); border-radius: var(--radius-sm);
      overflow: hidden;
    }
    .aa-mode-btn {
      font-size: var(--font-xs); font-weight: 500;
      padding: 4px 10px; border: none; background: transparent;
      color: var(--text-secondary); cursor: pointer;
      transition: background 0.12s, color 0.12s;
    }
    .aa-mode-btn:hover:not(:disabled):not(.is-active) {
      background: var(--bg-hover); color: var(--text-primary);
    }
    .aa-mode-btn.is-active { background: var(--blue-mid); color: #fff; }
    .aa-mode-btn:disabled  { color: var(--text-tertiary); cursor: not-allowed; }

    /* Feed — scrollable chat area */
    .aa-feed {
      flex: 1; overflow-y: auto;
      padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 12px;
      min-height: 0;
    }

    /* Empty state — pre-first-message */
    .aa-empty {
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      flex: 1; text-align: center; padding: 1.5rem 0.5rem; gap: 0;
    }
    .aa-empty-icon {
      width: 56px; height: 56px; border-radius: 14px;
      background: var(--blue-bg); color: var(--blue-mid);
      display: flex; align-items: center; justify-content: center;
      margin-bottom: 1.25rem;
    }
    .aa-empty-title {
      font-size: var(--font-md); font-weight: 600;
      color: var(--text-primary); margin-bottom: 8px;
    }
    .aa-empty-body {
      font-size: var(--font-sm); color: var(--text-secondary);
      line-height: 1.55; max-width: 320px; margin-bottom: 1.5rem;
    }
    .aa-chips {
      display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
    }
    .aa-chip {
      font-size: var(--font-sm); padding: 6px 12px;
      background: var(--bg-secondary); border: 0.5px solid var(--border);
      border-radius: 16px; color: var(--text-secondary);
      cursor: pointer; font-family: inherit;
      transition: background 0.12s, border-color 0.12s, color 0.12s;
    }
    .aa-chip:hover {
      background: var(--blue-bg); color: var(--blue-mid); border-color: var(--blue-mid);
    }

    /* Follow-up chips — emitted after the last assistant turn. Slightly
       de-emphasized vs. empty-state chips: smaller "Suggested" label, left-
       aligned, gentler border. The chips themselves reuse .aa-chip + a
       modifier that nudges padding and adds a tiny "→" affordance. */
    .aa-followups {
      display: flex; flex-direction: column; gap: 6px;
      margin-left: 2px; margin-top: -4px; margin-bottom: 4px;
    }
    .aa-followups-label {
      font-size: 11px; font-weight: 600; text-transform: uppercase;
      letter-spacing: 0.06em; color: var(--text-tertiary);
    }
    .aa-chips--followup { justify-content: flex-start; }
    .aa-chip--followup {
      padding: 5px 11px 5px 11px;
      background: var(--bg);
      border: 0.5px solid var(--border);
      color: var(--text-primary);
      font-size: 13px;
    }
    .aa-chip--followup::before {
      content: "→"; margin-right: 6px; color: var(--blue-mid); font-weight: 600;
    }
    .aa-chip--followup:hover {
      background: var(--blue-bg); border-color: var(--blue-mid); color: var(--blue-mid);
    }

    /* Inline action button — embedded in AI prose for [[open:ID|Name]] tokens.
       Tuned to read like a styled link, not a hard button: same line-height as
       surrounding text, no border at rest, subtle underline + blue tint. The
       ↗ glyph telegraphs "this navigates" without screaming. */
    .aa-inline-action {
      display: inline; padding: 0 4px;
      background: var(--blue-bg);
      border: none; border-radius: 4px;
      color: var(--blue-mid); font: inherit; font-weight: 600;
      cursor: pointer;
      transition: background 0.12s, color 0.12s;
    }
    .aa-inline-action:hover {
      background: var(--blue-mid); color: white;
    }
    .aa-inline-action-arrow {
      display: inline-block; margin-left: 3px; font-weight: 500;
      font-size: 0.85em; opacity: 0.75;
    }

    /* Inline write-action button — [[do:kind:param|Label]]. Read-action buttons
       are blue+link-y; write-action buttons are amber+button-y so the advisor
       sees the visual weight that maps to "this changes state when clicked."
       States: default → is-pending (working) → is-done (success) or is-failed. */
    .aa-do-btn {
      display: inline-block;
      padding: 5px 12px;
      background: var(--amber-bg, #fef3c7);
      border: 0.5px solid var(--amber-mid, #d97706);
      border-radius: 6px;
      color: var(--amber-text, #b45309);
      font: inherit; font-size: 0.95em; font-weight: 600;
      cursor: pointer;
      transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.05s;
      margin: 2px 0;
    }
    .aa-do-btn:hover:not(:disabled) {
      background: var(--amber-mid, #d97706); color: white;
    }
    .aa-do-btn:active:not(:disabled) { transform: translateY(1px); }
    .aa-do-btn.is-pending {
      opacity: 0.7; cursor: progress;
      background: var(--bg-secondary); color: var(--text-secondary);
      border-color: var(--border-md);
    }
    .aa-do-btn.is-done {
      background: rgba(27, 124, 77, 0.15);
      border-color: var(--green-mid, #1b7c4d);
      color: var(--green-text, #1b7c4d);
      cursor: default;
    }
    .aa-do-btn.is-failed {
      background: rgba(178, 45, 45, 0.12);
      border-color: var(--red-mid, #b22d2d);
      color: var(--red-text, #b22d2d);
    }

    /* Messages — premium typography pass for the chat panel. Larger body,
       generous padding, refined line-height. The chat is the hero surface;
       it earns the extra breathing room. */
    .aa-msg { display: flex; }
    .aa-msg--user      { justify-content: flex-end; }
    .aa-msg--assistant { justify-content: flex-start; }
    .aa-msg-bubble {
      max-width: 88%;
      padding: 14px 18px;
      border-radius: 16px;
      font-size: 14px; line-height: 1.65;
      letter-spacing: -0.005em;
    }
    .aa-msg--user .aa-msg-bubble {
      background: var(--blue-mid); color: #fff;
      border-bottom-right-radius: 6px;
      font-weight: 500;
    }
    .aa-msg--assistant .aa-msg-bubble {
      background: var(--bg-secondary); color: var(--text-primary);
      border: 0.5px solid var(--border);
      border-bottom-left-radius: 6px;
      position: relative;
    }
    .aa-copy-btn {
      position: absolute; bottom: 8px; right: 8px;
      display: flex; align-items: center; gap: 4px;
      padding: 3px 7px; border-radius: 6px;
      background: var(--bg-tertiary); border: 0.5px solid var(--border-md);
      color: var(--text-tertiary); font-size: 11px; font-weight: 500;
      cursor: pointer; opacity: 0; transition: opacity 0.15s, color 0.15s;
      user-select: none; line-height: 1;
    }
    .aa-msg--assistant .aa-msg-bubble:hover .aa-copy-btn { opacity: 1; }
    .aa-copy-btn:hover { color: var(--text-primary); }
    .aa-copy-btn.aa-copy-btn--copied { color: var(--green-mid, #16a34a); opacity: 1; }

    /* Inline markdown rendered inside assistant bubbles. Generous spacing,
       deliberate hierarchy. Headings have weight + breathing room; lists
       use flex-aligned markers so wrapped lines indent correctly. */
    .aa-msg-bubble strong { font-weight: 600; color: var(--text-primary); }
    .aa-msg-bubble em     { font-style: italic; }
    .aa-msg-bubble code   {
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 0.88em; background: var(--bg-tertiary);
      padding: 2px 6px; border-radius: 4px;
      color: var(--text-primary);
    }
    .aa-md-h1 {
      font-size: 18px; font-weight: 700; color: var(--text-primary);
      letter-spacing: -0.01em; margin: 14px 0 6px; line-height: 1.3;
    }
    .aa-md-h2 {
      font-size: 16px; font-weight: 700; color: var(--text-primary);
      letter-spacing: -0.005em; margin: 14px 0 6px; line-height: 1.3;
    }
    .aa-md-h3 {
      font-size: 14px; font-weight: 700; color: var(--text-primary);
      margin: 14px 0 6px; line-height: 1.35;
      display: flex; align-items: center; gap: 6px;
    }
    /* First heading in a bubble shouldn't have a big top margin */
    .aa-msg-bubble > .aa-md-h1:first-child,
    .aa-msg-bubble > .aa-md-h2:first-child,
    .aa-msg-bubble > .aa-md-h3:first-child { margin-top: 0; }

    .aa-md-li {
      display: flex; align-items: flex-start; gap: 10px;
      margin: 6px 0; padding-left: 2px;
    }
    .aa-md-marker {
      flex-shrink: 0;
      color: var(--text-tertiary); font-weight: 600;
      min-width: 18px; line-height: 1.65;
    }
    .aa-md-li-ul .aa-md-marker { font-size: 1.1em; line-height: 1.4; }

    .aa-md-hr {
      border: none; border-top: 0.5px solid var(--border);
      margin: 12px 0;
    }
    .aa-msg-bubble--loading {
      display: inline-flex; gap: 4px; align-items: center; padding: 12px 14px;
    }
    /* Tool-call indicator — shown when the AI calls a tool like getClientSnapshot.
       Subtle, italic, muted so it reads as "the AI is thinking, not a real answer." */
    .aa-msg-bubble--tool {
      display: inline-flex; align-items: center; gap: 6px;
      background: var(--bg-tertiary); color: var(--text-tertiary);
      border: 0.5px dashed var(--border-md);
      font-size: var(--font-xs); font-style: italic;
      padding: 6px 10px;
    }
    /* Chart bubble — for inline visuals emitted by chart tools. Wider than the
       narrative bubble (charts need room), light surface with the card shadow
       so it reads as a distinct artifact rather than chat text. */
    .aa-msg-bubble--chart {
      display: block;
      width: 100%; max-width: 100%;
      padding: 14px 16px 18px;
      background: var(--bg);
      border: 0.5px solid var(--border);
      box-shadow: var(--card-shadow);
      border-radius: 12px;
    }
    .aa-chart-title {
      font-size: 11px; font-weight: 600; text-transform: uppercase;
      letter-spacing: 0.05em; color: var(--text-tertiary);
      margin-bottom: 10px;
    }
    .aa-chart-wrap {
      position: relative;
      height: 200px;            /* fixed so Chart.js sizes properly */
      width: 100%;
    }
    .aa-chart-canvas {
      display: block;
      max-width: 100%;
      height: 100% !important;  /* override Chart.js auto-size sometimes */
      width: 100%  !important;
    }
    /* Cursor — blinking caret at the end of a streaming text block. Modern
       AI-chat affordance ("the model is still typing"). Disappears the moment
       the stream finalizes. */
    .aa-cursor {
      display: inline-block; width: 2px; height: 1.05em;
      background: currentColor; vertical-align: text-bottom;
      margin-left: 2px; opacity: 0.7;
      animation: aa-blink 1s steps(1) infinite;
    }
    @keyframes aa-blink {
      0%, 50%   { opacity: 0.7; }
      50.01%, 100% { opacity: 0; }
    }
    .aa-typing-dot {
      width: 6px; height: 6px; border-radius: 50%;
      background: var(--text-tertiary); opacity: 0.4;
      animation: aa-typing 1.2s ease-in-out infinite;
    }
    .aa-typing-dot:nth-child(2) { animation-delay: 0.15s; }
    .aa-typing-dot:nth-child(3) { animation-delay: 0.30s; }
    @keyframes aa-typing {
      0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
      30% { opacity: 1; transform: scale(1); }
    }

    /* Composer */
    .aa-composer {
      display: flex; gap: 8px; align-items: flex-end;
      padding: 12px 1.5rem; border-top: 0.5px solid var(--border);
      flex-shrink: 0;
    }
    .aa-input {
      flex: 1; resize: none; outline: none;
      background: var(--bg-secondary);
      border: 0.5px solid var(--border-md);
      border-radius: var(--radius-md);
      padding: 10px 12px;
      font-family: inherit; font-size: var(--font-sm);
      color: var(--text-primary); line-height: 1.45;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .aa-input:focus {
      border-color: var(--blue-mid); box-shadow: var(--focus-ring);
    }
    .aa-send {
      width: 36px; height: 36px; flex-shrink: 0;
      display: inline-flex; align-items: center; justify-content: center;
      background: var(--blue-mid); color: #fff;
      border: none; border-radius: var(--radius-md);
      cursor: pointer;
      transition: background 0.12s, transform 0.12s, box-shadow 0.15s;
      box-shadow: 0 1px 2px rgba(24,95,165,0.15);
    }
    .aa-send:hover {
      background: var(--blue-text); transform: translateY(-1px);
      box-shadow: 0 3px 6px rgba(24,95,165,0.25);
    }

    @media (max-width: 600px) {
      .ask-atlas-panel { width: 100vw; border-left: none; }
      .aa-header { padding: 1rem; }
      .aa-feed   { padding: 1rem; }
      .aa-composer { padding: 1rem; }
      .aa-mode-bar { padding: 10px 1rem; }
    }
    /* ── MODEL ALIGNMENT PANEL ── */
    .model-card { background: var(--bg); border: 0.5px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 12px; overflow: hidden; }
    .model-hdr { display: flex; align-items: center; gap: 10px; padding: 1rem 1.25rem; border-bottom: 0.5px solid var(--border); }
    .model-icon-wrap { width: 28px; height: 28px; border-radius: 6px; background: var(--purple-bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .model-hdr-text .model-title { font-size: 14px; font-weight: 500; color: var(--text-primary); }
    .model-hdr-text .model-sub   { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
    .model-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; border-bottom: 0.5px solid var(--border); }
    .model-stat { padding: 14px 1.25rem; border-right: 0.5px solid var(--border); }
    .model-stat:last-child { border-right: none; }
    .model-stat-lbl { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
    .model-stat-val { font-size: 18px; font-weight: 600; color: var(--text-primary); line-height: 1; }
    .model-stat-sub { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
    .score-ring-wrap { display: flex; align-items: center; gap: 8px; }
    .score-bar-bg { flex: 1; height: 5px; background: var(--border); border-radius: 3px; }
    .score-bar-fill { height: 5px; border-radius: 3px; background: var(--blue-accent); transition: width 0.3s; }
    .score-bar-fill.good   { background: var(--green-mid); }
    .score-bar-fill.ok     { background: var(--blue-accent); }
    .score-bar-fill.drift  { background: var(--amber-accent); }
    .model-body { padding: 1rem 1.25rem; }
    .model-section-title { font-size: 11px; font-weight: 500; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
    .bucket-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1rem; }
    .bucket-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
    .bucket-label { width: 110px; color: var(--text-secondary); flex-shrink: 0; }
    .bucket-bars { flex: 1; display: flex; flex-direction: column; gap: 3px; }
    .bucket-bar-row { display: flex; align-items: center; gap: 6px; }
    .bucket-bar-lbl { font-size: 10px; color: var(--text-tertiary); width: 36px; text-align: right; flex-shrink: 0; }
    .bucket-bar-track { flex: 1; height: 6px; background: var(--border); border-radius: 3px; }
    .bucket-bar-actual { height: 6px; border-radius: 3px; background: var(--blue-accent); }
    .bucket-bar-target { height: 6px; border-radius: 3px; background: var(--border-md); }
    .bucket-delta { width: 52px; text-align: right; font-size: 11px; font-weight: 500; flex-shrink: 0; }
    .delta-over  { color: var(--amber-mid); }
    .delta-under { color: var(--blue-mid); }
    .delta-ok    { color: var(--green-mid); }
    .all-models-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
    .model-chip { font-size: 11px; padding: 3px 10px; border-radius: 10px; border: 0.5px solid var(--border-md); color: var(--text-secondary); background: transparent; transition: background 0.15s; }
    .model-chip:hover { background: var(--bg-hover); }
    .model-chip.best { background: var(--purple-bg); color: var(--purple-mid); border-color: var(--purple-mid); font-weight: 500; }
    .model-chip-custom { border-style: dashed; }
    /* Model card header actions — selector + custom button */
    .model-hdr { justify-content: space-between; }
    .model-hdr-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
    .model-selector {
      font-size: 12px; color: var(--text-secondary); background: var(--bg-subtle);
      border: 0.5px solid var(--border-md); border-radius: 6px;
      padding: 5px 8px; cursor: pointer; max-width: 180px;
      appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 8px center;
      padding-right: 24px;
    }
    .model-selector:focus { outline: none; border-color: var(--purple-mid); }
    .model-custom-btn {
      display: flex; align-items: center; gap: 5px;
      font-size: 12px; font-weight: 500; color: var(--purple-mid);
      background: var(--purple-bg); border: 0.5px solid var(--purple-mid);
      border-radius: 6px; padding: 5px 10px; cursor: pointer; white-space: nowrap;
      transition: opacity 0.15s;
    }
    .model-custom-btn:hover { opacity: 0.8; }
    /* ── CUSTOM MODEL MODAL ── */
    .cm-backdrop {
      position: fixed; inset: 0; background: rgba(0,0,0,0.55);
      display: none; align-items: center; justify-content: center;
      z-index: 900; padding: 1rem;
    }
    .cm-card {
      background: var(--bg); border: 0.5px solid var(--border);
      border-radius: var(--radius-lg); width: 100%; max-width: 440px;
      box-shadow: 0 20px 60px rgba(0,0,0,0.35); max-height: 90vh; overflow-y: auto;
    }
    .cm-hdr {
      display: flex; align-items: center; justify-content: space-between;
      padding: 1rem 1.25rem; border-bottom: 0.5px solid var(--border);
    }
    .cm-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
    .cm-close {
      background: none; border: none; cursor: pointer;
      color: var(--text-tertiary); padding: 4px; border-radius: 4px;
      display: flex; align-items: center; justify-content: center;
    }
    .cm-close:hover { color: var(--text-primary); background: var(--bg-hover); }
    .cm-list-section { padding: 0.75rem 1.25rem 0; }
    .cm-list { display: flex; flex-direction: column; gap: 6px; }
    .cm-list-item {
      display: flex; align-items: center; justify-content: space-between;
      padding: 8px 10px; border-radius: 6px;
      border: 0.5px solid var(--border); background: var(--bg-subtle);
    }
    .cm-list-item-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
    .cm-list-item-name { font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .cm-list-item-targets { font-size: 11px; color: var(--text-tertiary); }
    .cm-list-item-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: 8px; }
    .cm-list-item-edit {
      background: none; border: none; cursor: pointer;
      color: var(--text-tertiary); padding: 3px 5px; border-radius: 4px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .cm-list-item-edit:hover { color: var(--purple-mid); background: var(--purple-bg); }
    .cm-list-item-del {
      background: none; border: none; cursor: pointer;
      color: var(--text-tertiary); font-size: 13px;
      padding: 2px 6px; border-radius: 4px; flex-shrink: 0;
    }
    .cm-list-item-del:hover { color: var(--red-mid); background: var(--red-bg, #fef2f2); }
    .cm-btn-cancel {
      padding: 8px 14px; border-radius: 6px; font-size: 13px; font-weight: 500;
      background: none; color: var(--text-secondary);
      border: 0.5px solid var(--border-md); cursor: pointer;
      transition: background 0.15s;
    }
    .cm-btn-cancel:hover { background: var(--bg-hover); }
    .cm-divider { height: 0.5px; background: var(--border); margin: 0.75rem 0 0; }
    .cm-form-section { padding: 1rem 1.25rem 1.25rem; }
    .cm-form-title { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }
    .cm-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
    .cm-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
    .cm-input {
      background: var(--bg-subtle); border: 0.5px solid var(--border-md);
      border-radius: 6px; padding: 7px 10px; font-size: 13px;
      color: var(--text-primary); width: 100%; box-sizing: border-box;
      transition: border-color 0.15s;
    }
    .cm-input:focus { outline: none; border-color: var(--purple-mid); }
    .cm-num { text-align: right; }
    .cm-alloc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
    .cm-total-row { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
    .cm-total-lbl { font-size: 12px; color: var(--text-tertiary); }
    .cm-total-val { font-size: 14px; font-weight: 600; }
    .cm-total-hint { font-size: 11px; color: var(--text-tertiary); }
    .cm-actions { display: flex; align-items: center; gap: 10px; }
    .cm-btn-save {
      padding: 8px 18px; border-radius: 6px; font-size: 13px; font-weight: 500;
      background: var(--purple-mid); color: #fff; border: none; cursor: pointer;
      transition: opacity 0.15s;
    }
    .cm-btn-save:disabled { opacity: 0.4; cursor: not-allowed; }
    .cm-btn-save:not(:disabled):hover { opacity: 0.85; }
    .cm-form-status { font-size: 12px; min-height: 18px; }
    .cm-form-status.error   { color: var(--red-mid); }
    .cm-form-status.success { color: #0F6E56; font-weight: 600; }

    /* ── IPS MODAL — mirrors cm- modal pattern, scoped per-client ── */
    .ips-backdrop {
      position: fixed; inset: 0; background: rgba(0,0,0,0.55);
      display: none; align-items: center; justify-content: center;
      z-index: 900; padding: 1rem;
    }
    .ips-card {
      background: var(--bg); border: 0.5px solid var(--border);
      border-radius: var(--radius-lg); width: 100%; max-width: 560px;
      box-shadow: 0 20px 60px rgba(0,0,0,0.35); max-height: 92vh; overflow-y: auto;
    }
    .ips-hdr {
      display: flex; align-items: flex-start; justify-content: space-between;
      padding: 1rem 1.25rem; border-bottom: 0.5px solid var(--border); gap: 12px;
    }
    .ips-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
    .ips-sub   { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
    .ips-close {
      background: none; border: none; cursor: pointer; color: var(--text-tertiary);
      padding: 4px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .ips-close:hover { color: var(--text-primary); background: var(--bg-hover); }
    .ips-body { padding: 0.5rem 1.25rem 0; }
    .ips-section { padding: 12px 0; border-bottom: 0.5px solid var(--border); }
    .ips-section:last-child { border-bottom: 0; }
    .ips-section-hdr { margin-bottom: 10px; }
    .ips-section-title { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
    .ips-section-sub   { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
    .ips-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .ips-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
    .ips-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
    .ips-label { font-size: 11px; color: var(--text-secondary); font-weight: 500; }
    .ips-input {
      background: var(--bg-subtle); border: 0.5px solid var(--border-md);
      border-radius: 6px; padding: 7px 10px; font-size: 13px;
      color: var(--text-primary); width: 100%; box-sizing: border-box;
      transition: border-color 0.15s;
    }
    .ips-input:focus { outline: none; border-color: var(--blue-mid); }
    .ips-num { text-align: right; }
    .ips-textarea { resize: vertical; min-height: 60px; font-family: inherit; }
    .ips-total-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
    .ips-total-lbl { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; }
    .ips-total-val { font-size: 14px; font-weight: 600; }
    .ips-total-hint { font-size: 11px; color: var(--text-tertiary); }
    .ips-quick-band { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
    .ips-quick-lbl { font-size: 11px; color: var(--text-tertiary); }
    .ips-quick-btn {
      padding: 4px 10px; border-radius: 5px; font-size: 11px; font-weight: 500;
      background: var(--bg-subtle); color: var(--text-secondary);
      border: 0.5px solid var(--border); cursor: pointer; transition: all 0.15s;
    }
    .ips-quick-btn:hover  { color: var(--blue-mid); border-color: var(--blue-mid); }
    .ips-quick-btn.active { background: var(--blue-bg); color: var(--blue-mid); border-color: var(--blue-mid); font-weight: 600; }

    /* ── IPS TEMPLATES (V2) — one-click presets above target allocations ─── */
    .ips-templates-section { background: var(--bg-secondary); margin: 0 -1.25rem 0.5rem; padding: 12px 1.25rem; border-radius: 0; border-bottom: 0.5px solid var(--border) !important; }
    .ips-templates {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 8px;
    }
    .ips-template-btn {
      display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
      padding: 9px 11px; border-radius: 6px;
      background: var(--bg); border: 0.5px solid var(--border-md);
      color: var(--text-primary); cursor: pointer;
      transition: border-color 0.15s, background 0.15s;
      text-align: left;
      min-width: 0;
    }
    .ips-template-btn:hover {
      border-color: var(--blue-mid);
      background: rgba(55,138,221,0.04);
    }
    .ips-template-btn.active {
      border-color: var(--blue-mid);
      background: var(--blue-bg);
    }
    .ips-template-name {
      font-size: 11px; font-weight: 600;
      color: var(--text-primary);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      width: 100%;
    }
    .ips-template-btn.active .ips-template-name { color: var(--blue-mid); }
    .ips-template-sub {
      font-size: 10px; font-weight: 500;
      color: var(--text-tertiary);
      letter-spacing: 0.02em;
    }
    @media (max-width: 600px) {
      .ips-templates { grid-template-columns: repeat(2, 1fr); }
    }
    .ips-band-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
    .ips-band-chip {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 3px 8px; border-radius: 4px; font-size: 10.5px;
      background: var(--blue-bg); color: var(--blue-mid); border: 0.5px solid var(--blue-mid);
    }
    .ips-band-chip-lbl { font-weight: 500; }
    .ips-band-chip-val { font-weight: 600; }
    .ips-footer {
      display: flex; align-items: center; justify-content: space-between;
      padding: 0.875rem 1.25rem; border-top: 0.5px solid var(--border);
      gap: 10px; position: sticky; bottom: 0; background: var(--bg);
    }
    .ips-form-status { font-size: 12px; flex: 1; min-width: 0; }
    .ips-form-status.error   { color: var(--red-mid); }
    .ips-form-status.success { color: #0F6E56; font-weight: 600; }
    .ips-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
    .ips-btn-cancel {
      padding: 8px 14px; border-radius: 6px; font-size: 13px; font-weight: 500;
      background: none; color: var(--text-secondary);
      border: 0.5px solid var(--border-md); cursor: pointer; transition: background 0.15s;
    }
    .ips-btn-cancel:hover { background: var(--bg-hover); }
    .ips-btn-save {
      padding: 8px 18px; border-radius: 6px; font-size: 13px; font-weight: 500;
      background: var(--blue-mid); color: #fff; border: none; cursor: pointer;
      transition: opacity 0.15s;
    }
    .ips-btn-save:disabled { opacity: 0.4; cursor: not-allowed; }
    .ips-btn-save:not(:disabled):hover { opacity: 0.85; }

    /* ── ALTRUIST BULK ASSIGNMENT MODAL — Tier 4 item B ── */
    .aba-backdrop {
      position: fixed; inset: 0; background: rgba(0,0,0,0.55);
      display: none; align-items: center; justify-content: center;
      z-index: 950; padding: 1rem;
    }
    .aba-card {
      background: var(--bg); border: 0.5px solid var(--border);
      border-radius: var(--radius-lg); width: 100%; max-width: 720px;
      box-shadow: 0 20px 60px rgba(0,0,0,0.35);
      max-height: 90vh; display: flex; flex-direction: column;
    }
    .aba-hdr {
      display: flex; align-items: flex-start; justify-content: space-between;
      padding: 1rem 1.25rem; border-bottom: 0.5px solid var(--border); gap: 12px;
      flex-shrink: 0;
    }
    .aba-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
    .aba-sub   { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
    .aba-close {
      background: none; border: none; cursor: pointer; color: var(--text-tertiary);
      padding: 4px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .aba-close:hover { color: var(--text-primary); background: var(--bg-secondary); }

    .aba-bulk {
      display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
      padding: 12px 1.25rem; border-bottom: 0.5px solid var(--border);
      background: var(--bg-secondary); flex-shrink: 0;
    }
    .aba-bulk-lbl { font-size: 11px; color: var(--text-secondary); font-weight: 500; }
    .aba-bulk-select { min-width: 200px; }
    .aba-bulk-apply {
      padding: 6px 12px; border-radius: 6px; font-size: 11px; font-weight: 500;
      background: var(--purple-mid); color: #fff; border: none; cursor: pointer;
      transition: opacity 0.15s;
    }
    .aba-bulk-apply:hover { opacity: 0.85; }

    .aba-body {
      padding: 0.75rem 1.25rem; overflow-y: auto; flex: 1 1 auto; min-height: 0;
    }
    .aba-empty { padding: 24px 0; font-size: 12px; color: var(--text-tertiary); text-align: center; }

    .aba-list-wrap { display: flex; flex-direction: column; }
    .aba-list { display: flex; flex-direction: column; }
    .aba-row {
      display: grid;
      grid-template-columns: 2.2fr 0.7fr 1.3fr 1.6fr;
      align-items: center;
      gap: 10px;
      padding: 8px 4px;
      border-bottom: 0.5px solid var(--border);
      font-size: 12px;
      color: var(--text-primary);
    }
    .aba-row:last-child { border-bottom: 0; }
    .aba-row--head {
      font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;
      color: var(--text-tertiary); font-weight: 600; padding: 6px 4px;
      position: sticky; top: 0; background: var(--bg); z-index: 1;
    }
    .aba-row--failed { background: var(--red-bg); }
    .aba-col-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
    .aba-client-name {
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      font-weight: 500;
    }
    .aba-col-accts { text-align: right; color: var(--text-secondary); padding-right: 8px; }
    .aba-col-current { color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .aba-unassigned { color: var(--text-tertiary); font-style: italic; }
    .aba-col-new { min-width: 0; }

    .aba-badge-new {
      display: inline-block; padding: 1px 6px; font-size: 9px; font-weight: 600;
      color: var(--green-text); background: var(--green-bg);
      border-radius: 3px; letter-spacing: 0.04em; flex-shrink: 0;
    }

    .aba-select {
      width: 100%; box-sizing: border-box;
      background: var(--bg-secondary); border: 0.5px solid var(--border-md);
      border-radius: 6px; padding: 5px 8px; font-size: 12px;
      color: var(--text-primary);
      transition: border-color 0.15s;
    }
    .aba-select:focus { outline: none; border-color: var(--purple-mid); }

    .aba-ftr {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 1.25rem; border-top: 0.5px solid var(--border);
      gap: 12px; flex-shrink: 0;
    }
    .aba-counter { font-size: 11px; color: var(--text-tertiary); }
    .aba-ftr-actions { display: flex; align-items: center; gap: 10px; }
    .aba-btn-cancel {
      padding: 7px 14px; border-radius: 6px; font-size: 12px; font-weight: 500;
      background: none; color: var(--text-secondary);
      border: 0.5px solid var(--border-md); cursor: pointer;
      transition: background 0.15s;
    }
    .aba-btn-cancel:hover { background: var(--bg-secondary); }
    .aba-btn-save {
      padding: 7px 16px; border-radius: 6px; font-size: 12px; font-weight: 500;
      background: var(--purple-mid); color: #fff; border: none; cursor: pointer;
      transition: opacity 0.15s;
    }
    .aba-btn-save:disabled { opacity: 0.4; cursor: not-allowed; }
    .aba-btn-save:not(:disabled):hover { opacity: 0.85; }

    .aba-status {
      padding: 0 1.25rem 12px; font-size: 11px; min-height: 16px;
      color: var(--text-tertiary);
    }
    .aba-status.success { color: var(--green-mid); font-weight: 600; }
    .aba-status.error   { color: var(--red-mid); font-weight: 600; }
    .aba-status.warn    { color: var(--red-mid); }

    /* ── Settings drawer ── */
    .nav-settings-btn {
      width: 30px; height: 30px; border-radius: var(--radius-md);
      border: 0.5px solid var(--border-md); background: none;
      cursor: pointer; color: var(--text-tertiary);
      display: flex; align-items: center; justify-content: center;
      transition: background 0.12s, color 0.12s;
    }
    .nav-settings-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }

    .sd-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.25);
      z-index: 200; opacity: 0; pointer-events: none;
      transition: opacity 0.2s;
    }
    .sd-overlay.open { opacity: 1; pointer-events: all; }

    .sd-drawer {
      position: fixed; top: 0; right: 0; bottom: 0;
      width: 320px; max-width: 90vw;
      background: var(--bg); border-left: 0.5px solid var(--border);
      z-index: 201; display: flex; flex-direction: column;
      transform: translateX(100%);
      transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: -8px 0 32px rgba(0,0,0,0.12);
    }
    .sd-drawer.open { transform: translateX(0); }

    .sd-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 1rem 1.25rem; border-bottom: 0.5px solid var(--border);
      flex-shrink: 0;
    }
    .sd-header-title {
      font-size: 13px; font-weight: 600; color: var(--text-primary);
    }
    .sd-close-btn {
      width: 26px; height: 26px; border-radius: var(--radius-md);
      border: 0.5px solid var(--border-md); background: none;
      cursor: pointer; color: var(--text-tertiary);
      display: flex; align-items: center; justify-content: center;
    }
    .sd-close-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }

    .sd-body { flex: 1; overflow-y: auto; padding: 0.5rem 0; }

    .sd-section {
      border-bottom: 0.5px solid var(--border);
      padding: 1rem 1.25rem;
    }
    .sd-section:last-child { border-bottom: none; }

    .sd-section-hdr {
      display: flex; align-items: center; gap: 7px;
      margin-bottom: 10px;
    }
    .sd-section-icon {
      width: 22px; height: 22px; border-radius: 6px;
      background: var(--blue-bg); color: var(--blue-mid);
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .sd-section-title {
      font-size: 12px; font-weight: 600; color: var(--text-primary);
      letter-spacing: .01em;
    }
    .sd-section-body { padding-left: 29px; }

    .sd-field { margin-bottom: 6px; }
    .sd-field--row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .sd-field-hint { font-size: 10px; color: var(--text-tertiary); margin-top: 1px; }
    .sd-theme-toggle { padding: 5px 14px; border-radius: 6px; border: 0.5px solid var(--border); background: var(--bg-tertiary); color: var(--text-primary); font-size: 11px; font-weight: 500; cursor: pointer; white-space: nowrap; }
    .sd-theme-toggle:hover { border-color: var(--blue-mid); color: var(--blue-mid); }
    .sd-field-label { font-size: 10px; color: var(--text-tertiary); margin-bottom: 2px; text-transform: uppercase; letter-spacing: .04em; }
    .sd-field-value { font-size: 13px; color: var(--text-primary); font-weight: 500; }

    .sd-input {
      width: 100%; font-size: 13px; padding: 6px 9px;
      border-radius: var(--radius-md); border: 0.5px solid var(--border-md);
      background: var(--bg-secondary); color: var(--text-primary);
      outline: none; transition: border-color 0.15s;
      font-family: inherit;
    }
    .sd-input:focus { border-color: var(--blue-mid); background: var(--bg); }
    .sd-save-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
    .sd-save-btn {
      font-size: 12px; padding: 5px 14px; border-radius: var(--radius-md);
      border: 0.5px solid var(--blue-mid); background: var(--blue-mid);
      color: #fff; cursor: pointer; font-weight: 500; transition: opacity 0.12s;
    }
    .sd-save-btn:disabled { opacity: 0.35; cursor: not-allowed; }
    .sd-save-btn:not(:disabled):hover { opacity: 0.85; }
    .sd-status { font-size: 11px; }
    .sd-status--success { color: var(--green-mid); }
    .sd-status--error   { color: var(--red-mid); }
    .sd-coming-soon {
      font-size: 11px; color: var(--text-tertiary);
      margin-top: 8px; font-style: italic;
    }
    .sd-placeholder {
      display: flex; align-items: center; gap: 7px;
      font-size: 12px; color: var(--text-tertiary);
      padding: 6px 0;
    }
    .sd-placeholder--sm { font-size: 12px; color: var(--text-tertiary); padding: 6px 0; }
    .sd-invite-list-label {
      font-size: 11px; font-weight: 600; color: var(--text-tertiary);
      text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px;
    }
    .sd-invite-row {
      display: flex; align-items: center; justify-content: space-between;
      gap: 12px; padding: 10px 0;
      border-bottom: 0.5px solid var(--border-sm);
      transition: opacity 0.2s;
    }
    .sd-invite-row:last-child { border-bottom: none; }
    .sd-invite-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    .sd-invite-email {
      font-size: 13px; font-weight: 500; color: var(--text-primary);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .sd-invite-meta { font-size: 11px; color: var(--text-tertiary); }
    .sd-revoke-btn {
      flex-shrink: 0; background: none;
      border: 0.5px solid var(--border-md); border-radius: 6px;
      padding: 4px 10px; font-size: 12px; color: var(--text-secondary);
      cursor: pointer; transition: background 0.15s, color 0.15s;
    }
    .sd-revoke-btn:hover { background: var(--red-bg); color: var(--red-mid); border-color: var(--red-accent); }
    .sd-audit-btn {
      font-size: 12px; padding: 5px 14px; border-radius: var(--radius-md);
      border: 0.5px solid var(--border-md); background: var(--bg-secondary);
      color: var(--text-secondary); cursor: pointer; font-family: inherit;
      transition: background 0.15s, border-color 0.15s;
    }
    .sd-audit-btn:hover { background: var(--blue-bg); border-color: var(--blue-mid); color: var(--blue-mid); }
    .sd-audit-wrap {
      border: 0.5px solid var(--border); border-radius: var(--radius-md);
      overflow: hidden; overflow-x: auto;
    }
    .sd-audit-table {
      width: 100%; border-collapse: collapse;
      font-size: 11px;
    }
    .sd-audit-th {
      padding: 6px 10px; text-align: left;
      font-size: 10px; font-weight: 600; color: var(--text-tertiary);
      text-transform: uppercase; letter-spacing: .04em;
      background: var(--bg-subtle); border-bottom: 0.5px solid var(--border);
    }
    .sd-audit-row { border-bottom: 0.5px solid var(--border-sm); }
    .sd-audit-row:last-child { border-bottom: none; }
    .sd-audit-date {
      padding: 7px 10px; color: var(--text-tertiary);
      white-space: nowrap; vertical-align: top;
    }
    .sd-audit-action {
      padding: 7px 10px; color: var(--text-primary);
      vertical-align: top;
    }
    .sd-audit-icon {
      display: inline-block; width: 14px; text-align: center;
      color: var(--text-tertiary); margin-right: 4px; font-size: 10px;
    }
    .sd-audit-detail {
      margin-left: 4px; color: var(--text-tertiary); font-size: 10px;
    }
    .sd-audit-user {
      padding: 7px 10px; color: var(--text-tertiary);
      white-space: nowrap; vertical-align: top; font-size: 10px;
    }
    .sd-audit-footer {
      font-size: 10px; color: var(--text-tertiary);
      text-align: right; padding: 6px 0 0;
    }
    .sd-member-row {
      display: flex; align-items: center; gap: 10px;
      padding: 9px 0; border-bottom: 0.5px solid var(--border-sm);
    }
    .sd-member-row:last-child { border-bottom: none; }
    .sd-member-avatar {
      width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
      background: var(--blue-bg); color: var(--blue-mid);
      font-size: 11px; font-weight: 600;
      display: flex; align-items: center; justify-content: center;
    }
    .sd-member-info { flex: 1; min-width: 0; overflow: hidden; }
    .sd-member-name { font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .sd-member-email { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .sd-member-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
    .sd-role-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 10px; letter-spacing: .03em; flex-shrink: 0; }
    .sd-role-badge--admin   { background: var(--blue-bg); color: var(--blue-mid); }
    .sd-role-badge--advisor { background: var(--bg-secondary); color: var(--text-tertiary); }
    .sd-view-clients-btn {
      background: none;
      border: 0.5px solid var(--border-sm);
      border-radius: 6px;
      padding: 2px 7px;
      font-size: 11px;
      font-family: inherit;
      line-height: 1.4;
      color: var(--text-tertiary);
      cursor: pointer;
      white-space: nowrap;
      transition: background 0.15s, color 0.15s, border-color 0.15s;
    }
    .sd-view-clients-btn:hover { background: var(--blue-bg); color: var(--blue-mid); border-color: var(--blue-mid); }
    .nav-role-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 10px; letter-spacing: .03em; margin-left: 2px; }
    .nav-role-badge--admin   { background: var(--blue-bg); color: var(--blue-mid); }
    .nav-role-badge--advisor { background: var(--bg-secondary); color: var(--text-tertiary); }
    .client-card-advisor { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; }
    .client-card-main { flex: 1; min-width: 0; }
    .client-card-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
    .client-card-assign { display: flex; align-items: center; }
    .client-assign-select {
      font-size: 11px; padding: 3px 6px;
      border-radius: var(--radius-md);
      border: 0.5px solid var(--border-md);
      background: var(--bg-secondary);
      color: var(--text-secondary);
      cursor: pointer; outline: none;
      max-width: 130px;
    }
    .client-assign-select:hover { border-color: var(--border-lg); color: var(--text-primary); }
    .advisor-view-banner {
      display: flex; align-items: center; justify-content: space-between;
      gap: 12px; padding: 10px 14px; margin-bottom: 16px;
      background: var(--blue-bg);
      border: 0.5px solid var(--blue-accent, #185FA5);
      border-radius: var(--radius-md);
    }
    .advisor-view-banner-text {
      display: flex; align-items: center; gap: 8px;
      font-size: 13px; font-weight: 500; color: var(--blue-mid);
    }
    .advisor-view-icon { font-size: 14px; }
    .advisor-view-exit {
      flex-shrink: 0; background: none;
      border: 0.5px solid var(--blue-mid);
      border-radius: var(--radius-md);
      padding: 4px 10px; font-size: 12px;
      color: var(--blue-mid); cursor: pointer;
      transition: background 0.15s;
    }
    .advisor-view-exit:hover { background: rgba(24,95,165,0.12); }
    .admin-advisor-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
    .admin-advisor-label { font-size: 11px; color: var(--text-secondary); }
    .admin-advisor-select { font-size: 12px; padding: 4px 8px; border-radius: var(--radius-md); border: 0.5px solid var(--border-md); background: var(--bg); color: var(--text-primary); cursor: pointer; outline: none; }
    /* Back button in client detail */
    .btn-back {
      display: inline-flex; align-items: center; gap: 6px;
      font-size: 12px; font-weight: 500; color: var(--text-secondary);
      background: none; border: none; cursor: pointer; padding: 0;
      margin-bottom: 1.25rem; transition: color 0.15s;
    }
    .btn-back:hover { color: var(--text-primary); }
    .client-detail-hdr { margin-bottom: 1.25rem; }
    .client-name-row { display: flex; align-items: center; gap: 8px; }
    .client-rename-btn {
      display: flex; align-items: center; justify-content: center;
      width: 24px; height: 24px; border-radius: 6px; border: 0.5px solid transparent;
      background: none; cursor: pointer; color: var(--text-tertiary);
      transition: all 0.12s; flex-shrink: 0;
    }
    .client-rename-btn:hover { background: var(--bg-secondary); border-color: var(--border-md); color: var(--text-primary); }
    .client-rename-input {
      font-size: 20px; font-weight: 600; color: var(--text-primary);
      background: var(--bg-secondary); border: 1.5px solid var(--blue-mid);
      border-radius: 6px; padding: 2px 8px; outline: none; width: 280px;
    }
    .client-detail-name { font-size: 20px; font-weight: 600; color: var(--text-primary); }
    /* ── CONFIRM DELETE MODAL ── */
    .modal-backdrop {
      position: fixed; inset: 0; z-index: 200;
      background: rgba(0,0,0,0.45);
      display: flex; align-items: center; justify-content: center;
      padding: 1.5rem;
      opacity: 0; pointer-events: none;
      transition: opacity 0.15s ease;
    }
    .modal-backdrop.visible {
      opacity: 1; pointer-events: auto;
    }
    .modal-card {
      background: var(--bg); border: 0.5px solid var(--border-md);
      border-radius: var(--radius-lg); padding: 1.75rem 1.5rem;
      width: 100%; max-width: 380px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.18);
      transform: translateY(6px);
      transition: transform 0.15s ease;
    }
    .modal-backdrop.visible .modal-card { transform: translateY(0); }
    .modal-title {
      font-size: 15px; font-weight: 600;
      color: var(--text-primary); margin-bottom: 8px;
    }
    .modal-body {
      font-size: 13px; color: var(--text-secondary);
      line-height: 1.6; margin-bottom: 1.5rem;
    }
    .modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
    .btn-modal-cancel {
      font-size: 13px; font-weight: 500; padding: 8px 16px;
      border-radius: var(--radius-md); border: 0.5px solid var(--border-md);
      background: var(--bg-secondary); color: var(--text-secondary);
      cursor: pointer; transition: background 0.12s;
    }
    .btn-modal-cancel:hover { background: var(--bg-tertiary); }
    .btn-modal-delete {
      font-size: 13px; font-weight: 500; padding: 8px 16px;
      border-radius: var(--radius-md); border: none;
      background: var(--red-mid); color: #fff;
      cursor: pointer; transition: opacity 0.12s;
    }
    .btn-modal-delete:hover { opacity: 0.88; }
    .btn-modal-confirm {
      font-size: 13px; font-weight: 500; padding: 8px 16px;
      border-radius: var(--radius-md); border: none;
      background: var(--blue-mid); color: #fff;
      cursor: pointer; transition: opacity 0.12s;
    }
    .btn-modal-confirm:hover { opacity: 0.88; }
    .btn-modal-save {
      font-size: 13px; font-weight: 500; padding: 8px 16px;
      border-radius: var(--radius-md); border: none;
      background: var(--blue-mid); color: #fff;
      cursor: pointer; transition: opacity 0.12s;
    }
    .btn-modal-save:hover { opacity: 0.88; }
    .model-save-btn {
      font-size: 11px; font-weight: 600; padding: 5px 12px;
      border-radius: var(--radius-md); border: none;
      background: var(--blue-mid); color: #fff;
      cursor: pointer; font-family: inherit;
      transition: opacity 0.12s; white-space: nowrap;
    }
    .model-save-btn:hover { opacity: 0.85; }
    .model-saved-line {
      font-size: 11px; font-weight: 500;
      color: var(--green-mid, #0F6E56); margin-top: 5px;
      animation: br-fade-in 0.2s ease;
    }
    @keyframes br-fade-in { from { opacity: 0; } to { opacity: 1; } }
    /* ── EMPTY STATES ── */
    .empty-state {
      display: flex; flex-direction: column; align-items: center;
      text-align: center; padding: 3.5rem 1.5rem;
    }
    .empty-state-icon {
      width: 48px; height: 48px; border-radius: 12px;
      display: flex; align-items: center; justify-content: center;
      margin-bottom: 1.25rem; flex-shrink: 0;
    }
    .empty-state-title {
      font-size: 15px; font-weight: 600;
      color: var(--text-primary); margin-bottom: 6px;
    }
    .empty-state-sub {
      font-size: 13px; color: var(--text-secondary);
      line-height: 1.6; max-width: 320px; margin-bottom: 1.5rem;
    }

    /* ── AI Chat button ── */
    .adv-metrics-tab--ai { color: var(--purple-mid); border-color: var(--purple-mid); }
    .adv-metrics-tab--ai:hover { background: var(--purple-bg); }
    .adv-metrics-tab--ai.active { background: var(--purple-mid); color: #fff; border-color: var(--purple-mid); }

    /* ── MFA: Settings drawer section ── */
    .sd-mfa-status-row {
      display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
    }
    .sd-mfa-badge {
      display: inline-block; padding: 2px 8px; border-radius: 999px;
      font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em;
      text-transform: uppercase;
    }
    .sd-mfa-badge--on {
      background: var(--green-bg); color: var(--green-mid);
      border: 0.5px solid var(--green-mid);
    }
    .sd-mfa-actions { display: flex; gap: 8px; flex-wrap: wrap; }
    .sd-mfa-btn {
      font-size: 12px; font-weight: 500;
      padding: 6px 14px; border-radius: var(--radius-md);
      cursor: pointer; font-family: inherit;
      transition: background 0.12s, color 0.12s, border-color 0.12s;
      line-height: 1.4;
    }
    .sd-mfa-btn--primary {
      background: var(--accent, #185FA5); color: #fff; border: none;
    }
    .sd-mfa-btn--primary:hover { opacity: 0.92; }
    .sd-mfa-btn--ghost {
      background: transparent; color: var(--text-secondary);
      border: 0.5px solid var(--border-md);
    }
    .sd-mfa-btn--ghost:hover { background: var(--bg-secondary); color: var(--text-primary); }
    .sd-mfa-btn--danger {
      background: var(--red-mid); color: #fff; border: none;
    }
    .sd-mfa-btn--danger:hover { opacity: 0.92; }
    .sd-mfa-confirm {
      margin-top: 10px; padding: 10px 12px;
      border: 0.5px solid var(--border-md); border-radius: var(--radius-md);
      background: var(--bg-secondary);
    }
    .sd-mfa-confirm-text {
      font-size: 12px; color: var(--text-secondary);
      line-height: 1.5; margin-bottom: 10px;
    }
    .sd-mfa-confirm-error {
      font-size: 11.5px; color: var(--red-mid); margin-bottom: 8px;
    }
    .sd-mfa-confirm-actions { display: flex; gap: 8px; justify-content: flex-end; }

    /* ── MFA: enrollment modal ── */
    .modal-card.mfa-enroll-card {
      max-width: 440px; padding: 1.5rem 1.5rem 1.25rem;
    }
    .mfa-qr-wrap {
      background: #fff;                 /* ensure dark/light contrast for SVG */
      border-radius: var(--radius-md);
      padding: 12px;
      display: flex; align-items: center; justify-content: center;
      margin-bottom: 14px;
    }
    .mfa-qr-wrap svg,
    .mfa-qr-wrap .mfa-qr-img { width: 200px; height: 200px; display: block; }
    .mfa-qr-fallback { font-size: 12px; color: var(--red-mid); padding: 12px; }

    /* Manual-entry disclosure (collapsed by default; opens to show the
       chunked setup key + a copy button + a one-line how-to). */
    .mfa-secret-toggle {
      margin-bottom: 16px;
      border: 0.5px solid var(--border-md);
      border-radius: var(--radius-md);
      background: var(--bg-secondary);
    }
    .mfa-secret-summary {
      cursor: pointer; list-style: none; outline: none;
      display: flex; align-items: center; justify-content: space-between;
      padding: 10px 12px;
      font-size: 12px; font-weight: 500; color: var(--text-secondary);
      transition: color 0.12s;
    }
    .mfa-secret-summary:hover { color: var(--text-primary); }
    .mfa-secret-summary::-webkit-details-marker { display: none; }
    .mfa-secret-chevron {
      transition: transform 0.18s ease;
      color: var(--text-tertiary);
    }
    .mfa-secret-toggle[open] .mfa-secret-chevron { transform: rotate(-180deg); }
    .mfa-secret-panel {
      display: flex; align-items: stretch; gap: 8px;
      padding: 0 12px 10px;
    }
    .mfa-secret-code {
      flex: 1;
      font-family: var(--mono, 'SFMono-Regular', Menlo, monospace);
      font-size: 13.5px; letter-spacing: 0.04em;
      color: var(--text-primary);
      background: var(--bg); border: 0.5px solid var(--border-md);
      border-radius: var(--radius-md); padding: 8px 11px;
      user-select: all; line-height: 1.5;
      overflow-wrap: anywhere;
    }
    .mfa-secret-copy-btn {
      display: inline-flex; align-items: center; gap: 5px;
      padding: 0 12px; font-size: 11.5px; font-weight: 500;
      background: var(--bg); color: var(--text-secondary);
      border: 0.5px solid var(--border-md); border-radius: var(--radius-md);
      cursor: pointer; font-family: inherit;
      transition: background 0.12s, color 0.12s, border-color 0.12s;
      white-space: nowrap;
    }
    .mfa-secret-copy-btn:hover {
      color: var(--text-primary);
      border-color: var(--blue-mid);
      background: var(--blue-bg);
    }
    .mfa-secret-hint {
      padding: 0 12px 12px;
      font-size: 11.5px; color: var(--text-tertiary); line-height: 1.5;
    }
    .mfa-code-input-row { display: flex; flex-direction: column; gap: 6px; }
    .mfa-code-input-label {
      font-size: 11px; font-weight: 500;
      color: var(--text-secondary);
      text-transform: uppercase; letter-spacing: 0.05em;
    }
    .mfa-code-input {
      width: 100%; padding: 10px 14px;
      font-family: var(--mono, 'SFMono-Regular', Menlo, monospace);
      font-size: 18px; letter-spacing: 0.4em; text-align: center;
      border: 0.5px solid var(--border-md);
      border-radius: var(--radius-md);
      background: var(--bg); color: var(--text-primary);
      outline: none;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .mfa-code-input:focus {
      border-color: var(--blue-mid); box-shadow: 0 0 0 3px var(--blue-bg);
    }
    .mfa-inline-error {
      font-size: 12px; color: var(--red-mid);
      min-height: 16px; margin-top: 8px;
    }

    /* ── MFA: recovery code reveal step ── */
    .mfa-recovery-callout {
      font-size: 12.5px; color: var(--text-secondary);
      line-height: 1.55; padding: 10px 12px;
      background: var(--blue-bg); border-left: 3px solid var(--blue-mid);
      border-radius: var(--radius-md); margin-bottom: 14px;
    }
    .mfa-recovery-callout strong { color: var(--text-primary); }
    .mfa-recovery-list {
      list-style: none; margin: 0 0 14px; padding: 0;
      display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px;
    }
    .mfa-recovery-item code {
      font-family: var(--mono, 'SFMono-Regular', Menlo, monospace);
      font-size: 13px; color: var(--text-primary);
      background: var(--bg-secondary); border: 0.5px solid var(--border-md);
      border-radius: 4px; padding: 4px 8px;
      display: block; user-select: all;
    }
    .mfa-recovery-actions {
      display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
    }
    .mfa-recovery-action {
      padding: 6px 12px; font-size: 12px; border-radius: var(--radius-md);
      background: transparent; color: var(--text-secondary);
      border: 0.5px solid var(--border-md); cursor: pointer;
    }
    .mfa-recovery-action:hover { background: var(--bg-secondary); color: var(--text-primary); }
    .mfa-recovery-status { font-size: 11.5px; color: var(--green-mid); }

    /* ── MFA: nudge card (bottom-right floating) ──────────────────────── */
    @keyframes mfaNudgeIn {
      from { opacity: 0; transform: translateY(12px) scale(0.97); }
      to   { opacity: 1; transform: translateY(0)    scale(1);    }
    }
    .mfa-nudge-card {
      position: fixed; right: 24px; bottom: 24px; z-index: 180;
      width: 340px; max-width: calc(100vw - 32px);
      display: flex; gap: 14px;
      padding: 18px 18px 16px;
      background: var(--bg);
      border: 0.5px solid var(--border-md);
      border-radius: 14px;
      box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32),
                  0 2px 8px rgba(0, 0, 0, 0.18),
                  inset 0 1px 0 rgba(255, 255, 255, 0.04);
      animation: mfaNudgeIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }
    .mfa-nudge-card::before {
      content: ""; position: absolute; left: 0; top: 16px; bottom: 16px;
      width: 3px; border-radius: 0 2px 2px 0;
      background: linear-gradient(180deg, var(--blue-accent, #378ADD), var(--blue-mid, #185FA5));
    }
    .mfa-nudge-card-icon {
      flex-shrink: 0;
      width: 36px; height: 36px;
      display: inline-flex; align-items: center; justify-content: center;
      background: var(--blue-bg);
      border-radius: 10px;
      color: var(--blue-mid);
    }
    .mfa-nudge-card-body { flex: 1; min-width: 0; padding-right: 4px; }
    .mfa-nudge-card-eyebrow {
      font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
      color: var(--blue-mid);
      text-transform: uppercase; margin-bottom: 4px;
    }
    .mfa-nudge-card-title {
      font-size: 14px; font-weight: 600;
      color: var(--text-primary);
      line-height: 1.3; margin-bottom: 5px;
    }
    .mfa-nudge-card-copy {
      font-size: 12.5px; color: var(--text-secondary);
      line-height: 1.5; margin-bottom: 12px;
    }
    .mfa-nudge-card-actions { display: flex; gap: 8px; align-items: center; }
    .mfa-nudge-card-cta {
      padding: 7px 14px; font-size: 12.5px; font-weight: 600;
      background: var(--blue-mid); color: #fff;
      border: none; border-radius: 8px; cursor: pointer; font-family: inherit;
      box-shadow: 0 2px 8px rgba(24, 95, 165, 0.28);
      transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
    }
    .mfa-nudge-card-cta:hover {
      background: var(--blue-accent, #378ADD);
      box-shadow: 0 4px 14px rgba(55, 138, 221, 0.36);
      transform: translateY(-1px);
    }
    .mfa-nudge-card-cta:active { transform: translateY(0); }
    .mfa-nudge-card-ghost {
      padding: 7px 12px; font-size: 12.5px; font-weight: 500;
      background: transparent; color: var(--text-tertiary);
      border: none; border-radius: 8px; cursor: pointer; font-family: inherit;
      transition: color 0.12s, background 0.12s;
    }
    .mfa-nudge-card-ghost:hover { color: var(--text-secondary); background: var(--bg-secondary); }
    .mfa-nudge-card-close {
      position: absolute; top: 10px; right: 10px;
      width: 22px; height: 22px;
      display: inline-flex; align-items: center; justify-content: center;
      background: transparent; border: none; cursor: pointer;
      color: var(--text-tertiary); border-radius: 6px; padding: 0;
      transition: color 0.12s, background 0.12s;
    }
    .mfa-nudge-card-close:hover { color: var(--text-primary); background: var(--bg-secondary); }
    @media (max-width: 480px) {
      .mfa-nudge-card { right: 12px; left: 12px; bottom: 12px; width: auto; }
    }

