/* TaxWealth Portal — login, shell, dashboard, share. Relies on app.css tokens. */
.tw-portal-body { background: var(--bg); }
#app { min-height: 100vh; }
.tw-muted { color: var(--muted); font-size: 14px; }
.tw-err { background: #fdecec; border: 1px solid #f3b4b4; color: #9a2222; padding: 10px 12px; border-radius: 7px; font-size: 13px; }
.tw-logo-lg { width: 46px; height: 46px; font-size: 24px; border-radius: 12px; }
.tw-logo-lg.ghost { background: var(--blue-soft); color: var(--blue); }

/* ── Login ─────────────────────────────────────────────────────────────── */
.tw-login { display: grid; grid-template-columns: minmax(420px, 1fr) 1.1fr; min-height: 100vh; }
.tw-login-form { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.tw-login-inner { width: 100%; max-width: 380px; }
.tw-eyebrow { color: var(--blue); font-weight: 700; letter-spacing: .14em; font-size: 12px; margin: 20px 0 6px; }
.tw-login-inner h1 { color: var(--navy); font-size: 30px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 6px; }
.tw-login-sub { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.tw-login-sub a, .tw-forgot a { color: var(--blue); text-decoration: none; }
.tw-login-field { display: block; margin: 0 0 16px; }
.tw-login-field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.tw-login-field input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; }
.tw-login-field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.tw-pw { position: relative; display: block; }
.tw-pw input { width: 100%; padding: 11px 40px 11px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; }
.tw-pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 4px; color: var(--muted); opacity: .65; display: inline-flex; }
.tw-pw-eye svg { width: 18px; height: 18px; display: block; }
.tw-pw-eye:hover { opacity: 1; }
.tw-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 4px 0 20px; }
.tw-login-btn { width: 100%; padding: 12px; background: var(--navy); color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; }
.tw-login-btn:hover { background: var(--navy-2); } .tw-login-btn:disabled { opacity: .6; cursor: default; }
.tw-forgot { text-align: center; margin: 16px 0 0; font-size: 13px; }
.tw-login-hero { background: var(--navy) center/cover no-repeat; position: relative; }
.tw-login-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(16,35,71,.55), rgba(16,35,71,.15)); }
.tw-login .tw-err { margin-bottom: 14px; }
@media (max-width: 820px) { .tw-login { grid-template-columns: 1fr; } .tw-login-hero { display: none; } }

/* ── Shell ─────────────────────────────────────────────────────────────── */
.tw-shell { display: grid; grid-template-columns: 248px 1fr; height: 100vh; }
.tw-side { background: var(--navy); color: #cdd7ea; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.tw-side-logo img { height: 30px; width: auto; max-width: 100%; display: block; }
.tw-side-bottom { margin-top: auto; }
.tw-side-nav { display: flex; flex-direction: column; gap: 2px; }
.tw-nav-item { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: none; border: none; color: #cdd7ea; padding: 10px 12px; border-radius: 9px; font-size: 14px; cursor: pointer; font-family: inherit; }
.tw-nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.tw-nav-item.active { background: var(--blue); color: #fff; font-weight: 600; }
.tw-nav-ico { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; opacity: .85; flex: 0 0 18px; }
.tw-nav-ico svg { width: 18px; height: 18px; display: block; }
.tw-nav-item.active .tw-nav-ico { opacity: 1; }
.tw-soon { font-size: 10px; opacity: .6; margin-left: auto; }
.tw-nav-sec { color: #7f90b3; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 18px 12px 6px; }
.tw-shell-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tw-topbar { display: flex; align-items: center; gap: 14px; padding: 14px 26px; background: #fff; border-bottom: 1px solid var(--line); }
.tw-back { background: none; border: 1px solid var(--line); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; }
.tw-plan-pill { background: var(--blue-soft); color: var(--blue-2); border: 1px solid var(--blue-line); padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tw-plan-pill.elite { background: #0f2a4a; color: #fff; border-color: #0f2a4a; }
.tw-plan-pill.basic { background: #eef1f5; color: #475569; border-color: #e2e7ee; }
/* Partnership status pill (referrer / execution / adviser) — top bar + headers */
.tw-partner-pill { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .01em; }
.tw-pill.tw-partner-pill { padding: 3px 10px; font-size: 11.5px; }
.tw-partner-pill.referrer  { background: #e6f4ee; color: #0f6f4c; }
.tw-partner-pill.execution { background: #fdf0e3; color: #9a5b13; }
.tw-partner-pill.adviser   { background: #eceafb; color: #4c3aa8; }
.tw-partner-pill.hq_admin  { background: #0f2a4a; color: #fff; }
.tw-top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.tw-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.tw-logout { background: none; border: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.tw-logout:hover { color: var(--blue); }
.tw-switcher { position: relative; }
.tw-switch-btn { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; color: var(--navy); font-weight: 600; }
.tw-switch-menu { position: absolute; right: 0; top: 110%; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 200px; padding: 6px; z-index: 20; }
.tw-switch-menu button { display: block; width: 100%; text-align: left; background: none; border: none; padding: 9px 10px; border-radius: 7px; font-size: 13px; cursor: pointer; color: var(--ink); }
.tw-switch-menu button:hover { background: var(--blue-soft); color: var(--blue); }
.tw-switch-menu button.on { font-weight: 700; color: var(--navy); }
.tw-viewer { padding: 26px 30px; overflow: auto; flex: 1; min-height: 0; }

/* ── Placeholder ───────────────────────────────────────────────────────── */
.tw-placeholder { max-width: 460px; margin: 60px auto; text-align: center; }
.tw-placeholder h3 { color: var(--navy); margin: 16px 0 8px; }
.tw-placeholder p { color: var(--muted); font-size: 14px; }

/* ── Calculator dashboard ──────────────────────────────────────────────── */
.tw-dash-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; }
.tw-dash-head h1 { color: var(--navy); font-size: 26px; font-weight: 800; margin: 0; }
.tw-dash-sub { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.tw-rollups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.tw-roll-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.tw-roll-card.best { border-color: var(--blue-line); background: var(--blue-soft); }
.tw-roll-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.tw-roll-val { font-size: 24px; font-weight: 800; color: var(--navy); }
.tw-roll-card.best .tw-roll-val { color: var(--blue-2); }
.tw-list-controls { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.tw-search { flex: 1; min-width: 200px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.tw-search:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.tw-scope { display: flex; gap: 8px; }
.tw-pill.on { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 600; }
.tw-filter { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: #fff; }
.tw-empty, .tw-list .tw-muted { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 36px; text-align: center; color: var(--muted); font-size: 14px; }
.tw-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tw-table th, .tw-table td { padding: 11px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--line); }
.tw-table th { background: #f7f9fb; color: var(--muted); font-weight: 600; font-size: 11.5px; letter-spacing: .03em; text-transform: uppercase; }
.tw-table tr:last-child td { border-bottom: none; }
.tw-table td.num, .tw-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tw-table td.savings { color: var(--ok); font-weight: 600; }
.tw-cell-name { font-weight: 600; color: var(--navy); }
.tw-tag-draft { font-size: 10px; background: #fef3c7; color: #92651b; padding: 1px 6px; border-radius: 5px; font-weight: 600; }
.tw-link { background: none; border: none; color: var(--blue); cursor: pointer; font-size: 13px; padding: 2px 6px; }
.tw-link:hover { text-decoration: underline; }
.tw-link.danger { color: #b42318; }

/* ── Entry editor ──────────────────────────────────────────────────────── */
.tw-entry-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.tw-entry-name { color: var(--navy); font-size: 20px; font-weight: 700; margin: 0; }
.tw-entry-meta { color: var(--muted); font-size: 12px; }
.tw-entry-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.tw-year-pick { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tw-year-pick select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: #fff; color: var(--ink, #1f2733); font-weight: 600; cursor: pointer; }
.tw-year-pick select:focus { outline: none; border-color: var(--accent, #2f6fed); }
.tw-btn-ghost { border-color: transparent; background: none; color: var(--muted); }
.tw-btn-ghost:hover { background: var(--blue-soft); }
.tw-saved-flag { display: inline-block; background: #e8f6ee; color: var(--ok); border: 1px solid #b7e0c6; padding: 4px 12px; border-radius: 7px; font-size: 12px; font-weight: 600; margin-bottom: 12px; }

/* ── Public share ──────────────────────────────────────────────────────── */
.tw-share { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 50px 20px; }
.tw-share-inner { width: 100%; max-width: 860px; }
.tw-share-actions { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 14px; }
.tw-share-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); max-width: 640px; width: 100%; padding: 36px; }
.tw-share-card h1 { color: var(--navy); font-size: 24px; font-weight: 800; margin: 0 0 4px; }
.tw-share-meta { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.tw-share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tw-share-tile { background: #f7f9fb; border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.tw-share-tile span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.tw-share-tile strong { font-size: 22px; color: var(--navy); }
.tw-share-tile.best { background: var(--blue-soft); border-color: var(--blue-line); }
/* PDF-style comparison bands (shared: proposed view + public share) */
.tw-share-cmp { max-width: 860px; padding: 0; overflow: hidden; }
.tw-share-cmp .tw-share-head { padding: 24px 28px 0; margin-bottom: 0; }
.tw-cmp { color: var(--ink, #1a2433); }
.tw-cmp-head { padding: 18px 28px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.tw-cmp-head-main { min-width: 0; }
.tw-cmp-head-logo { flex: 0 0 auto; display: flex; align-items: center; height: 52px; }
/* Preset logo box: every logo (Alliance default or account) renders at the same
   52px height, auto width (capped), object-fit contain -- consistent footprint,
   never stretched, regardless of the uploaded logo's aspect ratio. */
.tw-cmp-head-logo img, .tw-share-logo, .tw-share-logo-wl { height: 52px; width: auto; max-width: 340px; object-fit: contain; display: block; }
/* v3.34.4: the firm's white-label logo sits 15% smaller than the preset box (52 to 44px). */
.tw-cmp-head-logo img.tw-share-logo-wl, .tw-share-logo-wl { height: 44px; max-width: 289px; }
/* v3.34.5: sized by shape once the image decodes (comparison.js fitBrandLogo).
   Wide wordmark keeps 44px; medium marks 54px; square or tall marks 68px. */
.tw-cmp-head-logo img.tw-share-logo-wl.tw-logo-mid, .tw-share-logo-wl.tw-logo-mid { height: 54px; max-width: 200px; }
.tw-cmp-head-logo img.tw-share-logo-wl.tw-logo-square, .tw-share-logo-wl.tw-logo-square { height: 68px; max-width: 110px; }
.tw-cmp-head-logo:has(.tw-logo-square), .tw-cmp-head-logo:has(.tw-logo-mid) { height: auto; }
.tw-share-head-split { justify-content: space-between; align-items: flex-start; }
.tw-cmp-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-2, #1e3a8a); }
.tw-cmp-title { font-size: 19px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--navy); margin-top: 2px; line-height: 1.2; white-space: nowrap; }
.tw-cmp-strat { font-size: 14.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-2, #1e3a8a); margin-top: 6px; }
.tw-cmp-client { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; padding: 16px 28px; background: #f7f9fb; border-bottom: 1px solid var(--line); }
.tw-cmp-col { display: flex; flex-direction: column; gap: 12px; }
.tw-cmp-field-year { margin-left: auto; border: 1px solid var(--line); border-radius: 10px; padding: 9px 18px; background: #fff; text-align: right; }
.tw-cmp-field-year span { margin-bottom: 4px; }
.tw-cmp-field-year strong { font-size: 15px; color: var(--navy); font-weight: 700; }
.tw-cmp-field span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.tw-cmp-field strong { font-size: 14px; color: var(--ink, #1a2433); font-weight: 600; }
.tw-cmp-band { padding: 16px 28px 20px; }
.tw-cmp-section { padding: 16px 28px 4px; border-bottom: 1px solid var(--line); }
.tw-cmp-section-label { font-size: 13px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--navy); margin-bottom: 12px; }
.tw-cmp-section .tw-report { margin: 0; }
.tw-cmp-band-label { font-size: 13px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; margin-bottom: 14px; padding-left: 12px; border-left: 4px solid; }
.tw-cmp-without { background: #fbe4e7; border-top: 2px solid #d98a96; }
.tw-cmp-without .tw-cmp-band-label { color: #9b2230; border-color: #c4364a; }
.tw-cmp-with { background: #e4f4ea; border-top: 2px solid #95cdac; }
.tw-cmp-with .tw-cmp-band-label { color: #136046; border-color: #1f9d63; }
.tw-cmp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tw-cmp-kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.tw-cmp-with .tw-cmp-kpi { border-color: #cfe7d8; }
.tw-cmp-with .tw-cmp-kpi-s { font-size: 12px; font-weight: 800; color: #136046; margin-top: 7px; letter-spacing: .01em; }
.tw-cmp-kpi-s.flat { color: var(--muted); font-weight: 600; }
.tw-cmp-with .tw-cmp-kpi-hero { border: 2px solid #1f9d63; box-shadow: 0 2px 10px rgba(31,157,99,.18); background: #f3fbf6; }
.tw-cmp-with .tw-cmp-kpi-hero .tw-cmp-kpi-v { color: #11704f; }
.tw-cmp-kpi-v { display: block; font-size: 22px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.tw-cmp-kpi-k { display: block; font-size: 11.5px; color: var(--muted); margin-top: 5px; font-weight: 600; }
.tw-cmp-kpi-s { display: block; font-size: 11px; color: #15784e; margin-top: 2px; font-weight: 700; }
.tw-cmp-benefit { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 14px 28px; background: var(--navy); color: #fff; }
.tw-cmp-benefit-name { line-height: 1.2; font-size: 15px; font-weight: 700; }
.tw-cmp-benefit-hi { display: flex; gap: 32px; }
.tw-cmp-benefit-hi .tw-cmp-kpi-v { color: #fff; }
.tw-cmp-benefit-hi .tw-cmp-kpi-k { color: #cdd7ea; }
.tw-cmp-disc { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 0; padding: 18px 28px 24px; }
@media (max-width: 720px) { .tw-cmp-kpis { grid-template-columns: repeat(2, 1fr); } .tw-cmp-benefit { flex-direction: column; align-items: flex-start; } .tw-cmp-title { white-space: normal; } }
.tw-share-tile.best strong { color: var(--blue-2); }
.tw-share-disc { color: var(--muted); font-size: 11px; margin-top: 24px; line-height: 1.5; }

/* ── Topbar account/user menu (mxAURA pattern) ─────────────────────────── */
.tw-hello { font-size: 18px; color: var(--navy); font-weight: 700; margin: 0; }
.tw-acctmenu { position: relative; }
.tw-acct-btn { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 5px 10px 5px 6px; cursor: pointer; }
.tw-acct-btn:hover { border-color: var(--blue-line); }
.tw-acct-name { font-size: 13px; font-weight: 600; color: var(--navy); }
.tw-acct-chev { color: var(--muted); display: inline-flex; }
.tw-acct-chev svg { width: 16px; height: 16px; }
.tw-avatar.lg { width: 40px; height: 40px; font-size: 15px; }
.tw-acct-pop { position: absolute; right: 0; top: 116%; width: 268px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; z-index: 40; }
.tw-acct-head { display: flex; align-items: center; gap: 11px; padding: 8px 8px 12px; }
.tw-acct-uname { font-size: 14px; font-weight: 700; color: var(--navy); }
.tw-acct-umail { font-size: 12px; color: var(--muted); }
.tw-acct-sec { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 4px; }
.tw-acct-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; padding: 9px 8px; border-radius: 8px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.tw-acct-item:hover { background: var(--blue-soft); color: var(--blue); }
.tw-acct-item.on { font-weight: 700; color: var(--navy); }
.tw-acct-ico { display: inline-flex; color: var(--muted); }
.tw-acct-ico svg { width: 17px; height: 17px; }
.tw-acct-item:hover .tw-acct-ico { color: var(--blue); }
.tw-acct-check { margin-left: auto; color: var(--blue); display: inline-flex; }
.tw-acct-check svg { width: 16px; height: 16px; }
.tw-acct-div { height: 1px; background: var(--line); margin: 6px 4px; }

/* ── Placeholder icon ──────────────────────────────────────────────────── */
.tw-ph-ico { width: 44px; height: 44px; margin: 0 auto; color: var(--blue); opacity: .5; }
.tw-ph-ico svg { width: 44px; height: 44px; }

/* ── Folder rail + body layout ─────────────────────────────────────────── */
.tw-calc-body { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: stretch; flex: 1; min-height: 0; }
.tw-folders-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 4px 8px 8px; }
.tw-folder-add { background: none; border: none; cursor: pointer; color: var(--muted); display: inline-flex; padding: 2px; }
.tw-folder-add svg { width: 17px; height: 17px; } .tw-folder-add:hover { color: var(--blue); }
.tw-folder { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: none; border: none; padding: 8px; border-radius: 8px; cursor: pointer; font-size: 13.5px; color: var(--ink); }
.tw-folder:hover { background: var(--blue-soft); }
.tw-folder.on { background: var(--navy); color: #fff; }
.tw-folder-ico { display: inline-flex; color: var(--muted); flex: 0 0 16px; }
.tw-folder-ico svg { width: 16px; height: 16px; }
.tw-folder.on .tw-folder-ico { color: #cdd7ea; }
.tw-folder-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-folder-count { font-size: 11px; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 1px 7px; }
.tw-folder.on .tw-folder-count { background: rgba(255,255,255,.15); color: #fff; }
.tw-folder-actions { display: none; gap: 2px; margin-left: 4px; }
.tw-folder:hover .tw-folder-actions { display: inline-flex; }
.tw-fa { display: inline-flex; color: var(--muted); padding: 2px; border-radius: 5px; }
.tw-fa:hover { color: var(--blue); background: #fff; }
.tw-fa svg { width: 14px; height: 14px; }
.tw-folder.on .tw-fa { color: #cdd7ea; }
.tw-folder-div { height: 1px; background: var(--line); margin: 6px 4px; }
.tw-list-wrap { min-width: 0; }

/* ── Sortable headers ──────────────────────────────────────────────────── */
.tw-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.tw-table th.sortable:hover { color: var(--navy); }
.tw-table th.sortable.on { color: var(--navy); }
.tw-caret { margin-left: 3px; font-size: 10px; }

/* ── Modal ─────────────────────────────────────────────────────────────── */
.tw-modal-ov { position: fixed; inset: 0; background: rgba(16,35,71,.4); display: flex; align-items: flex-start; justify-content: center; padding-top: 14vh; z-index: 100; }
.tw-modal { background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(16,35,71,.3); }
.tw-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.tw-modal-head h3 { margin: 0; font-size: 16px; color: var(--navy); font-weight: 700; }
.tw-modal-x { background: none; border: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.tw-modal-body { padding: 18px; }
.tw-modal-field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.tw-modal-field input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.tw-modal-field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.tw-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.tw-radio-list { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; }
.tw-radio { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink); }
.tw-radio:hover { background: var(--blue-soft); }
.tw-radio span { display: inline-flex; align-items: center; gap: 8px; }
.tw-radio svg { width: 16px; height: 16px; color: var(--muted); }
@media (max-width: 760px) { .tw-calc-body { grid-template-columns: 1fr; } }

/* ── Item 1: folder rail fills to near page bottom ─────────────────────── */
.tw-calc-dash { display: flex; flex-direction: column; min-height: 100%; }
.tw-folders { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; align-self: stretch; min-height: 100%; overflow: auto; }

/* ── Buttons: inline icons + danger variant ────────────────────────────── */
.tw-btn svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 2px; }

/* ── Dialog message text ───────────────────────────────────────────────── */
.tw-modal-msg { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink); }
.tw-modal-msg + .tw-modal-field { margin-top: 14px; }

/* ── Version dropdown (entry bar) ──────────────────────────────────────── */
.tw-vermenu { position: relative; }
.tw-ver-btn { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; color: var(--navy); cursor: pointer; }
.tw-ver-btn:hover { border-color: var(--blue-line); }
.tw-ver-chev svg { width: 15px; height: 15px; color: var(--muted); }
.tw-ver-h { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 4px 8px 8px; }
.tw-ver-item { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; background: none; border: none; padding: 8px; border-radius: 8px; cursor: pointer; }
.tw-ver-item:hover { background: var(--blue-soft); }
.tw-ver-item.on { background: var(--navy); }
.tw-ver-item.on .tw-ver-n, .tw-ver-item.on .tw-ver-meta { color: #fff; }
.tw-ver-n { font-size: 13px; font-weight: 700; color: var(--navy); }
.tw-ver-meta { font-size: 11.5px; color: var(--muted); }
.tw-ver-note { margin: 10px 0 0; padding: 8px 12px; background: #fff8e6; border: 1px solid #f3e2b0; border-left: 3px solid #d9a400; border-radius: 8px; font-size: 12.5px; color: #7a5b00; }
.tw-tag-sel { font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--blue); background: var(--blue-soft); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }

/* ── Selected tab + propose action (also used by calculator views) ─────── */
.tw-propose { margin-top: auto; padding: 13px 16px 16px; border-top: 1px solid var(--line); }
.tw-propose-btn { width: 100%; background: #fff; border: 1px solid var(--blue-line); color: var(--blue); border-radius: 8px; padding: 8px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.tw-propose-btn:hover { background: var(--blue-soft); }
.tw-propose-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.tw-result-card.selected { border-color: var(--navy); box-shadow: 0 0 0 2px var(--navy) inset; }
.tw-sel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.tw-sel-head h1 { margin: 0; font-size: 24px; color: var(--navy); }
.tw-sel-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tw-sel-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.tw-selected-empty { text-align: center; padding: 48px 24px; }
.tw-selected-empty h2 { margin: 0 0 8px; color: var(--navy); }
.tw-selected-empty p { color: var(--muted); max-width: 520px; margin: 0 auto 18px; line-height: 1.55; }

/* ── Entry header: breadcrumb on top, editable name + description ───────── */
.tw-crumb { display: inline-flex; align-items: center; background: none; border: none; color: var(--blue); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; margin-bottom: 10px; }
.tw-crumb:hover { text-decoration: underline; }
.tw-entry-head { margin-bottom: 18px; }
.tw-entry-titleRow { display: flex; align-items: center; gap: 10px; }
.tw-name-view, .tw-desc-view { display: flex; align-items: center; gap: 8px; }
.tw-desc-view { margin-top: 5px; }
.tw-edit-ico { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--muted); cursor: pointer; padding: 3px; border-radius: 6px; }
.tw-edit-ico:hover { color: var(--blue); background: var(--blue-soft); }
.tw-edit-ico svg { width: 16px; height: 16px; }
.tw-entry-desc { font-size: 13.5px; color: var(--ink); }
.tw-entry-desc.empty { color: var(--muted); font-style: italic; }
.tw-inline-input { padding: 7px 10px; border: 1px solid var(--blue); border-radius: 8px; font-size: 16px; font-weight: 600; color: var(--navy); box-shadow: 0 0 0 3px rgba(37,99,235,.15); min-width: 240px; }
.tw-inline-input.wide { min-width: 380px; font-size: 14px; font-weight: 400; }
.tw-inline-ok, .tw-inline-cancel { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 7px; cursor: pointer; border: 1px solid var(--line); }
.tw-inline-ok { background: var(--navy); border-color: var(--navy); color: #fff; }
.tw-inline-ok:hover { background: #0b1a36; }
.tw-inline-cancel { background: #fff; color: var(--muted); }
.tw-inline-cancel:hover { border-color: var(--blue-line); color: var(--ink); }

/* ── Toasts (centralized notifications) ────────────────────────────────── */
.tw-toasts { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.tw-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 380px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 10px; box-shadow: 0 10px 30px rgba(16,35,71,.16); padding: 11px 12px; transform: translateX(120%); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
.tw-toast.in { transform: translateX(0); opacity: 1; }
.tw-toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: 0 0 8px; }
.tw-toast-msg { flex: 1; font-size: 13.5px; color: var(--ink); line-height: 1.4; }
.tw-toast-x { background: none; border: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.tw-toast-x:hover { color: var(--ink); }
.tw-toast-success { border-left-color: #1a8a4f; } .tw-toast-success .tw-toast-dot { background: #1a8a4f; }
.tw-toast-warning { border-left-color: #d9a400; } .tw-toast-warning .tw-toast-dot { background: #d9a400; }
.tw-toast-error   { border-left-color: #b42318; } .tw-toast-error   .tw-toast-dot { background: #b42318; }
.tw-toast-info    { border-left-color: var(--blue); } .tw-toast-info .tw-toast-dot { background: var(--blue); }

/* ── Prop column + icon action buttons ─────────────────────────────────── */
.tw-table th.prop, .tw-table td.prop { text-align: center; width: 54px; }
.tw-prop-yes { display: inline-flex; color: #1a8a4f; }
.tw-prop-yes svg { width: 18px; height: 18px; }
.tw-prop-no { color: #cbd2dd; font-weight: 700; }
.tw-table th.acts { width: 1%; }
.tw-row-actions { white-space: nowrap; text-align: right; }
.tw-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; vertical-align: middle; }
.tw-icon-btn + .tw-icon-btn { margin-left: 2px; }
.tw-icon-btn:hover { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-line); }
.tw-icon-btn.danger:hover { background: #fdeceb; color: #b42318; border-color: #f3c9c4; }
.tw-icon-btn svg { width: 17px; height: 17px; }

/* ── Embedded surfaces: Calendly + TaxWealth AI ────────────────────────── */
.tw-embed { display: flex; flex-direction: column; min-height: 100%; }
.tw-embed-head { margin-bottom: 14px; }
.tw-embed-head h1 { margin: 0; color: var(--navy); font-size: 24px; }
.tw-embed-sub { color: var(--muted); margin: 4px 0 0; }
.tw-embed-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
#calendlyHost { width: 100%; height: 100%; }
.tw-ai-panel { max-width: 560px; margin: 5vh auto; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 42px 34px; }
.tw-ai-badge { width: 58px; height: 58px; border-radius: 15px; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.tw-ai-badge svg { width: 28px; height: 28px; }
.tw-ai-panel h1 { margin: 0 0 8px; color: var(--navy); font-size: 26px; }
.tw-ai-panel p { color: var(--muted); line-height: 1.6; margin: 0 0 22px; }
.tw-ai-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tw-ai-actions .tw-btn { text-decoration: none; }
.tw-ai-note { font-size: 12px; color: var(--muted); margin: 18px 0 0; }

/* ── Colored Alliance logo placements (white surfaces) ─────────────────── */
.tw-login-logo { height: 46px; width: auto; display: block; margin: 0 0 22px; }
.tw-share-head { gap: 12px; display: flex; align-items: center; margin-bottom: 14px; }
/* .tw-share-logo sizing unified with .tw-cmp-head-logo img (preset box) */

/* Clickable analysis name */
.tw-name-link { font: inherit; font-weight: 600; color: var(--navy); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.tw-name-link:hover { color: var(--blue); text-decoration: underline; }
/* Version dropdown: header fixed, list scrolls after ~4 rows */
.tw-ver-pop { position: absolute; left: 0; top: 116%; width: 280px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; z-index: 40; max-height: none; overflow: visible; }
.tw-ver-list { max-height: 208px; overflow-y: auto; margin-top: 2px; }

/* Danger buttons + stacked modal actions (delete menu) */
.tw-btn-danger:hover { border-color: #a93226; }
.tw-modal-actions.tw-modal-stack { flex-direction: column; align-items: stretch; gap: 8px; }

/* ── Embedded TaxWealth AI chat ────────────────────────────────────────── */
.tw-ai-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.tw-ai-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.tw-ai-msg { display: flex; }
.tw-ai-msg.user { justify-content: flex-end; }
.tw-ai-bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: normal; }
.tw-ai-msg.assistant .tw-ai-bubble { background: var(--blue-soft); color: var(--navy); border-top-left-radius: 4px; }
.tw-ai-msg.user .tw-ai-bubble { background: var(--navy); color: #fff; border-top-right-radius: 4px; }
.tw-ai-msg.pending .tw-ai-bubble { opacity: .65; font-style: italic; }
.tw-ai-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.tw-ai-input textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; max-height: 160px; }
.tw-ai-input textarea:focus { outline: none; border-color: var(--blue); }

/* ── Dashboard view ──────────────────────────────────────────────────────── */
.tw-dash { display: flex; flex-direction: column; min-height: 100%; }
.tw-dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tw-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 16px; }
.tw-mcard { display: flex; align-items: flex-start; gap: 13px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 16px 15px; cursor: pointer; position: relative; transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease; font: inherit; }
.tw-mcard:hover { box-shadow: 0 2px 6px rgba(17,24,39,.08), 0 14px 30px rgba(17,24,39,.10); transform: translateY(-1px); border-color: var(--blue-line); }
.tw-mcard.best { background: var(--blue-soft); border-color: var(--blue-line); }
.tw-mc-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.tw-mcard.best .tw-mc-ico { background: #fff; }
.tw-mc-ico svg { width: 20px; height: 20px; }
.tw-mc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tw-mc-label { font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tw-mc-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--blue); background: #fff; border: 1px solid var(--blue-line); padding: 1px 6px; border-radius: 999px; }
.tw-mc-val { font-size: 24px; font-weight: 800; color: var(--navy); line-height: 1.15; letter-spacing: -.01em; }
.tw-mcard.best .tw-mc-val { color: var(--blue-2); }
.tw-mc-sub { font-size: 11.5px; color: var(--muted); }
.tw-mc-go { position: absolute; top: 14px; right: 14px; color: var(--line); font-size: 20px; line-height: 1; transition: color .15s ease, transform .15s ease; }
.tw-mcard:hover .tw-mc-go { color: var(--blue); transform: translateX(2px); }

.tw-dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 22px; }
.tw-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.tw-stat-label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tw-stat-val { font-size: 17px; font-weight: 700; color: var(--ink); }

.tw-dash-recent { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tw-dr-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tw-dr-head h2 { font-size: 15px; font-weight: 700; color: var(--navy); margin: 0; }
.tw-dr-all { font-size: 12.5px; font-weight: 600; color: var(--blue); text-decoration: none; }
.tw-dr-all:hover { text-decoration: underline; }
.tw-dr-empty { padding: 26px 16px; color: var(--muted); font-size: 13.5px; text-align: center; }
.tw-dr-empty a { color: var(--blue); font-weight: 600; text-decoration: none; }
.tw-dr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tw-dr-table thead th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fafbfd; }
.tw-dr-table thead th:nth-child(3), .tw-dr-table thead th:nth-child(4) { text-align: right; }
.tw-dr-table tbody tr { cursor: pointer; transition: background .12s ease; }
.tw-dr-table tbody tr:hover { background: var(--blue-soft); }
.tw-dr-table tbody td { padding: 11px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.tw-dr-table tbody tr:last-child td { border-bottom: none; }
.tw-dr-name { font-weight: 600; color: var(--navy); }
.tw-dr-mut { color: var(--muted); }
.tw-dr-num { text-align: right; font-variant-numeric: tabular-nums; }
.tw-dr-best { font-weight: 700; color: var(--blue-2); }

/* ── Strategies catalog ──────────────────────────────────────────────────── */
.tw-strat { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.tw-strat-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; max-height: calc(100vh - 170px); overflow-y: auto; position: sticky; top: 0; }
.tw-strat-list-head { padding: 14px 16px; font-weight: 700; color: var(--navy); border-bottom: 1px solid var(--line); font-size: 14px; position: sticky; top: 0; background: var(--card); z-index: 1; }
.tw-strat-card { display: flex; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border: none; border-bottom: 1px solid var(--line); background: none; cursor: pointer; font: inherit; align-items: flex-start; transition: background .12s ease; }
.tw-strat-card:hover { background: var(--blue-soft); }
.tw-strat-card.active { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.tw-strat-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex: none; }
.tw-strat-dot.on { background: #16a34a; } .tw-strat-dot.soon { background: #cbd2dc; } .tw-strat-dot.off { background: #c23b3b; }
.tw-strat-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.tw-strat-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.tw-strat-badge { font-size: 9.5px; font-weight: 700; color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-line); padding: 1px 6px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.tw-strat-name { font-weight: 700; color: var(--navy); font-size: 13.5px; line-height: 1.3; }
.tw-strat-summary { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.tw-strat-acount { font-size: 11px; color: var(--blue); font-weight: 600; }
.tw-strat-chev { color: var(--line); font-size: 18px; align-self: center; }
.tw-strat-card.active .tw-strat-chev { color: var(--blue); }
.tw-strat-loading, .tw-strat-empty { padding: 24px 16px; color: var(--muted); font-size: 13.5px; }

.tw-strat-detail { background: transparent; min-width: 0; display: flex; flex-direction: column; height: calc(100vh - 150px); overflow: hidden; }
.tw-strat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; flex: none; }
.tw-strat-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 330px; gap: 14px; overflow: hidden; }
.tw-strat-main { overflow-y: auto; min-height: 0; padding-right: 4px; }
.tw-strat-aside { min-height: 0; display: flex; overflow-y: auto; }
.tw-strat-aside .tw-strat-assets-box { flex: 1; margin-bottom: 0; }
.tw-strat-2up { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.tw-strat-2up .tw-strat-box { margin-bottom: 0; }
.tw-strat-noassets { font-size: 13px; color: var(--muted); margin: 0; }
.tw-strat-eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); }
.tw-strat-head h1 { font-size: 22px; color: var(--navy); font-weight: 800; margin: 3px 0 8px; letter-spacing: -.01em; }
.tw-strat-head-r { display: flex; gap: 8px; flex-wrap: wrap; }
.tw-strat-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 14px; }
.tw-strat-split-inline { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.tw-strat-split-inline .tw-split-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.tw-strat-split-inline .tw-split-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tw-strat-split-inline .tw-split-cell { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 4px; background: var(--surface-2, #f5f7fb); border-radius: 10px; }
.tw-strat-split-inline .tw-split-pct { font-size: 22px; font-weight: 800; color: var(--navy, #0f2a4a); line-height: 1; }
.tw-strat-split-inline .tw-split-role { font-size: 11px; color: var(--muted); margin-top: 5px; font-weight: 600; }
.tw-strat-split-inline .tw-split-note { font-size: 11.5px; color: var(--muted); margin: 12px 0 0; }
.tw-strat-box h3 { font-size: 13px; font-weight: 700; color: var(--navy); margin: 0 0 10px; text-transform: uppercase; letter-spacing: .04em; }
.tw-strat-box p { font-size: 14px; color: var(--ink); line-height: 1.55; margin: 0; }
.tw-strat-bullets { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.tw-strat-bullets li { font-size: 13.5px; color: var(--ink); line-height: 1.45; }
.tw-strat-box a { color: var(--blue); }
.tw-strat-assets { display: flex; flex-direction: column; gap: 8px; }
.tw-asset-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; cursor: pointer; font: inherit; transition: border-color .12s ease, background .12s ease; }
.tw-asset-row:hover { border-color: var(--blue-line); background: var(--blue-soft); }
.tw-asset-row.pending { cursor: default; opacity: .85; }
.tw-asset-row.pending:hover { border-color: var(--line); background: #fff; }
.tw-asset-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: none; }
.tw-asset-ico svg { width: 16px; height: 16px; }
.tw-asset-meta { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.tw-asset-name { font-size: 13.5px; font-weight: 600; color: var(--navy); }
.tw-asset-kind { font-size: 11px; color: var(--muted); }
.tw-asset-dl { font-size: 12px; font-weight: 700; color: var(--blue); flex: none; }
.tw-asset-row.pending .tw-asset-dl { color: var(--muted); }
@media (max-width: 900px) { .tw-strat { grid-template-columns: 1fr; } .tw-strat-list { position: static; max-height: none; }
  .tw-strat-detail { height: auto; overflow: visible; } .tw-strat-body { grid-template-columns: 1fr; overflow: visible; } .tw-strat-main, .tw-strat-aside { overflow: visible; } .tw-strat-2up { grid-template-columns: 1fr; } }

/* ── AI host (full view) + floating "Got Questions?" dock ────────────────── */
.tw-ai-host { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tw-ai-dock { position: fixed; right: 20px; bottom: 20px; width: 380px; max-width: calc(100vw - 32px); z-index: 1000; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 44px rgba(17,24,39,.24); display: flex; flex-direction: column; overflow: hidden; }
.tw-ai-dock-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; background: var(--navy); color: #fff; }
.tw-ai-dock-title { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; min-width: 0; }
.tw-ai-dock-title #aiDockName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-ai-dock-spark { font-size: 13px; }
.tw-ai-dock-actions { display: flex; gap: 2px; flex: none; }
.tw-ai-dock-btn { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; width: 26px; height: 26px; border-radius: 6px; line-height: 1; }
.tw-ai-dock-btn:hover { background: rgba(255,255,255,.16); }
.tw-ai-dock-body { height: 440px; display: flex; flex-direction: column; }
.tw-ai-dock-body .tw-ai-chat { flex: 1; min-height: 0; border: none; border-radius: 0; }
.tw-ai-dock-body .tw-ai-log { padding: 14px; }
.tw-ai-launcher { display: none; align-items: center; gap: 6px; background: var(--navy); color: #fff; border: none; border-radius: 999px; padding: 12px 18px; font-weight: 700; font-size: 13.5px; cursor: pointer; box-shadow: 0 8px 24px rgba(17,24,39,.25); }
.tw-ai-launcher:hover { background: var(--navy-2); }
.tw-ai-dock[data-state="min"] { width: auto; background: transparent; border: none; box-shadow: none; }
.tw-ai-dock[data-state="min"] .tw-ai-dock-head, .tw-ai-dock[data-state="min"] .tw-ai-dock-body { display: none; }
.tw-ai-dock[data-state="min"] .tw-ai-launcher { display: inline-flex; }
.tw-ai-dock[data-state="closed"] { display: none; }

/* ── Deals (Alliance pipeline) ─────────────────────────────────────────────── */
.tw-deal-strip { display: flex; gap: 14px; margin: 4px 0 18px; flex-wrap: wrap; }
.tw-deal-stat .k { color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tw-deal-stat .v { font-weight: 700; margin-top: 3px; }
.tw-deal-list { display: flex; flex-direction: column; gap: 8px; }
.tw-deal-listcol { min-width: 0; display: flex; flex-direction: column; }
.tw-deal-listbar { display: flex; justify-content: flex-end; align-items: center; padding: 0 2px 8px; }
.tw-deal-sortsel { border: 0; background-color: transparent; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; padding: 5px 24px 5px 8px; border-radius: 8px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7787' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 7px center; }
.tw-deal-sortsel:hover { background-color: #eef2f7; color: var(--ink); }
.tw-deal-sortsel:focus { outline: none; box-shadow: 0 0 0 2px rgba(15,42,74,.12); }
.tw-deal-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; cursor: pointer; font: inherit; color: inherit; transition: border-color .12s, box-shadow .12s; }
.tw-deal-row:hover { border-color: var(--accent, #1f4e79); box-shadow: 0 1px 6px rgba(15,30,60,.07); }
.tw-deal-row .grow { flex: 1; min-width: 0; }
.tw-deal-name { font-weight: 650; font-size: 15px; }
.tw-deal-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tw-deal-amt { font-weight: 700; font-size: 15px; white-space: nowrap; }
.tw-deal-detail { margin-top: 14px; }
.tw-dd-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tw-dd-head h3 { margin: 0; font-size: 18px; }
.tw-dd-link { font-size: 12.5px; white-space: nowrap; }
.tw-dd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.tw-dd-grid .k, .tw-dd-desc .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tw-dd-grid .v { font-weight: 650; margin-top: 3px; }
.tw-dd-desc { margin-top: 16px; } .tw-dd-desc p { margin: 4px 0 0; white-space: pre-wrap; }

/* ── Account & Profile ─────────────────────────────────────────────────────── */
.tw-acc-wrap { display: block; max-width: 1000px; }
.tw-acc-wrap > * + * { margin-top: 16px; }
.tw-acc-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.tw-acc-sub { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; margin-bottom: 8px; }
.tw-acc-note { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.tw-kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tw-kv:last-child { border-bottom: 0; }
.tw-kv > span:first-child { color: var(--muted); }
.tw-kv > span:last-child { font-weight: 600; text-align: right; }
.tw-acc-invs { margin-top: 12px; }
.tw-acc-inv { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); padding: 4px 0; }
.tw-prof-id { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.tw-prof-name { font-weight: 700; font-size: 16px; }
.tw-prof-mail { color: var(--muted); font-size: 13px; }

/* ── Deals: filters, stage chips, detail, notes ────────────────────────────── */
.tw-input, .tw-select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font: inherit; color: var(--ink, #16202c); }
.tw-input { flex: 1; min-width: 200px; }
.tw-stage { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; vertical-align: middle; }
.tw-stage.win { background: #e7f5ec; color: #1d7a44; }
.tw-stage.lost { background: #fbeaea; color: #b23b3b; }
.tw-stage.new { background: #e8f0fb; color: #1f4e79; }
.tw-stage.mid { background: #fff3e0; color: #a4690b; }
.tw-dd-amt { font-weight: 700; margin-top: 4px; font-size: 14px; }
.tw-fact .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tw-fact .v { font-weight: 650; margin-top: 3px; }
.tw-dd-block { margin-top: 18px; }
.tw-dd-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.tw-muted-sm { color: var(--muted); font-size: 13px; }
.tw-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.tw-notes { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.tw-note { position: relative; padding: 0 0 16px 18px; }
.tw-note::before { content: ''; position: absolute; left: -7px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent, #1f4e79); border: 2px solid var(--card); }
.tw-note:last-child { padding-bottom: 0; }
.tw-note-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.tw-note-body { font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; }

/* ── Support ───────────────────────────────────────────────────────────────── */
.tw-support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; max-width: 760px; }
.tw-support-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.tw-support-card h3 { margin: 14px 0 6px; font-size: 17px; }
.tw-support-card p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.tw-support-ico { width: 42px; height: 42px; border-radius: 11px; background: var(--bg, #eef2f7); display: flex; align-items: center; justify-content: center; color: var(--accent, #1f4e79); }
.tw-support-ico svg { width: 22px; height: 22px; }
.tw-support-card .tw-btn { display: inline-block; text-decoration: none; }

/* ── Deals: list (left) + sticky detail panel (right) ──────────────────────── */
.tw-deal-split { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 18px; align-items: start; }
.tw-deal-detailcol { position: sticky; top: 16px; max-height: calc(100vh - 150px); overflow: auto; }
.tw-deal-detailcol .tw-deal-detail { margin-top: 0; }
.tw-deal-detailcol .tw-dd-cols { grid-template-columns: 1fr; gap: 14px; }
.tw-deal-detail-empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--muted); font-size: 13.5px; }
@media (max-width: 1000px) { .tw-deal-split { grid-template-columns: 1fr; } .tw-deal-detailcol { position: static; max-height: none; } }

/* ── Deals: width trim (#10) + notes composer + scrollable history ─────────── */
@media (max-width: 1360px) { .tw-deals .tw-deal-split, .tw-deals .tw-deal-controls { grid-template-columns: minmax(0, 1fr) 560px; } }
.tw-dd-desc { white-space: pre-wrap; margin: 0; line-height: 1.5; font-size: 13.5px; }
.tw-btn-sm { padding: 7px 12px; font-size: 13px; }
.tw-note-add { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 12px; }
.tw-note-input { flex: 1; min-width: 0; resize: vertical; font: inherit; line-height: 1.4; }
.tw-notes-scroll { max-height: 340px; overflow-y: auto; padding-right: 6px; }
.tw-deal-more { text-align: center; color: var(--muted); font-size: 12.5px; padding: 12px; }
.tw-dd-danger { border-top: 1px solid var(--line); padding-top: 14px; }
.tw-btn-danger-ghost { background: transparent; border: 1px solid #e3b7b7; color: #b23b3b; }
.tw-btn-danger-ghost:hover { border-color: #e6b0aa; background: #fbeaea; }
.tw-btn-danger-ghost:disabled { opacity: .6; cursor: default; }

/* ── Notification bell (topbar) ───────────────────────────────────────────── */
.tw-notif { position: relative; }
.tw-notif-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink, #1f2a44); cursor: pointer; }
.tw-notif-btn:hover { background: var(--surface-2, #f5f7fb); }
.tw-notif-btn svg { width: 19px; height: 19px; }
.tw-notif-badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #c0392b; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.tw-notif-pop { position: absolute; top: 46px; right: 0; width: 360px; max-width: 86vw; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(16,28,54,.16); z-index: 60; overflow: hidden; }
.tw-notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--ink, #1f2a44); }
.tw-notif-read { border: 0; background: transparent; color: var(--accent, #1f4e79); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tw-notif-read:hover { text-decoration: underline; }
.tw-notif-list { max-height: 420px; overflow-y: auto; }
.tw-notif-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13px; }
/* Tabs: New / Read / Trash */
.tw-notif-tabs { display: flex; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tw-notif-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; padding: 6px 8px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tw-notif-tab:hover { background: var(--surface-2, #f5f7fb); }
.tw-notif-tab.on { background: #eef4fc; color: var(--accent, #1f4e79); }
.tw-notif-c { font-size: 11px; font-weight: 700; min-width: 18px; padding: 0 5px; border-radius: 999px; background: #e6eaf0; color: #5b6675; }
.tw-notif-tab.on .tw-notif-c { background: #d6e6fb; color: #1f4e79; }
/* Row = clickable item + actions */
.tw-notif-row { display: flex; }
.tw-notif-row:hover { background: var(--surface-2, #f5f7fb); }
.tw-notif-row.unread { background: #f3f8ff; }
.tw-notif-row.unread:hover { background: #e9f2ff; }
.tw-notif-item { display: flex; gap: 10px; align-items: flex-start; flex: 1; min-width: 0; text-align: left; padding: 11px 6px 11px 14px; border: 0; background: transparent; cursor: pointer; }
.tw-notif-item:disabled { cursor: default; }
.tw-notif-ico { flex: 0 0 8px; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; }
.tw-notif-ico.deal { background: #1f4e79; }
.tw-notif-ico.calc { background: #2e9e6b; }
.tw-notif-body { flex: 1; min-width: 0; }
.tw-notif-title { display: block; font-size: 13px; font-weight: 600; color: var(--ink, #1f2a44); line-height: 1.35; }
.tw-notif-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-notif-time { flex: 0 0 auto; font-size: 11px; color: var(--muted); padding-left: 6px; }
.tw-notif-acts { display: flex; gap: 2px; flex: 0 0 auto; }
.tw-notif-act { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: 7px; color: var(--muted); cursor: pointer; opacity: .55; }
.tw-notif-act svg { width: 15px; height: 15px; }
.tw-notif-act:hover { background: #eef1f5; opacity: 1; color: var(--ink, #1f2a44); }
.tw-notif-act.danger:hover { background: #fde8e8; color: #b42318; }
.tw-notif-row:not(:hover) .tw-notif-act[data-trash] { opacity: 0; pointer-events: none; }

/* ── Dashboard: deal-update table chips + spacer between the two tables ────── */
.tw-dash-spacer { height: 22px; }
.tw-dr-kind { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; }
.tw-dr-kind.new { background: #e8f5ee; color: #1d7a4d; }
.tw-dr-kind.upd { background: #eef2fb; color: #2f4a78; }

/* ── Deals header row (title + Create Deal) ───────────────────────────────── */
.tw-embed-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }

/* ── Stage checkbox dropdown ──────────────────────────────────────────────── */
.tw-stagefilter { position: relative; }
.tw-stagefilter-btn { cursor: pointer; text-align: left; min-width: 150px; display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; }
/* v3.29.4: no arrows on buttons */
.tw-stagefilter-btn.on { border-color: var(--accent, #1f4e79); color: var(--accent, #1f4e79); font-weight: 600; }
.tw-stagefilter-pop { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 240px; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(16,28,54,.16); padding: 6px; }
.tw-stage-opt { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink, #1f2a44); cursor: pointer; }
.tw-stage-opt:hover { background: var(--surface-2, #f5f7fb); }
.tw-stage-opt input { width: 15px; height: 15px; }
.tw-stage-actions { border-top: 1px solid var(--line); margin-top: 4px; padding: 7px 10px 3px; }
.tw-link-sm { border: 0; background: transparent; color: var(--accent, #1f4e79); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0; }
.tw-link-sm:hover { text-decoration: underline; }

/* ── Clickable contact chip + contact card ────────────────────────────────── */
.tw-chip-btn { cursor: pointer; border: 1px solid var(--line); background: var(--surface-2, #f5f7fb); transition: background .12s, border-color .12s; }
.tw-chip-btn:hover { background: #e9f2ff; border-color: var(--accent, #1f4e79); }
.tw-contact-card { min-width: 320px; }
.tw-cc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.tw-cc-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent, #1f4e79); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.tw-cc-name { font-size: 16px; font-weight: 700; color: var(--ink, #1f2a44); }
.tw-cc-title { font-size: 13px; color: var(--muted); }
.tw-cc-grid { display: flex; flex-direction: column; gap: 2px; }
.tw-cc-row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.tw-cc-row:last-child { border-bottom: 0; }
.tw-cc-k { color: var(--muted); }
.tw-cc-v { color: var(--ink, #1f2a44); text-align: right; }
.tw-cc-link { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--accent, #1f4e79); text-decoration: none; }

/* ── Create-deal form + billing actions ───────────────────────────────────── */
.tw-form { display: flex; flex-direction: column; gap: 12px; min-width: 380px; }
.tw-fl { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tw-fl .tw-input, .tw-fl .tw-select { font-weight: 400; }
.tw-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tw-form-sec { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 2px; }
.tw-form-actions { margin-top: 4px; }
.tw-form-msg { color: #b23b3b; font-size: 13px; min-height: 16px; }

/* ── Deals controls aligned to the split: search over list, filters over detail ── */
/* Controls grid mirrors the deal split so column 1 == the deal-list column.
   Search sits left; the filter group right-aligns to the list column's right
   edge (== the right edge of the deal cards). Column 2 stays empty to reserve
   the detail-panel width. */
.tw-deal-controls { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 18px; align-items: center; }
.tw-deals .tw-deal-controls { grid-template-columns: minmax(0, 1fr) 720px; }
.tw-deal-controls-row { min-width: 0; }
.tw-deal-filtergroup { display: flex; flex: 0 0 auto; min-width: 0; }
.tw-deal-filtergroup .tw-deal-sortsel { max-width: 150px; }
.tw-deal-filtergroup #dSort { max-width: 132px; }
/* Stage filter is a <button>, not a <select>: drop the select chevron image
   (its ::after supplies the caret) and the fixed box width. */
.tw-deal-filtergroup .tw-stagefilter-btn.tw-deal-sortsel { background-image: none; min-width: auto; max-width: none; padding: 5px 8px; }
/* Keep the stage popover inside the column (opens leftward from the right edge). */
.tw-deal-filtergroup .tw-stagefilter-pop { left: auto; right: 0; }
@media (max-width: 1360px) { .tw-deals .tw-deal-controls { grid-template-columns: minmax(0, 1fr) 560px; } }
@media (max-width: 1000px) { .tw-deal-controls, .tw-deals .tw-deal-controls { grid-template-columns: 1fr; } .tw-deal-controls-row { flex-wrap: wrap; } }
@media (max-width: 720px) { .tw-deal-controls-row .tw-deal-search { flex: 1 1 100%; } .tw-deal-filtergroup { margin-left: 0; flex-wrap: wrap; } }

/* +15% on the three summary boxes */
.tw-deal-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 21px; min-width: 173px; }
.tw-deal-stat .k { font-size: 12px; }

/* detail head actions + edit form spacing */
.tw-dd-head-actions { display: flex; align-items: center; gap: 10px; }
.tw-cc-head .grow { flex: 1; min-width: 0; }

/* Stat strip aligned to the search row: left cell = search width, boxes equal within it */
.tw-deals .tw-deal-strip { display: grid; grid-template-columns: repeat(4, minmax(max-content, 1fr)); }
.tw-deals .tw-deal-strip .tw-deal-stat { min-width: 0; }
.tw-deal-stat .v { font-size: 23px; white-space: nowrap; }
@media (max-width: 1100px) { .tw-deals .tw-deal-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1360px) { .tw-deals .tw-deal-strip { grid-template-columns: minmax(0, 1fr) 560px; } }
@media (max-width: 1000px) { .tw-deals .tw-deal-strip { grid-template-columns: 1fr; } }

/* ── Dashboard redesign: hero, attention strip, pipeline bar, sections ── */
.tw-dash-section { margin-top: 26px; }
.tw-sec-head { display: flex; }
.tw-sec-head h2 { font-size: 15px; font-weight: 700; color: var(--navy); margin: 0; letter-spacing: .01em; }
.tw-sec-subhead { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 2px 0 8px; }
.tw-sec-table { margin-top: 14px; }

/* Hero: the single number that anchors the page */
.tw-hero { display: flex; align-items: center; gap: 28px; width: 100%; text-align: left;
  background: var(--navy); color: #fff; border: none; border-radius: 16px; padding: 16px 26px; margin-top: 6px; cursor: pointer; position: relative; }
.tw-hero:hover { background: var(--navy-2, #16223c); }
.tw-hero-main { display: flex; flex-direction: column; justify-content: center; min-width: 220px; }
.tw-hero-k { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #9fb3d6; }
.tw-hero-sub { font-size: 13px; color: #b9c6dd; }
.tw-hero-side { display: grid; grid-template-columns: repeat(3, auto); gap: 0 36px; align-items: center; margin-left: auto; padding-left: 28px; border-left: 1px solid rgba(255,255,255,.14); }
.tw-hero-stat { display: flex; flex-direction: column; gap: 3px; }
.tw-hero-stat .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: #9fb3d6; }
.tw-hero-stat .v { font-size: 22px; font-weight: 700; }
.tw-hero-go { position: absolute; right: 18px; top: 16px; color: #6f86ad; font-size: 20px; }
@media (max-width: 900px) { .tw-hero { flex-direction: column; gap: 18px; } .tw-hero-side { margin-left: 0; padding-left: 0; border-left: none; border-top: 1px solid rgba(255,255,255,.14); padding-top: 16px; } }

/* Needs-attention strip */
.tw-attn { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px;
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 12px 16px; }
.tw-attn-ico { color: #c2410c; width: 18px; height: 18px; display: inline-flex; }
.tw-attn-ico svg { width: 18px; height: 18px; }
.tw-attn-title { font-weight: 700; color: #9a3412; font-size: 13px; }
.tw-attn-items { display: flex; flex-wrap: wrap; gap: 8px; }
.tw-attn-item { background: #fff; border: 1px solid #fdba74; color: #9a3412; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tw-attn-item:hover { background: #ffedd5; }

/* Pipeline-by-stage horizontal bars */
.tw-pipebar { display: flex; flex-direction: column; gap: 7px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tw-pipe-row { display: grid; grid-template-columns: 190px 1fr 46px 130px; align-items: center; gap: 14px; width: 100%; background: none; border: none; padding: 4px 0; cursor: pointer; text-align: left; }
.tw-pipe-row:hover .tw-pipe-label { color: var(--navy); }
.tw-pipe-label { font-size: 13px; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-pipe-track { height: 10px; background: #eef1f6; border-radius: 6px; overflow: hidden; }
.tw-pipe-fill { display: block; height: 100%; border-radius: 6px; }
.tw-pipe-fill.open { background: #2563eb; }
.tw-pipe-fill.won { background: #16a34a; }
.tw-pipe-fill.dead { background: #cbd5e1; }
.tw-pipe-count { font-size: 13px; font-weight: 700; color: var(--navy); text-align: right; }
.tw-pipe-val { font-size: 12.5px; color: var(--muted); text-align: right; }
@media (max-width: 720px) { .tw-pipe-row { grid-template-columns: 120px 1fr 38px; } .tw-pipe-val { display: none; } }

/* Secondary metric grids: equal thirds */
.tw-metrics.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 820px) { .tw-metrics.three { grid-template-columns: 1fr; } }

/* Calendly loading skeleton */
.tw-cal-skeleton { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: 14px; background: #fff; }
.tw-cal-spin { width: 34px; height: 34px; border: 3px solid #e6eaf0; border-top-color: var(--navy); border-radius: 50%; animation: twspin 0.8s linear infinite; }
@keyframes twspin { to { transform: rotate(360deg); } }
.tw-embed-frame { flex: 1; min-height: 640px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; position: relative; }

/* Agreement gate */
.tw-agree-md, .tw-agree-body { max-height: 50vh; overflow: auto; }
.tw-agree-md h3 { font-size: 16px; color: var(--navy); margin: 0 0 8px; }
.tw-agree-md h4 { font-size: 14px; color: var(--navy); margin: 12px 0 6px; }
.tw-agree-md p, .tw-agree-body p { font-size: 13.5px; line-height: 1.55; color: #334155; margin: 0 0 10px; }
.tw-agree-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.tw-agree-meta { font-size: 11.5px; color: var(--muted); margin-top: 10px; text-align: right; }

/* Account view: subscription bubble, card face, info grid */
.tw-sub-bubble { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--navy); color: #fff; border-radius: 16px; padding: 20px 24px; margin-bottom: 18px; }
.tw-sub-bubble.elite { background: linear-gradient(120deg, #0f2a4a, #1e3a5f); }
.tw-sub-tier { font-size: 22px; font-weight: 800; letter-spacing: .01em; }
.tw-sub-meta { font-size: 14px; color: #c7d3e6; margin-top: 4px; }
.tw-sub-renew { font-size: 12px; color: #9fb3d6; margin-top: 4px; }
.tw-sub-status { text-transform: capitalize; }
.tw-sub-status.active, .tw-sub-status.trialing { color: #86efac; }
.tw-sub-status.past_due, .tw-sub-status.canceled, .tw-sub-status.suspended { color: #fda4af; }
.tw-sub-right { text-align: right; }
.tw-sub-since { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #9fb3d6; }
.tw-sub-since-v { font-size: 15px; font-weight: 700; margin-top: 2px; }

.tw-acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .tw-acc-grid { grid-template-columns: 1fr; } }
.tw-acc-cardhead { display: flex; align-items: center; justify-content: space-between; }

.tw-card-face { background: linear-gradient(135deg, #1f2937, #0f2a4a); color: #fff; border-radius: 12px; padding: 16px 18px; margin: 4px 0 14px; }
.tw-card-brand { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #c7d3e6; }
.tw-card-num { font-size: 18px; letter-spacing: .12em; margin: 12px 0 14px; font-variant-numeric: tabular-nums; }
.tw-card-foot { display: flex; justify-content: space-between; font-size: 12px; color: #c7d3e6; }

.tw-acc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 4px; }
@media (max-width: 760px) { .tw-acc-form { grid-template-columns: 1fr; } }

/* Account view: full-width stacked layout (info row -> plan -> billing) */
.tw-acc-info .tw-kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.tw-acc-info .tw-kv-grid .tw-kv { border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .tw-acc-info .tw-kv-grid { grid-template-columns: 1fr; } }
.tw-bill-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.tw-bill-card .tw-card-face { margin-top: 0; }
@media (max-width: 760px) { .tw-bill-grid { grid-template-columns: 1fr; } }

/* Account information: identity header + grouped sections, inline edit (no screen flip) */
.tw-acc-head-actions { display: flex; gap: 8px; flex-shrink: 0; }
.tw-acc-head-actions #accCancel, .tw-acc-head-actions #accSave,
.tw-acc-head-actions #profCancel, .tw-acc-head-actions #profSave { display: none; }
.tw-acc-info.editing #accEdit, .tw-acc-info.editing #profEdit { display: none; }
.tw-acc-info.editing #accCancel, .tw-acc-info.editing #profCancel { display: inline-flex; }
.tw-acc-info.editing.dirty #accSave, .tw-acc-info.editing.dirty #profSave { display: inline-flex; }

.tw-acc-info { padding: 0; overflow: hidden; }
.tw-acc-id { display: flex; align-items: center; gap: 16px; padding: 22px 24px; background: linear-gradient(180deg, #fbfcfe, #f5f7fb); border-bottom: 1px solid var(--line); }
.tw-acc-avatar { width: 52px; height: 52px; border-radius: 12px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 19px; letter-spacing: .02em; flex-shrink: 0; }
.tw-acc-id-main { flex: 1; min-width: 0; }
.tw-acc-id-name { font-size: 20px; font-weight: 800; color: var(--navy); line-height: 1.2; }
.tw-acc-id-meta { display: flex; align-items: center; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.tw-pill { background: #fff; border: 1px solid var(--line); cursor: pointer; color: var(--muted); font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: capitalize; letter-spacing: .01em; }
.tw-pill-plan { background: #e7eefb; color: #1e3a8a; }
.tw-pill-plan.elite { background: #0f2a4a; color: #fff; }
.tw-pill-plan.basic { background: #eef1f5; color: #475569; }
.tw-pill-role { background: #eef1f5; color: #475569; }
.tw-acc-id-since { font-size: 12px; color: var(--muted); }
.tw-acc-id-mail { font-size: 13px; color: var(--muted); }
.tw-acc-info.editing .tw-fc-ro .tw-fc-val { display: block; }

.tw-acc-sections { padding: 6px 24px 20px; }
.tw-acc-sec { padding: 18px 0; border-bottom: 1px solid var(--line); }
.tw-acc-sec:last-child { border-bottom: none; }
.tw-acc-sec-h { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--navy); margin-bottom: 14px; }
.tw-acc-sec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; }
@media (max-width: 720px) { .tw-acc-sec-grid { grid-template-columns: 1fr; } }
.tw-fc { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tw-fc.span2 { grid-column: 1 / -1; }
.tw-fc-label { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tw-fc-val { font-size: 14.5px; font-weight: 600; color: var(--ink); min-height: 21px; word-break: break-word; }
.tw-fc-empty { font-style: normal; font-weight: 500; color: #b6bfcc; }
.tw-fc-input { display: none; width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; font-family: inherit; color: var(--ink); background: #fff; box-sizing: border-box; }
.tw-fc-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15,42,74,.10); }
.tw-acc-info.editing .tw-fc-val { display: none; }
.tw-acc-info.editing .tw-fc-input { display: block; }
.tw-acc-info .tw-form-msg { padding: 0 24px 18px; color: #b42318; font-size: 13px; }
.tw-acc-info .tw-form-msg:empty { display: none; }

/* ── Client-facing share report: clean two-column Income & Taxes ──────────────
   Replaces the cramped three-table grid on the share/selected comparison. Fixed
   Federal/State tracks (no overflow collision) + folded Recapture/NIIT rows. */
.tw-shrep { --shrep-fed: 104px; --shrep-state: 92px; --shrep-pad: 18px; }
/* Section grouping bars: a dark bar labels each tax category (Corporate /
   Individual) above its boxes, giving clear separation. */
.tw-shrep-sec { margin-bottom: 18px; }
.tw-shrep-sec:last-child { margin-bottom: 0; }
.tw-shrep-bar { background: var(--navy); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 8px 14px; border-radius: 8px; margin-bottom: 12px; }
.tw-shrep-ent { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tw-shrep-body { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tw-shrep-col { min-width: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; padding-bottom: 12px; }
.tw-shrep-h { background: #eef1f5; text-align: center; font-weight: 800; color: var(--navy); font-size: 12.5px; letter-spacing: .02em; padding: 8px; margin-bottom: 8px; }
.tw-shrep-grp { font-style: italic; font-weight: 700; color: var(--navy); font-size: 12px; padding: 8px var(--shrep-pad) 2px; }
/* Federal | State key header: empty label cell, values left-aligned over each
   value column, matching the source sheet. A gap separates the headline rows
   from the Federal/State block. */
.tw-shrep-keys { display: grid; grid-template-columns: 1fr var(--shrep-fed) var(--shrep-state); column-gap: 14px; padding: 2px var(--shrep-pad); margin-top: 10px; }
.tw-shrep-keys span { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .02em; color: var(--navy); }
.tw-shrep-keys span:first-child { text-align: right; }
/* Rows: right-aligned label hugging the value columns; values left-aligned and
   vertically aligned across single- and dual-value rows. No row chrome. */
.tw-shrep-row { display: grid; grid-template-columns: 1fr var(--shrep-fed) var(--shrep-state); column-gap: 14px; align-items: baseline; padding: 3px var(--shrep-pad); }
.tw-shrep-l { text-align: right; color: #1a2433; font-size: 12.5px; }
.tw-shrep-v { text-align: left; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--ink); white-space: nowrap; }
.tw-shrep-v2 { color: #1a2433; }
.tw-shrep-row.is-strong .tw-shrep-l, .tw-shrep-row.is-strong .tw-shrep-v { font-weight: 800; color: var(--navy); }
.tw-shrep-na { display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; letter-spacing: .06em; min-height: 120px; }

/* ── Side-by-side comparison detail (Without | With | Change) ─────────────── */
.tw-cmpd { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.tw-cmpd-head, .tw-cmpd-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; column-gap: 8px; align-items: baseline; }
.tw-cmpd-head { background: #f7f9fb; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.tw-cmpd-head span { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: right; }
.tw-cmpd-head .tw-cmpd-l { text-align: left; }
.tw-cmpd-head .neg { color: #a3273a; }
.tw-cmpd-head .pos { color: #15784e; }
.tw-cmpd-row { padding: 10px 16px; border-top: 1px solid var(--line); }
.tw-cmpd-l { font-size: 13px; color: var(--ink); }
.tw-cmpd-v { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink); white-space: nowrap; }
.tw-cmpd-d { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--muted); }
.tw-cmpd-d.up { color: #15784e; }
.tw-cmpd-d.flat { color: var(--muted); }
.tw-cmpd-row.is-total { background: #f4faf6; }
.tw-cmpd-row.is-total .tw-cmpd-l, .tw-cmpd-row.is-total .tw-cmpd-v { font-weight: 800; color: var(--navy); }

@media (max-width: 720px) {
  .tw-shrep-ent, .tw-shrep-body { grid-template-columns: 1fr; }
  .tw-cmpd-head, .tw-cmpd-row { grid-template-columns: 1.4fr 1fr 1fr; }
  .tw-cmpd-head span:nth-child(4), .tw-cmpd-row .tw-cmpd-d { display: none; }
}

/* ── White-label partner logo on the shared sheet ────────────────────────────
   height-capped with width:auto + object-fit:contain so partner logos of any
   aspect ratio scale proportionally and never stretch. */
/* .tw-share-logo-wl sizing unified with the preset logo box above */

/* ── Account › Brand & Logo card ─────────────────────────────────────────── */
.tw-brand-card { margin-top: 16px; }
.tw-brand-status { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 4px 0 16px; }
.tw-pill-wl { background: #eef1f5; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; }
.tw-pill-wl.on { background: #eaf6ef; color: #15784e; border-color: #cfe7d8; }
.tw-brand-note { font-size: 12.5px; color: var(--muted); }
.tw-brand-row { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; }
.tw-brand-preview { height: 96px; border: 1px dashed var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #fbfcfe; padding: 12px; overflow: hidden; }
.tw-brand-preview img { max-height: 64px; max-width: 100%; width: auto; object-fit: contain; display: block; }
/* Dark-grey preview background for transparent logos/icons, toggled per account. */
.tw-brand-preview.tw-bg-dark { background: #3a3f47; border-color: #3a3f47; }
.tw-bg-toggle { white-space: nowrap; }
/* Chip behind the logo on the report header and shared analyses when the account
   has chosen a dark background for a transparent (light) logo. */
.tw-logo-chip { display: inline-flex; align-items: center; }
.tw-logo-chip-dark { background: #3a3f47; padding: 6px 12px; border-radius: 8px; }
.tw-brand-empty { font-size: 12.5px; color: var(--muted); }
.tw-brand-controls { min-width: 0; }
.tw-brand-btns { display: flex; gap: 8px; margin-bottom: 8px; }
.tw-brand-tips { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.tw-brand-tips strong { color: var(--ink); font-weight: 700; }
@media (max-width: 720px) { .tw-brand-row { grid-template-columns: 1fr; } }

/* == Print / Save-as-PDF: client comparison on ONE US-Letter page ============
   Applies to the standalone share page (.tw-share) and to the in-app
   "Download PDF" / print path, which renders the same card into
   #tw-print-area. Everything is compressed so the full comparison
   (Income & Taxes detail + result bands + side-by-side table) fits one page.
   Screen view is untouched. */
.no-print { }
.tw-print-footer { display: none; }
@media print {
  @page { size: letter; margin: 0.32in; }
  html, body { background: #fff !important; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .no-print { display: none !important; }

  /* Strip outer chrome so the card uses the full page width. */
  .tw-share { display: block !important; min-height: 0 !important; padding: 0 !important; }
  .tw-share-inner { max-width: 100% !important; }
  .tw-share-card { max-width: 100% !important; border: none !important; border-radius: 0 !important; box-shadow: none !important; padding: 0 !important; }

  /* Keep atomic blocks intact, but DO NOT force a page break -- one page only. */
  .tw-cmp-head, .tw-cmp-client, .tw-shrep-sec, .tw-cmp-band, .tw-cmp-benefit,
  .tw-cmpd, .tw-cmp-kpi { break-inside: avoid; page-break-inside: avoid; }

  /* Header: smaller logo, title may wrap beside it (no overlap). */
  .tw-cmp-head { gap: 16px; align-items: flex-start; padding: 0 0 6px; margin: 0; }
  .tw-cmp-head-main { flex: 1 1 auto; min-width: 0; }
  .tw-cmp-head-logo { flex: 0 0 auto; }
  .tw-cmp-head-logo img, .tw-share-logo, .tw-share-logo-wl { height: 34px !important; }
  .tw-cmp-head-logo img.tw-share-logo-wl, .tw-share-logo-wl { height: 29px !important; }
  .tw-cmp-head-logo img.tw-share-logo-wl.tw-logo-mid, .tw-share-logo-wl.tw-logo-mid { height: 36px !important; }
  .tw-cmp-head-logo img.tw-share-logo-wl.tw-logo-square, .tw-share-logo-wl.tw-logo-square { height: 46px !important; }
  .tw-cmp-title { white-space: normal; overflow-wrap: anywhere; font-size: 14px; margin: 0; }
  .tw-cmp-strat { font-size: 11px; margin: 1px 0 0; }

  /* Client / Tax Year band. */
  .tw-cmp-client { padding: 7px 10px !important; margin: 0 0 8px !important; gap: 14px; }
  .tw-cmp-field { font-size: 11px; }
  .tw-cmp-field-year { padding: 4px 10px; }

  /* Section labels ("INCOME AND TAXES", "SIDE-BY-SIDE COMPARISON"). */
  .tw-cmp-section-label { font-size: 9.5px; margin: 6px 0 4px !important; }
  .tw-cmp-section { margin: 0 !important; padding: 0 !important; }

  /* INDIVIDUAL / Corporate section bars. */
  .tw-shrep-sec { margin: 0 0 6px !important; }
  .tw-shrep-bar { padding: 3px 10px !important; font-size: 10.5px !important; margin: 0 0 6px !important; }

  /* Income & Taxes detail boxes -- the tallest section: compress hard. */
  .tw-shrep { --shrep-fed: 84px; --shrep-state: 74px; }
  .tw-shrep-body { gap: 10px !important; }
  .tw-shrep-col { padding: 0 !important; }
  .tw-shrep-h { padding: 5px 8px !important; font-size: 11px !important; }
  .tw-shrep-row, .tw-shrep-keys { padding: 1.5px 10px !important; }
  .tw-shrep-l, .tw-shrep-v { font-size: 9.5px !important; line-height: 1.32 !important; }

  /* Result bands (red "without" / green "with") + KPIs. */
  .tw-cmp-band { padding: 8px 12px !important; margin: 8px 0 0 !important; }
  .tw-cmp-band-label { font-size: 10.5px !important; margin: 0 0 6px !important; }
  .tw-cmp-kpis { gap: 8px !important; }
  .tw-cmp-kpi { padding: 7px 9px !important; }
  .tw-cmp-kpi-v { font-size: 15px !important; }
  .tw-cmp-kpi-k { font-size: 8.5px !important; }
  .tw-cmp-kpi-s { font-size: 9px !important; }
  .tw-cmp-with .tw-cmp-kpi-hero { box-shadow: none !important; }

  /* Navy strategy strip. */
  .tw-cmp-benefit { padding: 8px 14px !important; }
  .tw-cmp-benefit-name { font-size: 14px !important; }
  .tw-cmp-benefit-hi { font-size: 15px !important; }

  /* Side-by-side table. */
  .tw-cmpd { margin: 6px 0 0 !important; }
  .tw-cmpd-head, .tw-cmpd-row { font-size: 9.5px !important; }
  .tw-cmpd-head th, .tw-cmpd-row td, .tw-cmpd-l, .tw-cmpd-v, .tw-cmpd-d { padding: 3.5px 8px !important; }

  /* Disclaimer. */
  .tw-cmp-disc, .tw-print-disc { font-size: 8px !important; line-height: 1.4 !important; margin: 8px 0 0 !important; padding: 0 !important; }

  /* Running footer (one page -> appears once). */
  .tw-print-footer { display: block; position: fixed; bottom: 0; left: 0; right: 0;
    text-align: center; font-size: 8px; letter-spacing: .04em; color: #94a3b8; }

  /* In-app print container reuses the same card; show it, hide the rest. */
  body.tw-printing > *:not(#tw-print-area) { display: none !important; }
  body.tw-printing #tw-print-area { display: block !important; }
}

/* ── Account sub-tabs + Branding blocks ─────────────────────────────────────── */
.tw-acc-subtabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tw-acc-pane[hidden] { display: none; }
.tw-brand-block { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.tw-brand-block:first-of-type { border-top: 0; margin-top: 8px; padding-top: 8px; }
.tw-brand-block-h { font-size: 13px; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.tw-brand-block-h span { display: inline; font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 6px; }
.tw-brand-preview-sq { width: 96px; height: 96px; flex: 0 0 96px; }
.tw-brand-preview-sq img { max-height: 72px; max-width: 72px; }

/* ── Share Analysis modal: wider, clean, matches site ───────────────────────── */
.tw-modal:has(.tw-sharew) { max-width: 660px; }
.tw-sharew .tw-modal-field input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.tw-sharew-hint { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.tw-sharew-actions { flex-wrap: nowrap; align-items: center; gap: 8px; }
.tw-sharew-actions .tw-sharew-gap { flex: 1 1 auto; }
.tw-sharew-actions .tw-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: 0 0 auto; }
.tw-sharew-actions .tw-btn svg { width: 15px; height: 15px; }
@media (max-width: 640px) { .tw-sharew-actions { flex-wrap: wrap; } .tw-sharew-actions .tw-sharew-gap { display: none; } }

/* ── Searchable filter popover (deals Account/User) ─────────────────────────── */
.tw-searchsel-pop { min-width: 230px; padding: 0; overflow: hidden; }
.tw-searchsel-search { position: sticky; top: 0; background: #fff; padding: 8px; border-bottom: 1px solid var(--line); }
.tw-searchsel-input { width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 13px; color: var(--ink); }
.tw-searchsel-input:focus { outline: none; border-color: var(--blue, #2563eb); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.tw-searchsel-list { max-height: 260px; overflow-y: auto; padding: 6px; }
.tw-searchsel-opt { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 9px; border-radius: 7px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-searchsel-opt:hover { background: #eef2f7; }
.tw-searchsel-empty { padding: 12px; color: var(--muted); font-size: 12.5px; text-align: center; }

/* ── Autosave status (replaces the old Save button in the entry head) ───────── */
.tw-save-status { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: color .15s; }
.tw-save-status.saving { color: var(--muted); }
.tw-save-status.saved { color: #0f9b6c; }
.tw-save-status.saved::before { content: "\2713"; font-weight: 700; }
.tw-save-status.error { color: #b42318; }

/* Global "Got Questions?" AI launcher (shown when the dock is closed) ─────────── */
.tw-ai-fab{position:fixed;right:20px;bottom:20px;z-index:990;display:inline-flex;align-items:center;gap:7px;background:var(--navy);color:#fff;border:none;border-radius:999px;padding:12px 18px;font-weight:700;font-size:13.5px;cursor:pointer;box-shadow:0 8px 24px rgba(17,24,39,.25)}
.tw-ai-fab:hover{background:var(--navy-2)}
.tw-ai-fab svg{width:16px;height:16px}

/* Authored-strategy program version chip on comparison cards */
.tw-vchip{display:inline-block;font-size:10px;font-weight:700;letter-spacing:.03em;background:#e8edf3;color:#33526f;border-radius:4px;padding:1px 5px;margin-left:6px;vertical-align:middle}

/* Coverage chips + combined solutions */
.tw-chip{ color: var(--navy); background: var(--bg, #f5f7fa); border: 1px solid var(--line);display:inline-block;font-size:10px;font-weight:700;letter-spacing:.02em;border-radius:4px;padding:2px 7px;margin-left:8px;vertical-align:middle;white-space:nowrap}
.tw-chip-full{background:#e3f5ec;color:#1f7a4d}
.tw-chip-part{background:#fdf0dc;color:#9a6212}
.tw-chip-partial{background:#eef1f4;color:#5a6b7b}
.tw-combo-head{margin:28px 0 4px}
.tw-combo-head h3{font-size:16px;font-weight:700;color:#0b2138;margin:0 0 4px}
.tw-combo-card{border-style:dashed}
.tw-combo-plus{color:#9aa7b4;font-weight:600;margin:0 2px}
.tw-combo-legs{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:12px;color:#41525f;margin:2px 0 10px}
.tw-combo-legs b{color:#0b2138;font-weight:600}
.tw-prelim-val{color:#9a6212;font-weight:700}

/* Three-section results layout + partial notes + not-applicable + combo summary */
.tw-sec-head{ align-items: baseline; justify-content: space-between;margin:30px 0 6px}
.tw-sec-head h3{font-size:17px;font-weight:700;color:#0b2138;margin:0 0 3px}
.tw-sec-head .tw-hint{margin:0}
.tw-empty-note{padding:14px 16px;border:1px dashed #cdd6df;border-radius:10px;color:#5a6b7b;font-size:13px;background:#fafbfc}
.tw-card-note{margin:10px 14px 0;padding:8px 10px;background:#fdf6ea;border-left:3px solid #e0a83a;border-radius:4px;font-size:11.5px;line-height:1.4;color:#7a5512}
.tw-na-list{flex-direction:column;background:#eef1f4;border-radius:10px}
.tw-na-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 16px;background:#fafbfc}
.tw-na-label{font-weight:600;color:#41525f;font-size:13px}
.tw-na-reason{color:#8a97a3;font-size:12px}
.tw-combo-summary{margin:22px 0 8px;border:1px solid #cfe6d8;border-radius:12px;overflow:hidden}
.tw-cs-h{background:#eef8f1;color:#1f7a4d;font-weight:700;font-size:13px;padding:10px 16px;border-bottom:1px solid #cfe6d8}
.tw-cs-boxes{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1px;background:#e4ece7}
.tw-cs-box{display:flex;flex-direction:column;gap:3px;padding:14px 16px;background:#fff}
.tw-cs-l{font-size:11px;letter-spacing:.02em;text-transform:uppercase;color:#7c8b97}
.tw-cs-v{font-size:19px;font-weight:700;color:#0b2138}
.tw-cs-sub{font-size:11px;color:#8a97a3}

/* Results: baseline left-rail + total-solutions right; sticky toolbar */
.tw-results-sticky .tw-results-head{margin:0}
.tw-sol-base{flex:0 0 340px;max-width:340px}
.tw-sol-total{flex:1 1 auto;min-width:0}
.tw-sol-total .tw-sec-head{margin-top:0}
.tw-sol-total .tw-cards{margin-top:12px}
@media(max-width:1100px){.tw-sol-top{flex-direction:column}.tw-sol-base{flex:none;max-width:none;width:100%}}

/* Client-facing combination legs (share / selected / PDF) */
.tw-cmp-legs{display:flex;align-items:stretch;gap:12px;flex-wrap:wrap}
.tw-cmp-leg{flex:1 1 220px;border:1px solid #d8e0e8;border-radius:10px;padding:12px 14px;background:#fafcff}
.tw-cmp-leg-role{font-size:10px;letter-spacing:.04em;text-transform:uppercase;color:#7c8b97;font-weight:700}
.tw-cmp-leg-name{font-size:14px;font-weight:700;color:#0b2138;margin:2px 0 8px}
.tw-cmp-leg-amt{font-size:18px;font-weight:700;color:#1f7a4d}
.tw-cmp-leg-amt span{display:block;font-size:10px;font-weight:600;color:#7c8b97;letter-spacing:.02em;text-transform:uppercase}
.tw-cmp-leg-plus{align-self:center;font-size:22px;font-weight:600;color:#9aa7b4}
.tw-cmp-prelim{color:#9a6212;font-weight:700}
@media(max-width:720px){.tw-cmp-leg-plus{display:none}}

/* Results header row + corner solution tags (v15) */
.tw-results-sticky{position:sticky;top:0;z-index:6;background:var(--card,#fff);border-bottom:1px solid var(--line,#e6eaee);margin-bottom:8px;padding:6px 0 10px}
.tw-results-sticky .tw-toolbar{margin:0}
.tw-sol-heads{display:flex;gap:18px;align-items:flex-start;margin-top:6px}
.tw-sol-heads .tw-sol-base,.tw-sol-heads .tw-sol-total{display:flex;align-items:flex-end}
.tw-sol-heads .tw-sec-head{margin:0}
.tw-sol-heads .tw-sec-head h3{margin:0 0 2px}
.tw-sol-top{display:flex;gap:18px;margin-top:10px;align-items:flex-start}
.tw-card-bar-base{justify-content:flex-end}

/* Corner tags sit on the card's top border (card switches to overflow:visible; the
   header and last child get matched radii so the rounded corners still read clean). */
.tw-result-card{position:relative;overflow:visible}
.tw-result-card>header{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}
.tw-result-card>:last-child{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius)}
.tw-card-tags{position:absolute;top:-11px;right:12px;display:flex;gap:6px;align-items:center;z-index:3}
.tw-soltag{font-size:9.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;background:#fff;border:1px solid var(--line);border-radius:5px;padding:3px 8px;color:#5a6b7b;box-shadow:0 1px 2px rgba(16,33,57,.08);white-space:nowrap;line-height:1.4}
.tw-soltag-multi{color:#1f7a4d;border-color:#bfe0cd;background:#f1faf4}

/* Two-line combo title */
.tw-combo-title{white-space:normal!important;line-height:1.32}
.tw-combo-title .tw-combo-plus{color:#9aa7b4;font-weight:700;margin-right:2px}

/* Align solution cards' top with the baseline card (header now lives in the heads row) */
.tw-sol-top .tw-sol-total .tw-cards{margin-top:0}
.tw-sol-top .tw-sol-base .tw-result-card{margin-top:0}

/* Two-column results: fixed baseline (left) + scrolling solutions (right), v16 */
.tw-sol-left{padding-right:20px}
.tw-sol-right{flex:1 1 auto;min-width:0;flex-direction:column;min-height:0}
.tw-sol-head{height:66px;display:flex;flex-direction:column;justify-content:center}
.tw-sol-head h3{margin:0;font-size:16px;font-weight:700;color:var(--navy)}
.tw-sol-head-left{flex-direction:row;align-items:center;justify-content:space-between;gap:10px}
.tw-sol-head-left .tw-cmp-btn{flex:0 0 auto;margin:0}
.tw-sol-sub{margin:3px 0 0;font-size:11.5px;color:var(--muted);line-height:1.35}
.tw-sol-scroll{overflow-y:auto;max-height:calc(100vh - 360px)}
.tw-sol-scroll .tw-sec-head:first-of-type{margin-top:26px}
.tw-sol-scroll .tw-results-foot{margin-top:18px}
@media(max-width:1100px){
  .tw-sol{flex-direction:column}
  .tw-sol-left{flex:none;max-width:none;width:100%;border-right:0;border-bottom:1px solid var(--line);padding-right:0;padding-bottom:14px;margin-bottom:8px}
  .tw-sol-right{padding-left:0}
  .tw-sol-scroll{max-height:none;overflow:visible}
}

/* Fix: give the scroll headroom so the cards' top pills aren't clipped; keep the
   baseline card aligned with the (now padded) solution cards. (v17) */
.tw-sol-scroll{padding-right:8px;padding-top:18px}
.tw-sol-left>.tw-result-card{margin-top:18px}
/* Standardize both corner pills on all-caps */
.tw-card-tags .tw-chip{margin-left:0;box-shadow:0 1px 2px rgba(16,33,57,.08);text-transform:uppercase;font-size:9.5px;letter-spacing:.04em;font-weight:700;padding:3px 8px}

/* ── Partner signup (v18) ─────────────────────────────────────────────── */
.tw-signup-inner{max-width:440px}
.tw-signup .tw-login-inner h1{font-size:26px;margin-top:8px}
.tw-login-field textarea{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:8px;font-size:15px;font-family:inherit;resize:vertical}
.tw-login-field textarea:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.15)}
.tw-grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
.tw-path-cards{display:flex;flex-direction:column;gap:12px;margin-top:6px}
.tw-path{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:4px;width:100%;padding:16px;border:1px solid var(--line);border-radius:12px;background:#fff;cursor:pointer;transition:border-color .12s,box-shadow .12s,transform .04s}
.tw-path:hover{border-color:var(--blue);box-shadow:0 4px 16px rgba(15,23,42,.06)}
.tw-path:active{transform:translateY(1px)}
.tw-path-h{font-size:16px;font-weight:800;color:var(--navy)}
.tw-path-d{font-size:12.5px;color:var(--muted);line-height:1.45}
.tw-path-go{font-size:12px;font-weight:700;color:var(--blue);margin-top:2px}
.tw-plan-toggle{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 0 18px}
.tw-plan-opt{position:relative;display:flex;flex-direction:column;gap:3px;padding:14px;border:1.5px solid var(--line);border-radius:12px;cursor:pointer;transition:border-color .12s,background .12s}
.tw-plan-opt.selected{border-color:var(--blue);background:rgba(37,99,235,.04)}
.tw-plan-opt input{position:absolute;opacity:0;pointer-events:none}
.tw-plan-name{font-size:13px;font-weight:800;color:var(--navy)}
.tw-plan-price{font-size:20px;font-weight:800;color:var(--navy);line-height:1}
.tw-plan-price small{font-size:12px;font-weight:600;color:var(--muted)}
.tw-plan-note{font-size:11px;color:var(--muted);line-height:1.4}
.tw-signup-back{display:inline-block;font-size:12px;font-weight:600;color:var(--muted);text-decoration:none;margin:0 0 14px}
.tw-signup-back:hover{color:var(--blue)}
.tw-signup-foot{font-size:13px;color:var(--muted);margin:18px 0 0}
.tw-signup-foot a{color:var(--blue);text-decoration:none}
.tw-signup-hint{font-size:12px;color:var(--muted);margin:14px 0 0}
.tw-signup-hint a{color:var(--blue);text-decoration:none}
@media (max-width:560px){.tw-grid2,.tw-plan-toggle{grid-template-columns:1fr}}
/* Billing: upgrade/downgrade notice + ghost action (v18) */
.tw-acc-notice{background:rgba(37,99,235,.06);border:1px solid rgba(37,99,235,.22);color:var(--navy);font-size:13px;border-radius:10px;padding:11px 14px;margin:0 0 16px}
.tw-acc-billing-actions{ margin-top: 14px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}

/* ── Under-review (pending advisor) screen (v19) ─────────────────────── */
.tw-pending-shell{min-height:100vh;display:flex;flex-direction:column;background:var(--bg,#f4f6f9)}
.tw-pending-top{display:flex;align-items:center;justify-content:space-between;padding:14px 26px;background:#fff;border-bottom:1px solid var(--line)}
.tw-pending-logo{height:34px;width:auto}
.tw-pending-main{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 20px}
.tw-pending-card{max-width:520px;width:100%;background:#fff;border:1px solid var(--line);border-radius:16px;padding:36px 34px;text-align:center;box-shadow:0 10px 40px rgba(15,23,42,.06)}
.tw-pending-badge{display:inline-block;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#1657c4;background:rgba(37,99,235,.10);border-radius:999px;padding:5px 13px;margin-bottom:16px}
.tw-pending-badge.rejected{color:#b42318;background:rgba(180,35,24,.10)}
.tw-pending-card h1{font-size:24px;font-weight:800;color:var(--navy);margin:0 0 10px}
.tw-pending-card p{font-size:14px;color:var(--muted);line-height:1.55;margin:0 0 24px}
.tw-btn-danger{ border-color: #c0392b;background:#b42318;color:#fff;border:0;border-radius:9px;padding:11px 18px;font-size:14px;font-weight:700;cursor:pointer}
.tw-btn-danger:hover{background:#9a1d14}
.tw-acct-danger{color:#b42318}
.tw-acct-danger:hover{background:rgba(180,35,24,.06)}
.tw-pending-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}

/* ── Deal preview + full-viewport record (HubSpot-style) ── */
.tw-deal-preview .tw-dd-grid { margin-top: 4px; }
.tw-deal-record { max-width: none; }
.tw-deal-record .tw-deal-detail { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }

/* ── Deal record tabs (Details / Documents & Access) ── */
.tw-dtabs button { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tw-dtabs button.on { color: var(--ink); border-bottom-color: var(--accent, #0b2138); }
.tw-dtabs button:hover { color: var(--ink); }
.tw-dtab-pane[hidden] { display: none; }

/* ── Selection flow: the active row visually docks to the preview ──
   Left rail = selection marker; right rail = docking edge facing the panel;
   the preview carries a matching receiving rail and slides in from the list
   side. The paired rails read across the gutter at any scroll position —
   a literal funnel shape was rejected: the row's Y position moves with list
   scroll while the preview is top-anchored, so a drawn connector misaligns
   and gets clipped by the list's scroll container. */
.tw-deal-row.active {
  border-color: var(--accent, #1f4e79);
  box-shadow: inset 3px 0 0 var(--accent, #1f4e79), inset -3px 0 0 var(--accent, #1f4e79);
  background: linear-gradient(90deg, rgba(31, 78, 121, .04), rgba(31, 78, 121, .10));
}
.tw-deal-detailcol .tw-deal-preview {
  border-left: 3px solid var(--accent, #1f4e79);
  animation: tw-flow-in .18s ease-out;
}
@keyframes tw-flow-in {
  from { opacity: .35; transform: translateX(-10px); }
  to   { opacity: 1;  transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tw-deal-detailcol .tw-deal-preview { animation: none; }
}

/* ── Dashboard triage: alert bar + Notifications / Activity ── */
.tw-alertbar { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.tw-alert { display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-radius: var(--radius); font-size: 13.5px; font-weight: 600; border: 1px solid; }
.tw-alert-red { background: #fdecec; border-color: #f2b8b5; color: #8c1d18; }
.tw-alert-amber { background: #fdf4e3; border-color: #ecd39a; color: #7a5410; }
.tw-alert-txt { flex: 1; }
.tw-alert-act { font-weight: 700; color: inherit; text-decoration: underline; white-space: nowrap; }
.tw-triage { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 18px; }
@media (max-width: 1000px) { .tw-triage { grid-template-columns: 1fr; } }
.tw-tri-badge { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #c0392b; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.tw-tri-row:hover .tw-tri-title { text-decoration: underline; }
.tw-tri-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; margin-top: 6px; flex: 0 0 auto; }
.tw-tri-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tw-tri-row.unread .tw-tri-title { font-weight: 700; }
.tw-tri-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-tri-time { font-size: 11.5px; color: var(--muted); white-space: nowrap; margin-top: 2px; }

/* ── Compact hero rollups + navy triage cards ── */
.tw-hero-sm { margin: 0 0 12px; padding: 12px 22px; border-radius: 14px; }
.tw-hero-sm .tw-hero-go { top: 50%; transform: translateY(-50%); }
.tw-hero .tw-hero-go { top: 50%; transform: translateY(-50%); }

/* Notifications / Activity: navy TITLE band only; body stays a light card
   matching every other section. */
.tw-tri-card { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; color: inherit; padding: 0; overflow: hidden; }
.tw-tri-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; background: var(--navy); color: #fff; padding: 12px 22px; margin: 0; border-radius: 0; }
/* Title typography matches the rollup-bar label treatment (.tw-hero-vlabel):
   light-blue accent, weight 650, sized to the hero-sm label (34px x .618). */
.tw-tri-head h2 { margin: 0; color: #fff; font-size: 21px; font-weight: 650; letter-spacing: .01em; line-height: 1.1; }
.tw-tri-head .tw-dr-all { margin-left: auto; color: #9fb3d6; }
.tw-tri-head .tw-dr-all:hover { color: #fff; }
.tw-tri-list { display: flex; flex-direction: column; padding: 2px 16px 8px; max-height: 158px; overflow-y: auto; }
.tw-tri-row { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; background: none; border: 0; padding: 7px 2px; cursor: pointer; font: inherit; color: inherit; border-top: 1px solid var(--line); }
.tw-tri-row:first-child { border-top: 0; }
.tw-tri-title { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.tw-tri-sub, .tw-tri-time { color: var(--muted); }
.tw-tri-row.unread .tw-tri-dot { background: var(--accent, #1f4e79); }
.tw-tri-card .tw-dr-empty { color: var(--muted); padding: 12px 0; }

/* Hero numerals: big number, golden-ratio accent label on the same line */
.tw-hero-v { font-weight: 800; line-height: 1.05; margin: 0; white-space: nowrap; font-size: 34px; }
.tw-hero-vlabel { font-size: .618em; font-weight: 650; color: #9fb3d6; margin-left: 10px; letter-spacing: .01em; }

/* ── Notification drawer (HubSpot-style slide-over) ── */
.tw-notif-scrim { position: fixed; inset: 0; background: rgba(10,18,34,0); transition: background .2s ease; z-index: 70; }
.tw-notif-scrim.on { background: rgba(10,18,34,.34); }
.tw-notif-pop.tw-notif-drawer { position: fixed; top: 0; right: 0; bottom: 0; height: 100vh; width: 484px; max-width: 94vw;
  border-radius: 0; border: none; border-left: 1px solid var(--line); box-shadow: -18px 0 44px rgba(16,28,54,.22);
  transform: translateX(100%); transition: transform .22s ease; z-index: 71; display: flex; flex-direction: column; }
.tw-notif-pop.tw-notif-drawer.open { transform: translateX(0); }
.tw-notif-drawer .tw-notif-head { background: var(--navy); color: #fff; padding: 14px 18px; }
.tw-notif-drawer .tw-notif-head > span { color: #fff; font-size: 18px; font-weight: 650; }
.tw-notif-drawer .tw-notif-read { color: #9fb3d6; }
.tw-notif-drawer .tw-notif-read:hover { color: #fff; }
.tw-notif-drawer .tw-notif-list { flex: 1; overflow-y: auto; max-height: none; }
.tw-notif-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tw-notif-btnrow { display: flex; align-items: center; gap: 6px; }
.tw-notif-open { appearance: none; border: 1px solid var(--accent, #1f4e79); color: var(--accent, #1f4e79); background: none;
  border-radius: 7px; padding: 3px 9px; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tw-notif-open:hover { background: var(--accent, #1f4e79); color: #fff; }
@media (prefers-reduced-motion: reduce) { .tw-notif-pop.tw-notif-drawer, .tw-notif-scrim { transition: none; } }

/* Dashboard tables: same white card treatment as the triage boxes */
.tw-dash .tw-sec-table { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.tw-dash .tw-sec-table .tw-dr-table tbody tr:last-child td { border-bottom: 0; }
.tw-dash .tw-sec-table .tw-dr-empty { padding: 14px 16px; }
.tw-dash .tw-sec-table .tw-sec-subhead { padding: 10px 16px 0; }

/* Drawer: multi-select + bulk actions */
.tw-notif-bulk { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #f4f7fb; font-size: 12.5px; }
.tw-notif-bulk .cnt { font-weight: 700; color: var(--ink); margin-right: 2px; }
.tw-notif-bulkbtn { appearance: none; border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--ink); cursor: pointer; }
.tw-notif-bulkbtn:hover { border-color: var(--accent, #1f4e79); color: var(--accent, #1f4e79); }
.tw-notif-bulkbtn.danger:hover { border-color: #c62828; color: #c62828; }
.tw-notif-bulk .clr { margin-left: auto; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 12px; }

/* Drawer rows: whole row selects (action button navigates) */
.tw-notif-row { align-items: center; gap: 4px; border-bottom: 1px solid var(--line); padding-right: 8px; cursor: pointer; }
.tw-notif-row.sel { background: rgba(31,78,121,.09); box-shadow: inset 3px 0 0 var(--accent, #1f4e79); }

/* Deals: freeze header/stats/controls — only the deal rows scroll; the preview
   column already scrolls independently alongside. */
@media (min-width: 1000px) {
  .tw-deals .tw-deal-listcol { max-height: calc(100vh - 330px); overflow-y: auto; padding-right: 4px; }
}

/* ── Dashboard duo: Deals + Pipeline side by side (light cards, small headers) ── */
.tw-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.tw-duo .tw-sec-table { flex: 1 1 auto; display: flex; flex-direction: column; }
.tw-duo .tw-sec-table > .tw-dr-empty { flex: 1; display: flex; align-items: center; justify-content: center; }
@media (max-width: 1000px) { .tw-duo { grid-template-columns: 1fr; } }
.tw-duo .tw-dash-section { display: flex; flex-direction: column; margin: 0; min-width: 0; }
.tw-pipebar.tw-sec-table { padding: 10px 16px; }

/* ── Calculator: income row widths + single-line labels ── */
.tw-income-row { display: flex; flex-wrap: wrap; gap: 12px; }
.tw-income-row > * { flex: 0 0 200px; min-width: 0; }
.tw-income-row label { white-space: nowrap; }
.tw-pt-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.tw-pt-row .tw-pt-type { flex: 0 0 200px; }
.tw-pt-fields { display: flex; gap: 12px; }
.tw-pt-fields > * { flex: 0 0 200px; min-width: 0; }

/* ── Strategies results: baseline parity, inline explainers, group delineation ── */
/* Explainers ride inside the h3 (span), so no cascade fight is possible. */
.tw-sol-sub-inline { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 8px; }
.tw-sol-head-right .tw-sol-sub { display: none; }
/* Header rows: equal height, vertically centered -> "Without Planning" and
   "Total Tax Mitigation" sit middle-aligned; card tops line up beneath them. */
.tw-sol-head, .tw-sol-head-right { min-height: 48px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.tw-sol-head h3, .tw-sol-head-right h3 { margin: 0; }
.tw-sol-head-right { border-bottom: 2px solid #b9c4d6; padding-bottom: 6px; justify-content: flex-start; text-align: left; }
.tw-sol-head-right h3 { text-align: left; }
/* Right cards carry an 18px grid offset (tags row) — mirror it on Baseline so
   the card tops align exactly. */
/* Baseline column: same card width as the strategy grid's minimum column. */
/* Partial group: same breathing room under its label as under Total. */
.tw-sol-group-sep { margin-top: 22px; padding-top: 14px; border-top: 2px solid #b9c4d6; margin-bottom: 14px; }

/* ── Version menu: subtle link actions under the dropdown ── */
.tw-ver-actions { border-top: 1px solid var(--line); margin-top: 6px; padding: 8px 12px 7px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.tw-linklike { background: none; border: 0; padding: 0; color: var(--accent, #1f4e79); font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left; }
.tw-linklike:hover { text-decoration: underline; }
.tw-linklike.danger { color: #c62828; }

/* Build tag (bottom of dashboard) */
.tw-buildtag { margin-top: 22px; font-size: 11px; color: var(--muted); text-align: right; }

/* ── Proposal model ── */
.tw-tab-badge { display: inline-block; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #c0392b; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; vertical-align: 1px; }
.tw-multi-h { margin: 26px 0 10px; font-size: 20px; }
.tw-cmp-baseline { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.tw-cmp-baseline h2 { margin: 0 0 8px; font-size: 15px; }
.tw-cmp-baseline-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 18px; }
.tw-cmp-baseline-rows > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; border-bottom: 1px dashed var(--line); padding: 4px 0; }

/* Nav version + email template modal */
.tw-side-logo { flex-direction: column; }
.tw-side-ver { display: block; font-size: 10.5px; color: #9fb3d6; margin-top: 4px; letter-spacing: .04em; text-align: left; }
.tw-modal-foot .tw-linklike { margin-right: auto; }

.tw-share-sep { height: 26px; border-top: 2px solid var(--line, #d9e0ea); margin: 26px 0 0; }

/* Share: multi-proposal summary table */
.tw-share-sumtbl { margin: 0 0 22px; overflow-x: auto; }
.tw-share-sumtbl th { background: var(--navy, #101F3C); color: #fff; text-align: right; padding: 9px 12px; font-weight: 650; }
.tw-share-sumtbl th:first-child { text-align: left; }
.tw-share-sumtbl td { padding: 8px 12px; border-bottom: 1px solid var(--line, #d9e0ea); text-align: right; }
.tw-share-sumtbl td:first-child { text-align: left; font-weight: 600; }

/* Strategies: ALL cards one fixed width (page-fit), no stretching */
.tw-sol-scroll .tw-cards {margin-top:0; grid-template-columns: repeat(auto-fill, 352px) !important; justify-content: flex-start; }

/* Share summary table: equal strategy columns */
.tw-share-sumtbl table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.tw-share-sumtbl th:first-child, .tw-share-sumtbl td:first-child { width: 220px; }

/* Full-width section title bars in the proposal flow */
.tw-cmp-secbar { padding: 14px 28px; border-radius: 0; font-weight: 700; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 12px; color: #fff; line-height: 1.2; }
.tw-cmp-secbar-red { background: #b3261e; }

/* Proposal flow: aligned insets + even vertical rhythm */
.tw-sel-card .tw-cmp-client, .tw-share-cmp .tw-cmp-client { margin: 0 28px; padding: 10px 16px; border: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 8px; gap: 6px 40px; }
.tw-cmp-descrow { margin-top: 8px !important; }
.tw-sel-card .tw-cmp-secbar, .tw-share-cmp .tw-cmp-secbar { margin: 16px 0 12px; }
.tw-sel-card .tw-cmp + .tw-cmp, .tw-share-cmp .tw-cmp + .tw-cmp { margin-top: 28px; }
.tw-sel-card .tw-cmp-band, .tw-share-cmp .tw-cmp-band { margin-top: 14px; }
.tw-cmpd-d.down { color: #b3261e; }

/* Analysis Email Templates settings view */
.tw-tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 1100px; }
@media (max-width: 1000px) { .tw-tpl-grid { grid-template-columns: 1fr; } }
.tw-tpl-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.tw-tpl-card h3 { margin: 0 0 4px; font-size: 14.5px; }

.tw-tpl-group { font-size: 16px; margin: 20px 0 8px; }

/* Proposal action icon buttons (wireframe, tooltip via title) */
.tw-iconbtn { appearance: none; background: none; border: 1.5px solid var(--navy, #101F3C); color: var(--navy, #101F3C); border-radius: 9px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; margin-left: 8px; transition: background .12s ease, color .12s ease; }
.tw-iconbtn:hover { background: var(--navy, #101F3C); color: #fff; }

.tw-settings-tabs { display: flex; gap: 8px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }

/* Income tab: every field one uniform 200px column; first three columns align
   vertically with the Passthrough row beneath. */
.tw-income-row > *, .tw-pt-row .tw-pt-type, .tw-pt-fields > * { flex: 0 0 200px !important; width: 200px; max-width: 200px; min-width: 0; box-sizing: border-box; }
.tw-income-row, .tw-pt-row, .tw-pt-fields { gap: 12px !important; }
.tw-income-row label > span, .tw-income-row .tw-field > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Analysis Email Templates: frozen headers, scrolling cards, two columns */
.tw-tpl-colshead { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: center; max-width: 1100px; margin: 14px 0 10px; position: relative; }
.tw-tpl-colshead .tw-tpl-save { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.tw-tpl-colshead .tw-tpl-group { margin: 0; }
.tw-tpl-scroll { max-height: calc(100vh - 340px); overflow-y: auto; max-width: 1100px; padding-right: 6px; }
.tw-tpl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .tw-tpl-cols, .tw-tpl-colshead { grid-template-columns: 1fr; } .tw-tpl-scroll { max-height: none; } }
.tw-tpl-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tw-tpl-src { display: block; margin-top: 8px; line-height: 1.5; }
.tw-tpl-revert { display: block; margin-top: 4px; }

.tw-viewer.tw-noscroll, #viewer.tw-noscroll { overflow: hidden !important; }

/* Deal record: analysis picker + doc folders + chips */
.tw-modal-xl { width: 760px; max-width: 94vw; }
.tw-ap-list { max-height: 52vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.tw-ap-folder { font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 0 4px; }
.tw-ap-row { display: flex; align-items: center; gap: 10px; padding: 6px 2px; cursor: pointer; border-bottom: 1px solid var(--line); }
.tw-ap-row:last-child { border-bottom: 0; }
.tw-ap-name { font-weight: 600; }
.tw-anl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tw-chip-x { background: none; border: 0; cursor: pointer; color: inherit; font-weight: 700; }
.tw-doc-folder { border-bottom: 1px solid var(--line); }

/* Deal details: two columns — details scroll left, notes rail right */
.tw-deal-detail { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; max-width: none !important; width: 100%; }
.tw-ddcol-main { min-width: 0; max-height: calc(100vh - 320px); overflow-y: auto; padding-right: 4px; }
.tw-ddcol-notes .tw-notes-scroll { flex: 1; overflow-y: auto; max-height: none; }
.tw-anl-table td, .tw-anl-table th { font-size: 12.5px; }
.tw-dropzone { border: 2px dashed var(--line); border-radius: 10px; padding: 16px; text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0 14px; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.tw-dropzone.on { border-color: var(--accent, #1f4e79); background: rgba(31,78,121,.05); }

/* Inline-edit facts */
.tw-fact .tw-inl { width: 100%; max-width: 200px; padding: 4px 8px; font-size: 13px; }
.tw-inl-actions { display: flex; gap: 8px; margin: 10px 0 4px; }

/* Deal record header meta (created / updated / last activity) + clients table */
.tw-dd-meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.tw-clients-table td { vertical-align: middle; }
.tw-cl-actions { white-space: nowrap; width: 1%; }

/* Analysis sub-tabs (Income / Capital Gains / Strategies) + active analysis row */
.tw-subtabs { border-bottom: 1px solid var(--line); }
.tw-subtabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tw-subtabs button.on { color: var(--ink, #10233f); border-bottom-color: var(--accent, #1f4e79); }
.tw-stab-pane { padding: 4px 0 8px; }
.tw-anl-table tr.on td { background: rgba(31, 78, 121, .06); }
.tw-anl-table input[type=radio] { cursor: pointer; }

/* Deal-embedded analysis editor: hide the tool's own tabs + step nav; keep the
   version toolbar (it lives inside the tab strip). Deal tabs drive the editor. */
.tw-anl-embed .tw-maintabs .tw-maintab { display: none; }
.tw-anl-embed .tw-maintabs { border-bottom: 0; padding: 0; margin: 0 0 6px; justify-content: flex-end; }
.tw-anl-embed .tw-analysis { margin: 0; }
.tw-anl-embed .tw-step-card { box-shadow: none; border: 1px solid var(--line); }
.tw-emb-slot { min-height: 40px; }

/* Notes drawer (Analysis + Proposal tabs): main column takes the full width;
   the same notes node becomes a fixed slide-out opened by a right-edge pill. */
.tw-dd-cols.tw-notes-collapsed { grid-template-columns: minmax(0, 1fr); }
.tw-ddcol-notes { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; max-height: calc(100vh - 320px); position: relative; }
.tw-notes-close { display: none; position: absolute; top: 8px; right: 12px; background: none; border: 0; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.tw-ddcol-notes.tw-notes-drawer { position: fixed; top: 84px; right: 0; bottom: 16px; width: 400px; max-width: 92vw; max-height: none; background: #fff; z-index: 60; box-shadow: -14px 0 36px rgba(16, 35, 63, .18); border-radius: 12px 0 0 12px; transform: translateX(105%); transition: transform .22s ease; }
.tw-ddcol-notes.tw-notes-drawer.open { transform: translateX(0); }
.tw-ddcol-notes.tw-notes-drawer .tw-notes-close { display: block; }
.tw-notes-pill { position: fixed; right: 0; top: 42%; z-index: 59; writing-mode: vertical-rl; padding: 14px 9px; background: var(--navy, #10233f); color: #fff; border: 0; border-radius: 10px 0 0 10px; cursor: pointer; font-weight: 600; font-size: 13px; letter-spacing: .6px; box-shadow: -4px 2px 12px rgba(16, 35, 63, .22); }
.tw-notes-pill.on, .tw-notes-pill:hover { background: #1f4e79; }

/* Embedded client tax profile strip (top of the Income sub-tab) */
.tw-emb-client { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; background: #fafbfc; }
.tw-emb-client > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.tw-emb-client-body { padding-top: 10px; }

/* Analysis sub-tab row: version toolbar + save status share the row; tighter
   vertical rhythm so the editor starts as high as possible. */
.tw-subtabs-ver { margin-left: auto; display: flex; align-items: center; gap: 12px; padding-bottom: 4px; }
.tw-subtabs-ver .tw-year-pick { margin: 0; }
.tw-subtabs-ver .tw-save-status { font-size: 12.5px; }
.tw-deal-record-bar { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; margin-bottom: 6px; }
.tw-dtab-pane[data-pane="analysis"] .tw-dd-block { margin-top: 8px; }
.tw-dtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 8px 0 10px; }
/* Clients table dropdowns: Title narrow, Marital compact */
.tw-clients-table select { width: 100%; }
.tw-clients-table [data-f="salutation"], .tw-clients-table [data-nf="salutation"] { max-width: 110px; }
.tw-clients-table [data-f="marital_status"], .tw-clients-table [data-nf="marital_status"] { max-width: 150px; }
.tw-clients-table td:first-child { width: 118px; }

/* Clients table: labels sit flush over their inputs */
.tw-clients-table th { text-align: left; }

/* Embedded step nav lives on the sub-tab row (deal-driven pair); the editor's
   own in-pane Back/Next stays hidden. */
.tw-anl-embed .tw-step-nav { display: none; }
.tw-subtab-nav { display: flex; align-items: center; gap: 8px; margin-left: 16px; padding-bottom: 4px; }
/* Back and Next are identical: outlined always; blue fill when enabled,
   grey fill when disabled. Overrides both ghost/primary variants in scope. */
.tw-subtab-nav .tw-btn,
.tw-subtab-nav .tw-btn-ghost,
.tw-subtab-nav .tw-btn-primary { padding: 4px 14px; font-size: 12.5px; border-radius: 8px; font-weight: 600; }
.tw-subtab-nav .tw-btn:not(:disabled) { background: var(--blue, #2563eb); border: 1px solid #1e4fd6; color: #fff; cursor: pointer; }
.tw-subtab-nav .tw-btn:not(:disabled):hover { filter: brightness(1.07); }
.tw-subtab-nav .tw-btn:disabled { background: #e3e8ef; border: 1px solid #c3ccd8; color: #8a97a8; cursor: default; opacity: 1; }

/* Strategies view: vertical divider between Baseline and the solutions area;
   Not-applicable list capped at two card widths (2x352 + 18 gap). */
.tw-na-list {display:flex;gap:1px;overflow:hidden; max-width: 722px; }
.tw-na-list .tw-na-row { display: flex; justify-content: space-between; gap: 24px; }

/* Strategies view — parity + insurance (v3.1.49):
   Right cards sit under scroll padding (18) + tags offset (18); mirror 36 on
   the baseline so the card tops are level. Right header underline enforced at
   the stylesheet level too, in case the inline border is ever lost. Section
   headers (Not applicable / Partial…) get the same underline treatment. */
.tw-sol-right > .tw-sol-head-right { border-bottom: 2px solid #b9c4d6 !important; width: 100%; box-sizing: border-box; }
.tw-sol-scroll .tw-sec-head { border-bottom: 2px solid #b9c4d6; padding-bottom: 8px; margin-bottom: 14px; }
.tw-sol-scroll .tw-sec-head h3 { margin: 0; }

/* Baseline column geometry lock (v3.1.52): column, header underline, and card
   are all EXACTLY 352px border-box — no rule anywhere can widen or narrow any
   one of the three independently. */
.tw-sol-left .tw-sol-head-left { width: 352px !important; max-width: 352px !important; box-sizing: border-box !important; }
.tw-sol-left .tw-result-card { margin-top: 36px; width: 352px !important; max-width: 352px !important; min-width: 0 !important; margin-left: 0 !important; margin-right: 0 !important; box-sizing: border-box !important; }

/* Divider gutter symmetry (v3.1.55): 18px baseline->line = 18px line->first
   strategy card. Flex gap zeroed so the margin is the ONLY left-side spacing. */
.tw-sol {align-items:stretch;margin-top:6px; display: flex; gap: 0 !important; }
.tw-sol-right {display:flex; border-left: 1px solid #d5dce6; padding-left: 18px !important; }

/* Kill the legacy divider (v3.1.56): the ORIGINAL .tw-sol-left carried its own
   border-right (css:1182) — that was the thin second line hugging the Baseline
   box. The single separator is .tw-sol-right's border-left. */

/* THE ROOT CAUSE (v3.1.60): .tw-sol-left was block-flow while .tw-sol-right is
   flex. In block flow the header's 8px margin-bottom COLLAPSES into the card's
   margin-top (max, not sum) — the right side sums them. Flex columns never
   collapse margins, so both sides now compute identically and the measured
   parity applies linearly. LANDMINE: margin collapsing only exists in block
   flow — mixed block/flex siblings will never space identically. */
.tw-sol-left { flex: 0 0 352px !important; width: 352px !important; max-width: 352px !important; padding: 0 !important; box-sizing: border-box !important; margin-right: 18px !important; border-right: 0 !important; display: flex !important; flex-direction: column !important; align-items: stretch !important; }

/* v3.1.61 — sub-tab row band, deals accordion, preview polish, details bands,
   consistent notes drawer, clients table with phone. */
.tw-subtabs { display: flex; gap: 2px; margin-bottom: 12px; align-items: center; background: #f4f6f9; border: 1px solid var(--line); border-radius: 10px 10px 0 0; padding: 4px 12px 0; }

.tw-deals .tw-deal-split { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(420px, 560px); }
.tw-acc { margin-bottom: 10px; }
.tw-acc-head { width: 100%; display: flex; align-items: center; gap: 10px; background: #f4f6f9; border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; cursor: pointer; font: inherit; }
.tw-acc-chev { width: 14px; color: var(--muted); }
.tw-acc-sum { margin-left: auto; font-weight: 700; color: var(--navy, #10233f); font-size: 13px; }
.tw-acc-body { padding: 8px 0 2px; }

.tw-dd-band { background: #f6f8fb; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.tw-dd-band .tw-dd-grid { margin: 0; }
.tw-dd-grid4 { display: grid; grid-template-columns: repeat(4, minmax(150px, 230px)); gap: 20px; }
.tw-clients-band { background: #f6f8fb; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.tw-clients-band .tw-anl-table thead th { background: transparent; }
.tw-clients-table [data-f="first_name"], .tw-clients-table [data-nf="first_name"],
.tw-clients-table [data-f="last_name"], .tw-clients-table [data-nf="last_name"] { max-width: 140px; }
.tw-clients-table [data-f="phone"], .tw-clients-table [data-nf="phone"] { max-width: 150px; }

/* Standalone notes drawer (preview + record) */
#twNotesDrawer { padding: 16px 16px 12px; overflow: auto; }
.tw-nd-compose { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 12px; }
.tw-nd-compose textarea { flex: 1; }
.tw-nd-list .tw-note { border-top: 1px solid var(--line); padding: 10px 0; }
.tw-nd-list .tw-note-meta { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.tw-nd-list .tw-note-body { font-size: 13.5px; white-space: pre-wrap; }

/* v3.1.62: stats strip spans the full viewer width; controls live inside the
   list column (right edge = accordion right edge); count bubbles align left
   of the stage pills at a fixed width. */
.tw-deals .tw-deal-strip { gap: 18px; max-width: none; }
.tw-deal-split .tw-deal-controls { margin: 0 0 4px; grid-column: 1; }
.tw-acc-ctl { margin-left: auto; display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.tw-acc-count { background: var(--navy, #10233f); color: #fff; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 700; min-width: 34px; text-align: center; }

/* v3.1.63: clients table fills its row (fixed layout, colgroup-driven);
   documents get folders, a toolbar, and inline descriptions. */
.tw-clients-table { table-layout: fixed; width: 100%; }
.tw-clients-table .tw-inl { min-width: 110px; padding: 5px 8px; max-width: none !important; width: 100%; }
.tw-doc-toolbar { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; flex-wrap: wrap; }
.tw-doc-toolbar #docUpFolder { max-width: 220px; }
.tw-doc-folder { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; padding-bottom: 4px; font-weight: 700; color: var(--navy, #10233f); margin: 12px 0 4px; }
.tw-doc-row .tw-doc-desc { margin: 4px 0; max-width: 520px; font-size: 12.5px; padding: 4px 8px; }
.tw-doc-move { max-width: 170px; }

/* v3.1.64: controls occupy split row 1 (list column only); preview top-aligns
   with the first accordion by grid construction. One control row, no wrap:
   search | Expand/Collapse | filters, right edge flush with the accordions. */
.tw-deal-headspacer { grid-column: 2; }
.tw-deal-controls-row { grid-column: 1; display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; }
.tw-deal-filtergroup { align-items: center; gap: 4px; flex-wrap: nowrap; margin-left: 0; }

/* v3.1.65: whole control group right-aligned to the accordion edge; search 40% wider. */
.tw-deal-controls-row .tw-acc-ctl { margin-left: auto !important; }
.tw-deal-controls-row .tw-deal-search { width: auto; min-width: 160px; max-width: 480px; flex: 1 1 480px; }

/* v3.1.66: right-alignment enforced structurally — the legacy .tw-list-controls
   layout was overriding margins/flex on the moved row. Flex forced, fixed-width
   search, and a PHYSICAL spacer pushes Expand/Collapse + filters to the right
   edge regardless of inherited rules. */
.tw-deal-split .tw-deal-controls, .tw-deal-split .tw-list-controls { display: block !important; }
.tw-deal-split .tw-deal-controls-row { display: flex !important; align-items: center !important; gap: 12px !important; width: 100%; flex-wrap: nowrap !important; }
.tw-deal-split .tw-deal-search { flex: 0 0 480px !important; width: 480px !important; max-width: 480px !important; min-width: 0 !important; }
.tw-flexspacer { flex: 1 1 auto; }
.tw-deal-split .tw-acc-ctl, .tw-deal-split .tw-deal-filtergroup { flex: 0 0 auto !important; margin-left: 0 !important; }

/* v3.1.68: Expand/Collapse on their own row under the search box. */
.tw-acc-ctl-row { margin: 10px 0 2px; display: flex; gap: 16px; }

/* v3.1.69: breathing room between client input cells — a 14px right gutter on
   every cell (inputs stay 100% of the remaining cell width). */
.tw-clients-table th, .tw-clients-table td { padding-right: 14px; }
.tw-clients-table th:last-child, .tw-clients-table td:last-child { padding-right: 0; }

/* v3.1.78: reworked Client Workspace pane — link header, account rows,
   structured create row, collapsed legacy links. */
.tw-ws-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.tw-ws-link { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tw-ws-link code { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px; font-size: 12.5px; color: var(--navy, #10233f); }
.tw-ws-row:first-child { border-top: 0; }
.tw-ws-create { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.tw-ws-create #wsContact { max-width: 210px; }
.tw-ws-create #wsEmail { max-width: 230px; }
.tw-ws-passwrap { display: flex; gap: 6px; align-items: center; }
.tw-ws-passwrap #wsPass { max-width: 210px; }
.tw-ws-legacy { margin-top: 4px; }
.tw-ws-legacy summary { cursor: pointer; }

/* v3.1.80: workspace entity layout — top actions outside the band, stat
   boxes, full-width member rows with wireframe icon actions, activity table,
   root create view. */
.tw-ws-root { padding: 8px 0 20px; }
.tw-ws-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.tw-ws-title { font-weight: 700; font-size: 16px; color: var(--navy, #10233f); display: flex; align-items: center; gap: 10px; }
.tw-ws-topactions { display: flex; gap: 8px; align-items: center; }
.tw-ws-stats { display: grid; grid-template-columns: repeat(3, minmax(140px, 1fr)); gap: 14px; margin-bottom: 14px; }
.tw-ws-stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-weight: 600; color: var(--navy, #10233f); }
.tw-ws-stat .tw-dd-label { margin-bottom: 2px; }
.tw-ws-band { margin-bottom: 14px; width: 100%; }
.tw-ws-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); width: 100%; }
.tw-icobtn { background: #fff; border: 1px solid var(--line); border-radius: 8px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--navy, #10233f); }
.tw-icobtn:hover { border-color: var(--navy, #10233f); }
.tw-icobtn-danger { color: #b91c1c; }
.tw-icobtn-danger:hover { border-color: #b91c1c; }
.tw-icobtn:disabled { opacity: .45; cursor: default; }
.tw-ws-acttable { width: 100%; margin-top: 6px; }
.tw-ws-acttable td, .tw-ws-acttable th { padding: 6px 12px 6px 0; font-size: 13px; }

/* v3.1.81: activity table banded like the other sections; headers left. */
.tw-ws-actband { margin-top: 14px; }
.tw-ws-acttable th, .tw-ws-acttable td { text-align: left !important; }
.tw-ws-acttable thead th { background: transparent; }

/* v3.1.82: tinted stat boxes; white section bands; users as a formatted
   table with a right-aligned icon-action column; add-client via modal link. */
.tw-ws-stat-login { background: #eef4ff; border-color: #dbe6ff; }
.tw-ws-stat-login .tw-dd-label { color: #1d4ed8; }
.tw-ws-stat-upd { background: #fff7ed; border-color: #fde8cd; }
.tw-ws-stat-upd .tw-dd-label { color: #b45309; }
.tw-ws-stat-created { background: #ecfdf5; border-color: #d1fae5; }
.tw-ws-stat-created .tw-dd-label { color: #047857; }
.tw-ws-band, .tw-ws-actband { background: #fff !important; }
.tw-ws-usertable { width: 100%; margin-top: 4px; }
.tw-ws-usertable th, .tw-ws-usertable td { text-align: left; padding: 8px 14px 8px 0; vertical-align: middle; }
.tw-ws-usertable thead th, .tw-ws-actband .tw-ws-acttable thead th { background: #f6f8fb; padding: 7px 14px 7px 10px; }
.tw-ws-usertable tbody td:first-child, .tw-ws-acttable tbody td:first-child { padding-left: 10px; }
.tw-ws-usertable thead th:first-child, .tw-ws-acttable thead th:first-child { border-radius: 7px 0 0 7px; }
.tw-ws-usertable thead th:last-child, .tw-ws-acttable thead th:last-child { border-radius: 0 7px 7px 0; }
.tw-ws-usertable tbody tr { border-bottom: 1px solid var(--line); }
.tw-ws-acts { text-align: right !important; white-space: nowrap; width: 132px; }
.tw-ws-acts .tw-icobtn { margin-left: 6px; }

/* v3.1.83: WordPress-style password meter in the add-client modal. */
.tw-pass-meter { margin-top: 6px; font-size: 12.5px; font-weight: 700; border-radius: 6px; padding: 4px 10px; display: inline-block; }
.tw-pass-meter.s0 { background: #fee2e2; color: #991b1b; }
.tw-pass-meter.s1 { background: #fee2e2; color: #991b1b; }
.tw-pass-meter.s2 { background: #fff7ed; color: #b45309; }
.tw-pass-meter.s3 { background: #ecfdf5; color: #047857; }

/* v3.1.84: Version tab analyses table matches the standard table styling. */
.tw-ver-table { width: 100%; margin-top: 4px; }
.tw-ver-table th, .tw-ver-table td { text-align: left !important; padding: 8px 14px 8px 0; vertical-align: middle; }
.tw-ver-table thead th { background: #f6f8fb; padding: 7px 14px 7px 10px; }
.tw-ver-table thead th:first-child { border-radius: 7px 0 0 7px; }
.tw-ver-table thead th:last-child { border-radius: 0 7px 7px 0; }
.tw-ver-table tbody td:first-child, .tw-ver-table thead th:first-child { padding-left: 10px; }
.tw-ver-table tbody tr { border-bottom: 1px solid var(--line); }
.tw-ver-table tbody tr:last-child { border-bottom: 0; }

/* v3.1.89: documents move out of the tab strip into a persistent right rail
   under the tab row — folder viewer with Adviser / User classifications and
   a Requests section. */
.tw-ddcol-docs { background: #fff; border: 1px solid rgba(16, 35, 63, .07); border-radius: 16px; padding: 16px 16px 14px; align-self: start; position: sticky; top: 86px; max-height: calc(100vh - 110px); overflow: auto; box-shadow: 0 1px 2px rgba(16,35,63,.05), 0 10px 28px -14px rgba(16,35,63,.2); }
.tw-doc-class { font-weight: 800; font-size: 13.5px; color: var(--navy, #10233f); letter-spacing: -.01em; margin: 2px 0 6px; }
.tw-ddcol-docs .tw-doc-toolbar { gap: 8px; }
.tw-ddcol-docs .tw-doc-toolbar .tw-muted-sm { display: none; }
.tw-ddcol-docs .tw-doc-desc { max-width: none; }
.tw-doc-req { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.tw-doc-req:first-child { border-top: 0; }
@media (max-width: 1200px) { .tw-dd-cols { grid-template-columns: 1fr !important; } .tw-ddcol-docs { position: static; max-height: none; } }

/* v3.1.90: docs rail reverted — Documents back as a tab; requested-documents
   is a checklist. */
.tw-doc-req.done .tw-doc-req-name { text-decoration: line-through; color: var(--muted); }
.tw-doc-req input[type="checkbox"] { width: 16px; height: 16px; accent-color: #2563eb; }

/* v3.1.91: documents redesign — twin boxes (Advisor / User) with grey header
   bars, full usable width, modal-driven add/request flows. */
.tw-docs2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .tw-docs2 { grid-template-columns: 1fr; } }
.tw-docbox-head { display: flex; justify-content: space-between; align-items: center; background: #f2f5fb; padding: 10px 16px; font-weight: 800; font-size: 13.5px; color: var(--navy, #10233f); letter-spacing: -.01em; border-bottom: 1px solid rgba(16, 35, 63, .07); }
.tw-docrow:first-child { border-top: 0; }
.tw-docrow-sub { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12.5px; }
.tw-docdesc { color: var(--muted) !important; text-decoration: none !important; font-size: 12.5px; text-align: left; }
.tw-docdesc:hover { text-decoration: underline !important; }
.tw-rqrow input { width: 100%; }

/* v3.1.92: doc rows as small grey links; twin boxes span the full app width
   (the reserved notes column is released — notes is a fixed drawer). */
.tw-docrow a[data-dl] { font-size: 13px; font-weight: 500; color: #5b6b85; text-decoration: none; }
.tw-docrow a[data-dl]:hover { color: var(--navy, #10233f); text-decoration: underline; }
.tw-dd-cols { margin-top: 18px; display: grid; gap: 18px; align-items: stretch; grid-template-columns: minmax(0, 1fr) !important; }

/* v3.1.93: inline one-line description editing; trash pinned to the row's
   right edge. */
.tw-docrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); justify-content: space-between; }
.tw-docrow .grow { flex: 1 1 auto; min-width: 0; }
.tw-docrow > .tw-icobtn { margin-left: auto; flex: 0 0 auto; }
.tw-descinline { font-size: 12.5px !important; padding: 3px 8px !important; height: 26px; width: min(420px, 60vw); }
.tw-docrow .tw-linklike { font-size: 12.5px; }

/* v3.1.94: inline description gets explicit save/cancel controls. */
.tw-descwrap { display: inline-flex; min-width: 0; align-items: center; gap: 5px; }
.tw-descok, .tw-desccancel { width: 26px; height: 26px; border-radius: 8px !important; font-size: 13px; font-weight: 700; }
.tw-descok { color: #047857; }
.tw-descok:hover { border-color: #047857; }
.tw-desccancel { color: #6b7280; }

/* v3.1.96: equal-height twin boxes (stretch to the taller); visibility
   checkbox styling. */
.tw-docs2 { display: grid; gap: 18px; align-items: stretch !important; }
.tw-docbox { background: #fff; border: 1px solid rgba(16, 35, 63, .08); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(16,35,63,.05), 0 10px 28px -14px rgba(16,35,63,.18); display: flex; flex-direction: column; }
.tw-docbox-body { padding: 12px 16px 14px; flex: 1 1 auto; }
.tw-docvis { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; margin-right: 6px; cursor: pointer; }
.tw-docvis input { accent-color: #2563eb; width: 14px; height: 14px; }

/* v3.1.98: sharp Alliance lockup — inline SVG so the wordmark renders in
   Inter; gentle glow lift on hover. */
.tw-logo-sharp { width: 100%; max-width: 236px; height: auto; display: block; }
.tw-logo-sharp:hover rect[filter] { opacity: .5; transition: opacity .25s ease; }
.tw-side-logo { padding: 6px 12px 18px; display: flex; align-items: flex-start; padding-right: 8px; }

/* v3.2.0: dashboard featured-strategy carousel + latest-insight boxes. */
.tw-featbody { flex: 1 1 auto; min-height: 118px; }
.tw-feat-slide { animation: twFeatIn .35s ease; }
@keyframes twFeatIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.tw-feat-sub { font-weight: 800; font-size: 16px; letter-spacing: -.015em; color: var(--navy, #10233f); margin-bottom: 5px; }
.tw-feat-desc { font-size: 13.5px; color: #4b5a74; line-height: 1.5; margin-bottom: 8px; }
.tw-feat-link { font-weight: 700; font-size: 13px; }

/* v3.2.1: insight box carries the article's featured image as a dimmed
   background; feat row leads the dashboard. */
.tw-insightbg::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 26, 49, .78), rgba(11, 26, 49, .88)); }
.tw-insightbg .tw-feat-sub { color: #fff; }
.tw-insightbg .tw-feat-desc { color: #cdd9ea; }
.tw-insightbg .tw-feat-link { color: #7db8ff; }

/* v3.2.3: even top row — both boxes share the dark inner panel treatment,
   equal heights, matched padding; carousel dots overlay the panel. */
.tw-feat-row .tw-dash-section { display: flex; flex-direction: column; }
.tw-featbox { display: flex; flex-direction: column; position: relative; }
.tw-featpanel { position: relative; border-radius: 12px; overflow: hidden; padding: 16px 18px; min-height: 136px;
  background: linear-gradient(135deg, #14294a 0%, #0d1d36 100%); flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.tw-featpanel .tw-feat-sub { color: #fff; }
.tw-featpanel .tw-feat-desc { color: #cdd9ea; }
.tw-featpanel .tw-feat-link { color: #7db8ff; font-weight: 700; }
.tw-featpanel .tw-dr-empty { color: #9fb4d8; }
.tw-insightbg { position: relative; border-radius: 12px; overflow: hidden; background-size: cover; background-position: center; }
.tw-insight-inner { position: relative; z-index: 1; padding: 0; }
.tw-featdots { display: flex; gap: 6px; position: absolute; bottom: 12px; right: 16px; margin-top: 0; z-index: 2; }
.tw-dot { width: 7px; height: 7px; border-radius: 999px; cursor: pointer; transition: background .15s ease, transform .15s ease; background: rgba(255, 255, 255, .35); }
.tw-dot.on { transform: scale(1.25); background: #4fd6ff; }


/* v3.2.8: feat row bottom gap matches the tri-cluster -> deals gap. */
.tw-feat-row { align-items: stretch !important; margin-bottom: 18px !important; }  /* == .tw-triage bottom margin */

/* v3.2.9: Featured/Insight adopt the tri-card look — navy header band,
   WHITE body fields; insight image becomes a thumbnail; dots re-inked for
   the white body. Panel-era rules superseded. */
.tw-featcard { position: relative; display: flex; flex-direction: column; }
.tw-featbody2 { flex: 1 1 auto; padding: 14px 18px 16px; min-height: 118px; display: flex; flex-direction: column; justify-content: center; }
.tw-featbody2 .tw-feat-sub { color: var(--navy, #10233f); }
.tw-featbody2 .tw-feat-desc { color: #4b5a74; }
.tw-featbody2 .tw-feat-link { color: #1d4ed8; font-weight: 700; }
.tw-insight2 { display: flex; gap: 16px; align-items: center; }
.tw-insight-thumb { width: 138px; height: 96px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; box-shadow: 0 4px 12px -6px rgba(16, 35, 63, .4); }
.tw-featcard .tw-featdots { position: absolute; bottom: 12px; right: 16px; z-index: 2; }
.tw-featcard .tw-dot { background: rgba(16, 35, 63, .2); }
.tw-featcard .tw-dot.on { background: #2563eb; }
@media (max-width: 900px) { .tw-insight2 { flex-direction: column-reverse; align-items: stretch; } .tw-insight-thumb { width: 100%; height: 120px; } }

/* v3.2.11: Assignment view. */
.tw-asg-band { background: #fff !important; }
.tw-asg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.tw-asg-actions { display: flex; gap: 8px; align-items: center; }
.tw-asg-actions #asgWho { min-width: 220px; }
.tw-asg-stale td { background: #fff7f5; }
.tw-view-head { margin: 4px 0 14px; }

/* v3.2.12: Create Deal modal — two-col rows can no longer overflow the
   modal (minmax(0,1fr) + full-width boxes); textarea and selects take the
   same filled treatment as inputs. */
.tw-modal .tw-form-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tw-modal .tw-form .tw-input, .tw-modal .tw-form .tw-select { width: 100%; box-sizing: border-box; min-width: 0; }
.tw-modal .tw-fl { min-width: 0; }
.tw-cd-desc { resize: vertical; min-height: 68px; font: inherit; }
.tw-modal { overflow: hidden; max-width: 560px; width: calc(100vw - 48px); box-sizing: border-box; }

/* v3.2.14: deal header back-link (replaces the pill row) + Analysis
   versions-list -> full two-panel viewer (Income consolidated | Strategies
   with gated Results). */
.tw-rec-backlink { display: inline-block; font-size: 13px; font-weight: 700; color: #1d4ed8; text-decoration: none; margin: 0 0 6px; }
.tw-rec-backlink:hover { text-decoration: underline; }
.tw-anlviewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.tw-anlviewer-bar .tw-rec-backlink { margin: 0; }
.tw-anlviewer-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .tw-anlviewer-grid { grid-template-columns: 1fr; } }
.tw-anlv-card { background: #fff; border: 1px solid rgba(16, 35, 63, .08); border-radius: 14px; padding: 0 0 12px; overflow: hidden; opacity: .92; }
.tw-anlv-card.on { opacity: 1; box-shadow: 0 8px 22px -14px rgba(16, 35, 63, .35); border-color: rgba(37, 99, 235, .35); }
.tw-anlv-head h3 { margin: 0; font-size: 14px; font-weight: 800; color: var(--navy, #10233f); letter-spacing: -.01em; }
.tw-anlv-card .tw-emb-slot { padding: 12px 14px 0; }
.tw-anlv-gate { margin: 12px 14px 0; padding: 12px 14px; border-radius: 10px; background: #f6f8fc; color: #5b6b85; font-size: 13px; }
/* embedded tool breathes in the viewer */
.tw-anlv-card .tw-anl-embed .tw-card.tw-step-card { box-shadow: none; border: none; padding: 0 0 8px; }

/* v3.2.15: tighter record header (breadcrumb tight above title, dead space
   reclaimed) + analysis viewer as a FULL takeover with Income/Results
   subtabs and a Close control. Supersedes the v3.2.14 two-card grid. */
.tw-deal-record { margin-top: -6px; }
.tw-deal-record > .tw-rec-backlink { margin: 0 0 2px 2px; }
.tw-deal-record .tw-deal-detail { padding: 18px 20px; padding-top: 12px; }

.tw-anlfull.open { position: fixed; top: 0; right: 0; bottom: 0; left: 248px; z-index: 320; background: #f4f6fb; display: flex; flex-direction: column; }
@media (max-width: 900px) { .tw-anlfull.open { left: 0; } }
.tw-anlfull-crumb { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.tw-anlfull-crumb .tw-rec-backlink { margin: 0; white-space: nowrap; }
.tw-anlfull-title { font-weight: 800; font-size: 15px; color: var(--navy, #10233f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-anlfull-tabs { display: flex; align-items: center; gap: 8px; }
.tw-anlv-stab { border: 1px solid rgba(37, 99, 235, .35); background: #fff; color: #1d4ed8; font-weight: 700; font-size: 13px; padding: 6px 16px; border-radius: 999px; cursor: pointer; }
.tw-anlv-stab.on { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.tw-anlv-stab:disabled { opacity: .45; cursor: not-allowed; }
.tw-anlv-gatenote { font-size: 12px; color: #7c8aa5; }
.tw-anlfull-close { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(16, 35, 63, .15); background: #fff; font-size: 20px; line-height: 1; color: #33415c; cursor: pointer; }
.tw-anlfull-close:hover { background: #fee2e2; border-color: #b91c1c; color: #b91c1c; }
.tw-anlfull-body { flex: 1 1 auto; overflow: auto; padding: 16px 20px 28px; }
body.tw-anlfull-open { overflow: hidden; }
/* neutralize the superseded grid rules inside the takeover */
.tw-anlfull .tw-anlviewer-grid { display: block; }

/* v3.2.17: analysis viewer Results density — full width; compact cards
   with the figure UNDER the label; 3-across (4 on very wide screens). */
.tw-anlfull-body .tw-emb-slot { margin: 0 auto; max-width: none; }
.tw-anlfull .tw-cards { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 14px !important; }
@media (min-width: 1750px) { .tw-anlfull .tw-cards { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (max-width: 1150px) { .tw-anlfull .tw-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.tw-anlfull .tw-metric { display: block !important; padding: 7px 0 !important; }
.tw-anlfull .tw-metric span { display: block; font-size: 12px; color: #5b6b85; margin-bottom: 1px; }
.tw-anlfull .tw-metric strong { display: block; font-size: 15.5px; letter-spacing: -.01em; }
.tw-anlfull .tw-result-card, .tw-anlfull .tw-cards > div { min-width: 0; }

/* v3.2.18: viewer results alignment — two-line title reserve on every
   card; baseline card bottom matched to the first strategy row; baseline
   figures pulled left to free width for the mitigation grid. */
.tw-anlfull .tw-card-title { min-height: 2.6em; display: flex; align-items: flex-start; }
.tw-anlfull .tw-sol-left { flex: 0 0 300px; max-width: 300px; padding-right: 14px; }
.tw-anlfull .tw-sol-left .tw-metric strong,
.tw-anlfull .tw-sol-left .tw-result-card strong { text-align: left; }
.tw-anlfull .tw-sol-left .tw-result-card { min-height: 520px; display: flex; flex-direction: column; }

/* v3.2.20: deal-viewer results tables + propose row. */
.tw-c-proprow td { padding-top: 12px; padding-bottom: 14px; text-align: right; }

/* v3.2.21: info-pill rows in the results tables. */
.tw-c-pills td { text-align: right; padding-top: 10px; padding-bottom: 10px; }
.tw-c-pills .tw-soltag { display: inline-block; }
.tw-c-pills .tw-badge { margin-left: 6px; }

/* v3.2.22: analysis polish — clickable version rows (no radios), viewer
   Back/Next/Go-to-Proposal, left-justified section headers, grey section
   bands in the income form, two-line wrapping table headers (no cutoff,
   no horizontal scroll). */
.tw-anlrow { cursor: pointer; }
.tw-anlrow:hover td { background: #f4f7fd; }
.tw-anlrow.on td { background: #eef4ff; }
.tw-anlfull .tw-sol-head, .tw-anlv-hdr { text-align: left; margin: 0 0 14px; }
.tw-anlfull .tw-sol-head h3, .tw-anlv-hdr h3 { margin: 0 0 4px; font-size: 17px; font-weight: 800; color: var(--navy, #10233f); }
.tw-anlfull .tw-sol-head .tw-hint, .tw-anlv-hdr .tw-hint { margin: 0; }
.tw-anlfull .tw-step-card h2 { background: #f2f5fb; padding: 10px 14px; border-radius: 10px; font-size: 15px; margin: 0 0 12px; }
.tw-anlfull .tw-compare th { white-space: normal !important; word-break: break-word; line-height: 1.3; padding-top: 10px; padding-bottom: 10px; vertical-align: middle; min-height: 2.6em; }
.tw-anlfull .tw-compare-wrap { overflow-x: visible; }
.tw-anlfull .tw-compare { width: 100% !important; }

/* v3.2.24: viewer headers left-justified everywhere; Results top spacing
   matches Income (dead band above the title removed). */
.tw-anlfull .tw-emb-slot > :first-child,
.tw-anlfull .tw-emb-slot .tw-results,
.tw-anlfull .tw-emb-slot .tw-results > :first-child { margin-top: 0 !important; padding-top: 0 !important; }
.tw-anlfull .tw-anl-embed { padding-top: 0 !important; }
.tw-anlfull .tw-anl-embed .tw-pane { padding-top: 0 !important; margin-top: 0 !important; }
.tw-anlfull .tw-anl-embed .tw-step-nav, .tw-anlfull .tw-anl-embed .tw-stepnav { display: none !important; }
.tw-anlfull .tw-sol-head { margin: 0 0 14px !important; }

/* v3.2.25: Results header sized identically to the Income header. */
.tw-anlfull .tw-sol-head h3, .tw-anlfull .tw-anlv-hdr h3 { font-size: 17px !important; font-weight: 800 !important; line-height: 1.3 !important; margin: 0 0 4px !important; }
.tw-anlfull .tw-sol-head .tw-hint, .tw-anlfull .tw-sol-head p, .tw-anlfull .tw-anlv-hdr .tw-hint { font-size: 13.5px !important; line-height: 1.5 !important; margin: 0 !important; }
.tw-anlfull .tw-sol-head, .tw-anlfull .tw-anlv-hdr { margin: 0 0 14px !important; }

/* v3.2.26: Income header matches the Results header exactly as rendered —
   centered title and hint, same scale. Supersedes the earlier left/17px
   overrides (appended later, same specificity, so these win). */
.tw-anlfull .tw-anlv-hdr, .tw-anlfull .tw-sol-head,
.tw-anlfull .tw-anlv-hdr h3, .tw-anlfull .tw-sol-head h3,
.tw-anlfull .tw-anlv-hdr .tw-hint, .tw-anlfull .tw-sol-head .tw-hint,
.tw-anlfull .tw-sol-head p { text-align: center !important; }
.tw-anlfull .tw-anlv-hdr h3, .tw-anlfull .tw-sol-head h3 { font-size: 20px !important; font-weight: 800 !important; margin: 0 0 6px !important; }
.tw-anlfull .tw-anlv-hdr .tw-hint, .tw-anlfull .tw-sol-head .tw-hint, .tw-anlfull .tw-sol-head p { font-size: 14px !important; color: #5b6b85 !important; }
.tw-anlfull .tw-anlv-hdr, .tw-anlfull .tw-sol-head { margin: 4px 0 18px !important; }

/* v3.2.27: kill the residual row above the Results title — the embed's
   step-nav bar; the earlier hide rule was scoped to a wrapper class the
   embed doesn't carry. Scope-wide inside the takeover. */
.tw-anlfull .tw-step-nav { display: none !important; }

/* v3.2.29: viewer header split — thin breadcrumb row above, title row
   beneath (identical on Income and Results); nav is Back + contextual
   Next / Go to Proposal. */
.tw-anlfull-crumbrow .tw-rec-backlink { margin: 0; font-size: 12.5px; }
.tw-anlfull .tw-anlfull-bar { padding-top: 4px; }

/* v3.2.30: viewer bar buttons vertically centered; Back/Next fixed equal
   width so the row never jumps when the label switches Next <-> Proposal. */
.tw-anlfull-bar { display: flex; justify-content: space-between; gap: 14px; padding: 10px 18px; background: #fff; border-bottom: 1px solid rgba(16, 35, 63, .1); flex-wrap: wrap; align-items: center !important; }
.tw-anlfull-right { display: flex; gap: 12px; align-items: center !important; }
#anlNavBack, #anlNavNext { width: 108px; min-width: 108px; text-align: center; justify-content: center; }

/* v3.2.31: proposal comparison table matches the analysis results tables —
   contained width, two-line wrapping headers, no horizontal cutoff. */
.tw-cmp-fit { width: 100% !important; table-layout: fixed; }
.tw-cmp-fit th { white-space: normal !important; word-break: break-word; line-height: 1.3; padding-top: 10px; padding-bottom: 10px; vertical-align: middle; }
.tw-cmp-fit + * { margin-top: 14px; }

/* ── v3.27.0: Basis of the no-planning estimate + Assumptions / Sources tabs ── */
.tw-basis { width: 352px; max-width: 352px; box-sizing: border-box; margin-top: 12px; padding: 14px 16px 12px; background: #fff; border: 1px solid rgba(16, 35, 63, .08); border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 35, 63, .04); }
.tw-basis-head { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #344054; margin-bottom: 8px; }
.tw-basis-list { margin: 0; }
.tw-basis-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #eef0f5; font-size: 12.5px; }
.tw-basis-row:last-child { border-bottom: 0; }
.tw-basis-row dt { color: #667085; margin: 0; white-space: nowrap; }
.tw-basis-row dd { margin: 0; color: #101828; font-weight: 600; text-align: right; }
.tw-basis-row[title] { cursor: help; }
.tw-basis-foot { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 12.5px; color: #98a2b3; }
.tw-basis-foot a { color: #2563eb; font-weight: 600; text-decoration: none; }
.tw-basis-foot a:hover { text-decoration: underline; }
.tw-basis-disc { margin: 8px 0 0; font-size: 11.5px; line-height: 1.45; color: #667085; }
.tw-x-title { font-size: 15px; margin: 0 0 12px; color: var(--navy, #102347); }
.tw-basis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tw-basis-cell { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid #e7eaf0; border-radius: 10px; background: #fafbfd; }
.tw-basis-cell .k { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #667085; }
.tw-basis-cell .v { font-size: 15px; font-weight: 700; color: #101828; }
.tw-basis-cell .n { font-size: 12px; color: #667085; line-height: 1.45; }
.tw-x-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tw-x-list li { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid #eef0f5; font-size: 13.5px; line-height: 1.5; }
.tw-x-list li:last-child { border-bottom: 0; }
.tw-x-list strong { color: #101828; font-weight: 600; }
.tw-x-list span { color: #475467; }
.tw-x-list a { color: #2563eb; text-decoration: none; }
.tw-x-list a:hover { text-decoration: underline; }
@media (max-width: 760px) { .tw-x-list li { grid-template-columns: 1fr; gap: 4px; } .tw-basis { width: auto; max-width: none; } }

/* ── v3.28.0: coded engine trace (admin preview) ── */
.tw-fig-banner { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #eef4ff; border: 1px solid #c3d6f7; color: #1e3a8a; font-size: 13px; line-height: 1.5; }
.tw-fig-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tw-fig-table td { padding: 9px 0; border-bottom: 1px solid #eef0f5; vertical-align: top; }
.tw-fig-table td.l { color: #101828; padding-right: 24px; }
.tw-fig-table td.l .h { display: block; color: #667085; font-size: 12.5px; line-height: 1.5; margin-top: 3px; }
.tw-fig-table td.l .h a { color: #2563eb; text-decoration: none; }
.tw-fig-table td.a { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; width: 140px; }
.tw-fig-table tr.sub td { background: #fafbfd; }
.tw-fig-table tr.total td { font-weight: 800; border-top: 2px solid #d9dee8; border-bottom: 0; }
.tw-fig-table tr.total td.l { font-weight: 700; }
.tw-x-list.one li { grid-template-columns: 1fr; }

/* v3.30.0: advisor seat control in the deal header (TaxWealth Certified Advisers) */
.tw-advseat { display: inline-flex; align-items: center; }
.tw-advseat strong { font-weight: 700; }
.tw-advseat select { font-size: 12px; padding: 3px 6px; }

/* ── v3.31.0 Member deal page (one screen, no tabs) ───────────────────────── */
.tw-member-record .tw-rec-backlink { display: inline-block; margin-bottom: 4px; }
.tw-mb-card { background: #fff; border: 1px solid rgba(16, 35, 63, .08); border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 35, 63, .04); padding: 18px 20px; margin-top: 14px; }
.tw-mb-label { font-size: 11px; letter-spacing: .12em; font-weight: 700; color: #667085; text-transform: uppercase; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.tw-mb-label .tw-linklike { margin-left: auto; font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.tw-mb-strip-row { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.tw-mb-title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.tw-mb-client { font-size: 14px; color: #344054; margin-top: 2px; }
.tw-mb-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.tw-mb-amt { font-size: 22px; font-weight: 800; text-align: right; }
.tw-mb-ref { font-size: 13px; color: var(--muted); text-align: right; margin-top: 2px; }
.tw-notesbtn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; }
.tw-notesbtn .n { background: #eef1f6; border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.tw-notesbtn .new { background: #dc2626; color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.tw-mb-status { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--blue-soft); border: 1px solid var(--blue-line); }
.tw-mb-status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); flex: 0 0 auto; }
.tw-mb-status b { font-size: 15px; }
.tw-mb-status .by { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tw-mb-status.tw-mb-stat-good { background: #e7f5ec; border-color: #bfe3cb; } .tw-mb-status.tw-mb-stat-good .dot { background: #16a34a; }
.tw-mb-status.tw-mb-stat-warn { background: #fff7e6; border-color: #f6dfae; } .tw-mb-status.tw-mb-stat-warn .dot { background: #b45309; }
.tw-mb-people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tw-mb-p-h { font-size: 12px; font-weight: 700; color: #344054; margin-bottom: 8px; }
.tw-mb-p { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.tw-mb-av { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex: 0 0 auto; }
.tw-mb-av.tw { background: var(--navy); } .tw-mb-av.me { background: #64748b; } .tw-mb-av.cl { background: #0f766e; }
.tw-mb-p-n { font-weight: 600; font-size: 14px; line-height: 1.2; } .tw-mb-p-s { font-size: 12px; color: var(--muted); }
.tw-mb-steps { display: grid; grid-template-columns: repeat(6, 1fr); }
.tw-mb-s { padding: 0 10px 0 0; } .tw-mb-s-bar { height: 6px; border-radius: 999px; background: #e2e8f0; }
.tw-mb-s.done .tw-mb-s-bar { background: #16a34a; } .tw-mb-s.now .tw-mb-s-bar { background: var(--blue); } .tw-mb-s.bad .tw-mb-s-bar { background: #dc2626; }
.tw-mb-s-t { font-weight: 700; font-size: 13px; margin-top: 10px; } .tw-mb-s.todo .tw-mb-s-t { color: #98a2b3; } .tw-mb-s.now .tw-mb-s-t { color: var(--blue); } .tw-mb-s.bad .tw-mb-s-t { color: #b42318; }
.tw-mb-s-d { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.tw-mb-how { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line); font-size: 13px; } .tw-mb-how p { margin: 0 0 6px; }
.tw-mb-pq { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.tw-mb-res { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tw-kpi { padding: 14px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--line); }
.tw-kpi .k { font-size: 12px; color: var(--muted); font-weight: 600; } .tw-kpi .v { font-size: 22px; font-weight: 800; margin-top: 4px; }
.tw-kpi.hero { background: #e7f5ec; border-color: #bfe3cb; } .tw-kpi.hero .v { color: #1d7a44; }
.tw-mb-res-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; } .tw-mb-res-foot a.tw-btn { text-decoration: none; }
.tw-mb-compose { display: flex; gap: 10px; align-items: flex-start; } .tw-mb-compose textarea { flex: 1; min-height: 60px; resize: vertical; }
.tw-mb-notes { margin-top: 14px; } .tw-mb-note:first-child { border-top: 0; }
.tw-mb-note-who { font-weight: 700; font-size: 13px; } .tw-mb-note-when { color: var(--muted); font-size: 12px; margin-left: 6px; }
.tw-newtag { background: #dc2626; color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 10px; font-weight: 700; margin-left: 8px; vertical-align: middle; }
.tw-mb-doc { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); } .tw-mb-doc:first-of-type { border-top: 0; } .tw-mb-doc .tw-btn { margin-left: auto; } .tw-mb-doc-n { font-weight: 600; font-size: 14px; }
.tw-newdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #dc2626; margin-right: 7px; vertical-align: middle; }
@media (max-width: 900px) { .tw-mb-steps { grid-template-columns: repeat(3, 1fr); row-gap: 16px; } .tw-mb-res, .tw-mb-people { grid-template-columns: 1fr; } .tw-mb-strip-row { grid-template-columns: 1fr; } .tw-mb-amt, .tw-mb-ref { text-align: left; } .tw-mb-head-right { align-items: flex-start; } }

/* v3.32.0: "Powered by TaxWealth" lockup under a white-labeled firm logo (shared analysis) */
.tw-powered { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11px; letter-spacing: .02em; text-transform: none; color: #667085; font-weight: 600; }
.tw-powered img { height: 18px; width: auto; opacity: .95; }
/* v3.34.0: logo + lockup stacked in report headers (in-app preview, print, PDF, shared sheet). */
.tw-logo-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tw-cmp-head-logo.tw-cmp-head-logo-stack { height: auto; }
.tw-share-head .tw-logo-stack { align-items: flex-end; }
@media print { .tw-logo-stack { break-inside: avoid; } }

/* v3.33.0: pre-qualification result (Refer a deal, member page) */
.tw-pq-result { margin: 4px 0 10px; padding: 12px 14px; border-radius: 10px; background: #e7f5ec; border: 1px solid #bfe3cb; }
.tw-pq-head { font-weight: 800; font-size: 15px; color: #1d7a44; }
.tw-pq-band, .tw-mb-pq-band { font-weight: 700; font-size: 14px; margin: 2px 0 4px; }

/* ── v3.34.0: at-a-glance preview (members and advisers), member deal details ── */
.tw-pv-status { margin-top: 10px; padding: 10px 12px; }
.tw-pv-status b { font-size: 14px; }
.tw-pv-fresh { display: flex; align-items: center; gap: 4px; margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: #fff1f1; border: 1px solid #f6c6c6; color: #991b1b; font-size: 13px; font-weight: 600; }
.tw-pv-fresh .tw-newdot { margin-right: 6px; }
.tw-pv-res { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.tw-pv-res b { color: var(--ink, #111827); font-size: 15px; margin-left: 4px; }
.tw-dd-block.tw-pv-unread { border-left: 3px solid #dc2626; padding-left: 10px; }
.tw-member-preview .tw-dd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tw-mb-amt-k { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.tw-mb-dgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; }
.tw-mb-desc { margin-top: 12px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.tw-mb-editform { margin-top: 4px; }
.tw-mb-editform[hidden], .tw-mb-details[hidden] { display: none !important; }
.tw-fl-help { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 400; }
@media (max-width: 760px) { .tw-mb-dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── v3.35.0: analysis view (band or detailed) ── */
.tw-amode { margin-top: 12px; }
.tw-amode-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tw-seg { display: inline-flex; border: 1px solid var(--blue-line, #c9d7ee); border-radius: 999px; overflow: hidden; background: #fff; }
.tw-seg-btn { border: 0; background: transparent; padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tw-seg-btn.on { background: var(--blue, #1d4ed8); color: #fff; }
.tw-seg-btn:disabled { cursor: default; opacity: .7; }
.tw-mb-bands { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 18px; margin-top: 8px; }
.tw-mb-band { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 8px; background: var(--blue-soft, #eef3fb); font-size: 14px; }
.tw-mb-band b { white-space: nowrap; }
/* shared sheet, band mode */
.tw-share-band { padding-bottom: 24px; }
.tw-band-hero { margin: 18px 0 14px; padding: 22px 24px; border-radius: 12px; background: #e7f5ec; border: 1px solid #bfe3cb; }
.tw-band-hero.maybe { background: var(--blue-soft, #eef3fb); border-color: var(--blue-line, #c9d7ee); }
.tw-band-head { font-size: 22px; font-weight: 800; color: #1d7a44; }
.tw-band-hero.maybe .tw-band-head { color: #10233f; }
.tw-band-line { font-size: 17px; font-weight: 700; margin-top: 6px; }
.tw-band-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 18px; margin-top: 10px; }
.tw-band-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.7); font-size: 15px; }
.tw-band-item b { white-space: nowrap; }
.tw-band-strat { font-size: 14px; margin: 0 0 6px; }
.tw-band-note { font-size: 13.5px; color: var(--muted); margin: 0 0 6px; }
.tw-band-next { font-size: 13.5px; margin: 0 0 14px; }
@media print { .tw-band-hero { break-inside: avoid; } }

/* v3.38.0 member deal page: people editing, notes modal, request delete */
.tw-mb-head-btns { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.tw-mb-delpill { background: #fdecec; color: #b42318; border: 1px solid #f5c2c0; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.tw-mb-people.tw-mb-people4 { grid-template-columns: repeat(4, 1fr); }
.tw-mb-p-add { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tw-mb-p-tag { display: inline-block; background: var(--blue-soft, #eef3ff); color: var(--blue-2, #1e3a8a); border-radius: 999px; padding: 0 7px; font-size: 10.5px; font-weight: 700; margin-left: 4px; vertical-align: middle; }
.tw-mb-p-edit, .tw-mb-note-edit { font-size: 12px; margin-left: 6px; }
.tw-mb-more { display: block; margin-top: 8px; font-size: 13px; }
.tw-modal:has(.tw-mb-notesmodal) { width: min(840px, calc(100vw - 32px)); max-width: none; }
@media (max-width: 1100px) { .tw-mb-people.tw-mb-people4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .tw-mb-people.tw-mb-people4 { grid-template-columns: 1fr; } }

/* v3.39.0 notes: no horizontal scroll, long links wrap, edit box spans the column */
.tw-mb-note { display: grid; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); grid-template-columns: 34px minmax(0, 1fr); }
.tw-mb-note > div { min-width: 0; }
.tw-mb-note-body { font-size: 14px; margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.tw-mb-notesmodal .tw-mb-notes { max-height: 56vh; overflow: auto; margin: 10px 0; overflow-x: hidden; }
.tw-mb-note-body textarea { display: block; width: 100%; box-sizing: border-box; min-height: 96px; resize: vertical; }
/* v3.39.0 initial assessment */
.tw-pq-sum { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.tw-pq-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tw-pq-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.tw-pq-pill.ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.tw-pq-pill.review { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.tw-pq-elig { font-size: 14px; color: var(--ink, #1a2433); }
.tw-pq-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tw-pq-cell { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 10px 12px; background: #fff; }
.tw-pq-cell .k { font-size: 12px; color: var(--muted, #64748b); }
.tw-pq-cell .v { font-size: 15px; font-weight: 700; margin-top: 3px; }
.tw-pq-cell.hero { background: #f0fdf4; border-color: #bbf7d0; }
.tw-pq-cell.hero .v { color: #166534; }
.tw-pq-adv { margin-bottom: 14px; }
@media (max-width: 900px) { .tw-pq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* v3.39.0 referral wizard */
.tw-modal:has(.tw-wiz) { width: min(720px, calc(100vw - 32px)); max-width: none; }
.tw-wiz-dots { display: flex; gap: 6px; justify-content: center; margin: 0 0 14px; }
.tw-wiz-dots span { width: 28px; height: 4px; border-radius: 2px; background: var(--line, #e5e7eb); }
.tw-wiz-dots span.on { background: var(--blue, #2563eb); } .tw-wiz-dots span.done { background: #93c5fd; }
.tw-wiz-hero h3 { margin: 4px 0 10px; font-size: 20px; }
.tw-wiz-hero p { line-height: 1.55; }
.tw-wiz-list { margin: 8px 0 12px; padding-left: 20px; line-height: 1.6; }
.tw-wiz-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line, #e5e7eb); }
.tw-wiz-person { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 10px 12px; margin: 10px 0; background: #fafbfc; }
.tw-wiz-person-h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tw-wiz-person-h select { width: auto; min-width: 150px; }
.tw-wiz-person-h .tw-linklike { margin-left: auto; }
.tw-wiz-add { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.tw-modal-ov:has(.tw-wiz), .tw-modal-ov:has(.tw-mb-notesmodal) { padding-top: 4vh; }
.tw-modal:has(.tw-wiz), .tw-modal:has(.tw-mb-notesmodal) { max-height: 92vh; display: flex; flex-direction: column; }
.tw-modal:has(.tw-wiz) .tw-modal-body, .tw-modal:has(.tw-mb-notesmodal) .tw-modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }
/* v3.40.0 wizard keeps one panel size; actions sit at the bottom */
.tw-wiz { display: flex; flex-direction: column; min-height: 402px; }
.tw-wiz > .tw-wiz-actions { margin-top: auto; }
.tw-wiz-actions .tw-btn:disabled { opacity: .5; cursor: not-allowed; }
/* v3.40.0 deal events: banner + pointer to the place to look */
.tw-mb-evt { align-items: center; }
.tw-mb-evt-acts { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.tw-mb-evt-x { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--muted, #64748b); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.tw-mb-evt-x:hover { background: rgba(15, 23, 42, .06); color: var(--ink, #1a2433); }
@keyframes twAttnPulse { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .55); } 70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); } }
.tw-mb-card.tw-attn-pulse { outline: 2px solid #93c5fd; outline-offset: 2px; transition: outline-color .3s; }
.tw-btn.tw-attn-pulse, .tw-linklike.tw-attn-pulse, .tw-notesbtn.tw-attn-pulse { animation: twAttnPulse 1.4s ease-out 4; position: relative; }

/* v3.42.0 member deal page: header edit, people summary, people editor, assessment %, detailed analysis */
.tw-mb-headtxt { min-width: 0; flex: 1 1 auto; }
.tw-mb-head-edit { font-size: 12px; font-weight: 600; margin-left: 6px; vertical-align: middle; }
.tw-mb-descline { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 760px; }
#mHeadForm { max-width: 640px; margin-top: 4px; }
.tw-pq-grid.tw-pq-grid6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .tw-pq-grid.tw-pq-grid6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tw-modal.tw-modal-wide { max-width: 1180px; width: calc(100vw - 48px); }
.tw-modal-ov:has(.tw-modal-wide) { padding-top: 4vh; align-items: flex-start; }
.tw-modal-wide .tw-modal-body { max-height: 84vh; overflow-y: auto; }
.tw-pm-scroll { overflow-x: auto; }
.tw-pm-table { width: 100%; min-width: 900px; table-layout: fixed; }
.tw-pm-table td { padding: 4px 4px; }
.tw-pm-table .tw-input { width: 100%; box-sizing: border-box; min-width: 0; }
.tw-pm-add { margin: 10px 0 4px; }
.tw-av-top { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-bottom: 10px; }
.tw-av-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tw-av-chips .tw-chip { cursor: pointer; background: #fff; }
.tw-av-chips .tw-chip.on { background: var(--navy, #16305a); color: #fff; border-color: var(--navy, #16305a); }
.tw-av-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line, #e5e7eb); margin-bottom: 14px; flex-wrap: wrap; }
.tw-av-tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 9px 14px; font: inherit; font-weight: 600; color: var(--muted, #64748b); cursor: pointer; }
.tw-av-tab.on { color: var(--navy, #16305a); border-bottom-color: var(--navy, #16305a); }
.tw-av-cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; margin-top: 14px; }
@media (max-width: 900px) { .tw-av-cols { grid-template-columns: 1fr; } }
.tw-av-h { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--navy, #16305a); margin: 6px 0 8px; }
.tw-av-sec { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.tw-av-sec-h { font-weight: 600; font-size: 12.5px; color: var(--muted, #64748b); margin-bottom: 4px; }
.tw-av-kv { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 13px; border-top: 1px dashed #eef1f5; }
.tw-av-kv:first-of-type { border-top: 0; }
.tw-av-kv b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.tw-av-table { width: 100%; margin-bottom: 12px; font-size: 13px; }
.tw-av-table caption { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted, #64748b); padding: 4px 0; }
.tw-av-table td:nth-child(n+2), .tw-av-table th:nth-child(n+2) { text-align: right; white-space: nowrap; }
.tw-av-table tr.h td { font-weight: 700; background: #f5f7fb; }
.tw-av-table tr.t td { font-weight: 700; }
.tw-av-cmp { width: 100%; font-size: 14px; }
.tw-av-cmp td:nth-child(n+2), .tw-av-cmp th:nth-child(n+2) { text-align: right; }
.tw-av-cmp tr.hero td { font-weight: 700; color: #166534; }
.tw-av-comp { max-width: 560px; margin-bottom: 8px; }
.tw-av-find { margin-bottom: 8px; }
.tw-av-strats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tw-av-pill { font-size: 12.5px; font-weight: 600; background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; border-radius: 999px; padding: 3px 10px; }
.tw-av-btns { gap: 8px; flex-wrap: wrap; }
.tw-mb-headtxt [hidden], #mDetailsEdit[hidden] { display: none !important; }

/* v3.43.0 people column + editor */
.tw-mb-p-more { margin: 2px 0 0 42px; display: block; font-size: 12.5px; font-weight: 600; margin-top: 2px; padding: 0; margin-left: 0; color: var(--blue, #2563eb); }
.tw-mb-p-editrow .tw-mb-p-edit { font-size: 12.5px; font-weight: 600; }
.tw-pm-table th.tw-pm-prim, .tw-pm-table td.tw-pm-prim { width: 70px; text-align: center; }
.tw-pm-table td.tw-pm-prim input { width: 18px; height: 18px; accent-color: var(--navy, #16305a); cursor: pointer; }
.tw-pm-ro { width: 100%; min-width: 760px; }
.tw-pm-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.tw-pm-acts { display: flex; gap: 8px; margin-left: auto; }
.tw-pm-ro th, .tw-pm-ro td { text-align: left; padding: 8px 10px; }

/* v3.44.0 two-column before/after (initial assessment + qualification page) */
.tw-cmp2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 12px 0 10px; }
.tw-cmp2-h { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted, #64748b); padding: 0 2px 2px; }
.tw-cmp2-h.with { color: #166534; }
.tw-cmp2-cell { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 10px 14px; background: #fff; min-height: 58px; box-sizing: border-box; }
.tw-cmp2-cell .k { font-size: 12px; color: var(--muted, #64748b); }
.tw-cmp2-cell .v { font-size: 16px; font-weight: 700; margin-top: 3px; color: var(--navy, #16305a); }
.tw-cmp2-cell .s { font-size: 12px; font-weight: 600; color: #166534; margin-top: 2px; }
.tw-cmp2-cell.with { background: #f6fdf8; border-color: #cfeedd; }
.tw-cmp2-cell.with.hero .v { color: #166534; }
@media (max-width: 640px) { .tw-cmp2 { gap: 6px 8px; } .tw-cmp2-cell .v { font-size: 14px; } }
/* qualification share page */
.tw-band2 { max-width: 760px; padding: 36px 40px !important; }
.tw-band2 .tw-band-hero { margin: 22px 0 18px; padding: 20px 24px; }
.tw-band2 .tw-band-strat2 { margin-top: 8px; font-size: 15px; color: #1f2937; }
.tw-band2 .tw-cmp2 { margin: 6px 0 22px; gap: 10px 16px; }
.tw-band2 .tw-cmp2-cell { padding: 14px 18px; min-height: 72px; }
.tw-band2 .tw-cmp2-cell .v { font-size: 19px; }
.tw-band-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 0 6px; border-top: 1px solid var(--line, #e5e7eb); }
.tw-band-cta span { font-size: 14px; color: var(--muted, #64748b); }
.tw-band2 .tw-cmp-disc { margin-top: 14px; }
/* compact event bar + list */
.tw-evbar { display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 14px; margin-top: 12px; border: 1px solid #bfd3f5; background: #eef4ff; border-radius: 10px; min-height: 40px; }
.tw-evbar .dot, .tw-evrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue, #2563eb); flex: 0 0 8px; }
.tw-evbar .t { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tw-evbar .w { font-size: 12px; color: var(--muted, #64748b); white-space: nowrap; }
.tw-evbar-more { font-size: 13px; font-weight: 600; white-space: nowrap; }
.tw-evbar .acts { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tw-evlist { max-height: 60vh; overflow-y: auto; }
.tw-evrow { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid #eef1f5; }
.tw-evrow .grow { flex: 1; min-width: 0; }
.tw-modal.tw-modal-mid { max-width: 760px; }
/* people editor remove */
.tw-pm-table th.tw-pm-x, .tw-pm-table td.tw-pm-x { width: 44px; text-align: center; }
.tw-pm-del { width: 32px; height: 32px; border-radius: 8px; border: 1px solid #f3c2c2; background: #fff; color: #b91c1c; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.tw-pm-del:hover { background: #fef2f2; border-color: #e99; }
.tw-pm-del.undo { color: var(--navy, #16305a); border-color: var(--line, #e5e7eb); }
tr.tw-pm-removing td:not(.tw-pm-x) { opacity: .45; }
tr.tw-pm-removing .tw-input { text-decoration: line-through; }
/* activity */
.tw-modal.tw-modal-tall .tw-modal-body { height: 78vh; display: flex; flex-direction: column; }
.tw-act { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.tw-act-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.tw-act-list { flex: 1; overflow-y: auto; padding-right: 6px; }
.tw-act-day { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #64748b); margin: 16px 0 6px; }
.tw-act-row { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f0f2f6; }
.tw-act-row .grow { flex: 1; min-width: 0; }
.tw-act-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: 0 0 10px; background: #94a3b8; }
.tw-act-row.k-stage .tw-act-dot { background: var(--blue, #2563eb); }
.tw-act-row.k-note .tw-act-dot { background: #16a34a; }
.tw-act-t { font-weight: 600; font-size: 14px; }
.tw-act-b { font-size: 13.5px; margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; color: #334155; }
/* detailed analysis */
.tw-modal-ov:has(.tw-modal-xxl) { padding-top: 2.5vh; }
.tw-av-taxgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; margin-top: 14px; }
@media (max-width: 900px) { .tw-av-taxgrid { grid-template-columns: 1fr; } }
.tw-av-sum { padding: 0 !important; margin: 8px 0 4px; }
.tw-av-lfcard { max-width: none !important; width: 100% !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; }
.tw-band-cta .tw-btn { text-decoration: none; }
.tw-pm-del[hidden] { display: none !important; }

/* v3.45.0 detailed analysis: grouped cards, Close button */
.tw-modal-x.tw-modal-close { font-size: 13px; line-height: 1.2; font-weight: 600; color: var(--navy, #16305a); border: 1px solid var(--line, #d9dee7); background: #fff; border-radius: 999px; padding: 7px 16px; }
.tw-modal-x.tw-modal-close:hover { background: #f5f7fb; }
.tw-av-kpis { margin: 4px 0 18px; }
.tw-av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px 18px; align-items: start; }
@media (max-width: 960px) { .tw-av-grid { grid-template-columns: 1fr; } }
.tw-av-sect-h { grid-column: 1 / -1; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy, #16305a); margin: 10px 0 -4px; padding-bottom: 6px; border-bottom: 2px solid var(--navy, #16305a); }
.tw-av-sect-h:first-child { margin-top: 0; }
.tw-av-card { border: 1px solid var(--line, #e3e7ee); border-radius: 12px; background: #fff; overflow: hidden; }
.tw-av-card-h { background: #eef1f6; border-bottom: 1px solid #dde2ea; padding: 9px 14px; font-weight: 700; font-size: 13.5px; color: var(--navy, #16305a); }
.tw-av-card-b { padding: 6px 14px 10px; }
.tw-av-card .tw-av-kv { padding: 7px 0; border-top: 1px solid #f0f2f6; font-size: 13.5px; }
.tw-av-card .tw-av-kv:first-child { border-top: 0; }
.tw-av-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tw-av-t thead th { background: #f7f8fb; color: var(--muted, #64748b); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 7px 14px; text-align: right; border-bottom: 1px solid #e6e9ef; }
.tw-av-t thead th:first-child { text-align: left; }
.tw-av-t td { padding: 7px 14px; border-bottom: 1px solid #f0f2f6; vertical-align: top; }
.tw-av-t td:nth-child(n+2) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 24%; }
.tw-av-t tr:last-child td { border-bottom: 0; }
.tw-av-t tr.t td { font-weight: 700; background: #fafbfd; border-top: 1px solid #dde2ea; }
.tw-av-nil { color: #b6bdc9; }
.tw-av-strat { margin-bottom: 28px; }
.tw-av-strat-h { font-size: 16px; font-weight: 700; color: var(--navy, #16305a); padding: 10px 14px; background: #eef1f6; border-radius: 10px; margin-bottom: 12px; }
.tw-modal-xxl .tw-modal-body { padding-left: 28px; padding-right: 28px; }

/* v3.46.0 detailed analysis: centred over the content area, full scroll, room at the bottom */
.tw-modal-ov:has(.tw-modal-xxl) { align-items: flex-start; justify-content: center; padding: 2.5vh 24px 0; box-sizing: border-box; }
@media (min-width: 900px) { .tw-modal-ov:has(.tw-modal-xxl) { padding-left: calc(248px + 24px); } }
.tw-modal.tw-modal-xxl { width: 100%; max-width: 1400px; max-height: 95vh; display: flex; flex-direction: column; box-sizing: border-box; }
.tw-modal-xxl .tw-modal-head { flex: 0 0 auto; }
.tw-modal-xxl .tw-modal-body { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; padding-bottom: 48px; }
.tw-av-wide { grid-column: 1 / -1; }
.tw-av-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tw-av-split > .tw-av-t + .tw-av-t { border-left: 1px solid #e6e9ef; }
@media (max-width: 900px) { .tw-av-split { grid-template-columns: 1fr; } .tw-av-split > .tw-av-t + .tw-av-t { border-left: 0; } }
.tw-av-desc { margin-bottom: 16px; }
.tw-av-desc .tw-av-card-b { padding: 10px 14px 12px; min-height: 20px; font-size: 14px; white-space: pre-wrap; }

/* v3.46.1 deal header: compact */
.tw-mb-card.tw-mb-strip { padding: 12px 20px; }
.tw-mb-strip .tw-mb-strip-row { align-items: center; gap: 14px; }
.tw-mb-strip .tw-mb-title { font-size: 21px; line-height: 1.2; }
.tw-mb-strip .tw-mb-descline { margin-top: 1px; font-size: 13.5px; }
.tw-mb-strip .tw-mb-head-right { flex-direction: row; align-items: center; gap: 8px; }
.tw-mb-strip .tw-evbar { margin-top: 10px; }
/* v3.46.2 people column: Edit links flush left; empty client team */
.tw-mb-p-editrow { margin: 6px 0 0 42px; margin-left: 0 !important; }
.tw-mb-p-none { color: var(--muted, #64748b); font-weight: 500; }
/* v3.46.3 people editors: headers line up with the left edge of their inputs */
/* v3.46.3 people editors: headers line up with the left edge of their inputs */
.tw-pm-table thead th { text-align: left; padding-left: 16px; }
.tw-pm-table thead th.tw-pm-prim, .tw-pm-table thead th.tw-pm-x { text-align: center; padding-left: 0; }
/* v3.53.00: agreement assent, receipts, W-9 */
.tw-agree-scope { background: #eef4fd; border: 1px solid #cfe0f7; border-radius: 6px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; color: #1e3a5f; }
.tw-agree-md { border: 1px solid #e3e8ee; border-radius: 6px; padding: 12px 14px; background: #fbfcfe; }
.tw-agree-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; margin: 12px 0 8px; color: #22303f; cursor: pointer; }
.tw-agree-check input { margin-top: 3px; flex: none; }
.tw-agree-sig { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); max-width: 360px; }
.tw-agree-sig input { padding: 9px 11px; border: 1px solid #d5dce5; border-radius: 6px; font: inherit; font-size: 15px; font-family: 'Brush Script MT', 'Segoe Script', cursive, inherit; }
.tw-agree-sig input:disabled, .tw-agree-check input:disabled + span { opacity: .55; }
.tw-receipt { display: grid; gap: 6px; font-size: 13px; margin-bottom: 12px; }
.tw-receipt > div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.tw-receipt span { color: var(--muted); font-size: 12px; }
.tw-receipt code { font-size: 11.5px; word-break: break-all; }
.tw-comp { max-width: 860px; }
.tw-comp-intro { font-size: 13.5px; color: #4a5a6c; line-height: 1.55; margin: 4px 0 14px; }
.tw-comp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tw-comp-table th, .tw-comp-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #eef1f5; }
.tw-comp-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tw-comp-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tw-w9-cur { border: 1px solid #e3e8ee; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; font-size: 13.5px; background: #fff; }
.tw-w9-cur.s-verified { border-color: #bfe3cc; background: #f2fbf5; } .tw-w9-cur.s-rejected { border-color: #f0c2c2; background: #fdf2f2; } .tw-w9-cur.s-submitted { border-color: #f1d4a8; background: #fff8ee; }
.tw-w9-up { border: 1px dashed #d5dce5; border-radius: 8px; padding: 14px; }
.tw-w9-file { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.tw-modal:has(.tw-agree) { max-width: 720px; }
.tw-modal:has(.tw-agree) .tw-modal-body { max-height: 86vh; overflow-y: auto; }
.tw-agree .tw-agree-md { max-height: 42vh; }
/* v3.53.13: analysis steps, Back / Next at the top of each modal */
.tw-av-nav { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* v3.56.1 analysis viewer header: name, step and description left; status, tax year,
   Back and Next on the same row; no Income/Results pills. */
.tw-anlfull-crumbrow { display: flex; align-items: center; justify-content: space-between; padding: 8px 18px 0; background: #fff; }
.tw-anlv-head { cursor: pointer; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 8px 18px 14px; background: #fff; border-bottom: 1px solid rgba(16, 35, 63, .1); flex-wrap: wrap; text-align: left; }
.tw-anlv-titles { min-width: 0; flex: 1 1 420px; }
.tw-anlv-name { font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #5f6c80; }
.tw-anlv-titles h3 { margin: 2px 0 4px; font-size: 18px; font-weight: 800; color: var(--navy, #10233f); text-align: left; }
.tw-anlv-titles .tw-hint { margin: 0; text-align: left; }
.tw-anlv-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 4px; }

/* v3.56.1 Proposal: compare and propose, then the band or the full analysis */
.tw-prop-h { text-align: left; margin: 6px 0 12px; }
.tw-prop-h h3 { margin: 0 0 4px; font-size: 17px; font-weight: 800; color: var(--navy, #10233f); }
.tw-prop-h .tw-hint { margin: 0; }
.tw-prop-pick { margin-bottom: 18px; }
.tw-prop-band .tw-share-card { max-width: 900px; }

/* v3.56.1 deal tabs: four groups with their tabs underneath */
.tw-dgroups { display: flex; gap: 4px; border-bottom: 1px solid rgba(16, 35, 63, .12); margin: 14px 0 0; }
.tw-dgroups button { border: 0; background: none; padding: 10px 16px; font-weight: 800; font-size: 14px; color: #5f6c80; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tw-dgroups button.on { color: var(--navy, #10233f); border-bottom-color: #2563eb; }
.tw-dtabs.tw-dtabs-sub { margin-top: 8px; }
.tw-anlv-actions [hidden], .tw-dtabs button[hidden] { display: none !important; }
.tw-dtabs[hidden] { display: none !important; }

/* v3.56.3 deal header: adviser without outline; deal name edits in place */
.tw-advseat { gap: 8px; border-radius: 999px; font-size: 13px; border: 0 !important; padding: 0 !important; background: none !important; }
.tw-dd-name { font-size: 18px !important; font-weight: 800 !important; color: var(--navy, #10233f); border: 1px solid transparent !important; background: transparent !important; padding: 2px 6px !important; margin-left: -7px; width: min(560px, 100%); box-shadow: none !important; }
.tw-dd-name:hover { border-color: rgba(16, 35, 63, .18) !important; background: #fff !important; }
.tw-dd-name:focus { border-color: #2563eb !important; background: #fff !important; outline: none; }

/* v3.57.0 Workspace > Sharing */
.tw-sh-views { font-size: 12.5px; line-height: 1.5; }
.tw-sh-act { margin: 0; }
.tw-sh-chk { display: flex; align-items: baseline; gap: 8px; margin: 6px 0; font-size: 14px; cursor: pointer; }
.tw-sh-chk input { margin: 0; }
.tw-sh-table th, .tw-sh-act th { text-align: left; }

/* v3.58.0 in-context share bar and Sharing summary */
.tw-shbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin: 8px 0 12px; border: 1px solid var(--line, #e7ebf1); border-radius: 10px; background: #f8fafc; }
.tw-shbar-l { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #5f6c80; }
.tw-shbar-acts { margin-left: auto; display: flex; gap: 6px; }
.tw-sh-sum { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.tw-sh-sum > div { border: 1px solid var(--line, #e7ebf1); border-radius: 10px; padding: 10px 12px; background: #fff; }
.tw-sh-sum b { display: block; font-size: 20px; color: var(--navy, #10233f); }
.tw-sh-sum span { font-size: 12px; color: #5f6c80; }
@media (max-width: 760px) { .tw-sh-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Workspace access manager (v3.61.0) */
.tw-modal.tw-modal-xl { max-width: 1120px; width: calc(100vw - 48px); max-height: calc(100vh - 48px); display: flex; flex-direction: column; }
.tw-modal.tw-modal-xl .tw-modal-body { overflow: auto; }
.tw-am-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; background: #f6f8fc; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.tw-am-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tw-am-pick .tw-linklike { padding: 2px 0; font-weight: 600; }
.tw-am-count { font-size: 12.5px; font-weight: 700; color: var(--navy, #10233f); padding-left: 8px; border-left: 1px solid var(--line); }
.tw-am-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.tw-am-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.tw-am-table { width: 100%; margin: 0; border-collapse: collapse; }
.tw-am-table th, .tw-am-table td { vertical-align: middle; padding: 10px 12px; text-align: left; white-space: nowrap; }
.tw-am-table thead th { background: #fafbfd; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #5b6b82; }
.tw-am-table tbody tr + tr td { border-top: 1px solid var(--line); }
.tw-am-table tr.is-sel td { background: #f3f7ff; }
.tw-am-table tr.is-dirty td:first-child { box-shadow: inset 3px 0 0 #2f6fed; }
.tw-am-sel { width: 36px; }
.tw-am-email { color: #46566d; }
.tw-am-switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; font-weight: 600; }
.tw-am-pwbox { display: flex; gap: 6px; align-items: center; }
.tw-am-pwbox .amPw { width: 190px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; }
.tw-am-note { font-size: 11.5px; color: #2f6fed; min-height: 14px; margin-top: 3px; white-space: normal; }
.tw-am-note.is-err { color: #b91c1c; }
.tw-am-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.tw-am-pending { font-weight: 700; }
.tw-am-code { font-family: ui-monospace, Menlo, Consolas, monospace; background: #f3f5f9; padding: 3px 8px; border-radius: 6px; }
@media (max-width: 720px) { .tw-modal.tw-modal-xl { width: calc(100vw - 16px); } .tw-am-pwbox .amPw { width: 140px; } }
.tw-am-pwbox .amPw::placeholder { font-family: inherit; letter-spacing: 0; color: #8a97ab; }

/* v3.62.0: agreement gate and agreement documents */
body.tw-gated > *:not(.tw-modal-ov) { filter: blur(3px); pointer-events: none; user-select: none; }
.tw-modal.tw-modal-agree { display: flex; }
.tw-agree-top { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.tw-agree-step { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #a17a24; }
.tw-agree-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.tw-agree-steps span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #f1f4f8; color: #6b7787; }
.tw-agree-steps span.on { background: #10416a; color: #fff; }
.tw-agree-steps span.done { background: #e7f5ee; color: #17663f; }
.tw-agree-parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 18px; padding: 12px 14px; border: 1px solid #e3e8ee; border-radius: 8px; background: #fff; margin-bottom: 12px; }
.tw-agree-parties div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tw-agree-parties span { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7787; }
.tw-agree-parties b { font-size: 13px; font-weight: 600; color: #1d2b3a; overflow-wrap: anywhere; }
.tw-agree-gate .tw-agree-md, .tw-modal-agree .tw-agree-md { max-height: 52vh; overflow-y: auto; padding: 22px 26px; font-family: Georgia, 'Times New Roman', serif; }
.tw-modal-agree .tw-agree-md h3 { font-family: inherit; font-size: 19px; text-align: center; margin: 0 0 16px; }
.tw-modal-agree .tw-agree-md h4 { font-family: inherit; font-size: 14.5px; margin: 18px 0 8px; }
.tw-modal-agree .tw-agree-md p { font-size: 14px; line-height: 1.6; color: #22303f; }
.tw-agree-md .ag-li { display: flex; gap: 8px; }
.tw-agree-md .ag-li.ag-sub { padding-left: 26px; }
.tw-agree-md .ag-mk { flex: none; min-width: 22px; font-weight: 700; color: #10416a; }
.tw-agree-end { margin-top: 18px; padding-top: 10px; border-top: 1px dashed #cfd7e2; text-align: center; font: 600 11.5px/1.4 -apple-system, 'Segoe UI', Roboto, sans-serif; color: #6b7787; letter-spacing: .04em; text-transform: uppercase; }
.tw-agree-progress { height: 4px; background: #eef1f5; border-radius: 4px; overflow: hidden; margin-top: 8px; }
.tw-agree-progress i { display: block; height: 100%; width: 0; background: #c9a24a; transition: width .15s ease; }
.tw-agree-progress.done i { background: #17663f; }
.tw-agree-hint { font-size: 12px; color: #9a5b13; margin: 6px 0 0; display: flex; justify-content: space-between; }
.tw-agree-sign { margin-top: 12px; padding: 14px 16px; border: 1px solid #cfe0f7; background: #f5f9ff; border-radius: 8px; }
.tw-agree-stampnote { font-size: 12px; color: #6b7787; margin-top: 10px; line-height: 1.45; }
.tw-agree-gate .tw-agree-actions { align-items: center; }
.tw-comp-acts { white-space: nowrap; text-align: right; }
.tw-comp-acts .tw-btn + .tw-btn { margin-left: 6px; }
.tw-agree [hidden] { display: none !important; }
.tw-modal-ov:has(.tw-modal-agree), .tw-modal-ov:has(.tw-modal-xl) { padding: 24px 16px; align-items: center; }
.tw-modal.tw-modal-agree { max-width: 860px; width: calc(100vw - 32px); flex-direction: column; height: calc(100vh - 48px); max-height: 980px; }
.tw-modal.tw-modal-agree .tw-modal-body { overflow-y: auto; max-height: none; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.tw-modal-agree .tw-agree { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.tw-modal-agree .tw-agree .tw-agree-md { flex: 1 1 auto; min-height: 160px; max-height: none; }
.tw-modal-agree .tw-agree > :not(.tw-agree-md) { flex: none; }

/* v3.62.0: Sharing hub layout */
.tw-sh { font-size: 13.5px; color: #1d2b3a; }
.tw-sh-intro { font-size: 13.5px; color: #5f6c80; line-height: 1.5; margin: 0 0 14px; max-width: 900px; }
.tw-sh-warn { font-size: 13px; color: #92400e; background: #fff8eb; border: 1px solid #f6dfb4; border-radius: 8px; padding: 9px 12px; margin: 0 0 12px; }
.tw-sh-group { border: 1px solid var(--line, #e7ebf1); border-radius: 12px; background: #fff; margin: 0 0 14px; overflow: hidden; }
.tw-sh-gh { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line, #e7ebf1); background: #fafbfd; flex-wrap: wrap; }
.tw-sh-gt { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--navy, #10233f); }
.tw-sh-gc { font-size: 12px; color: #6b7787; margin-left: 10px; }
.tw-sh-mode { font-size: 13px; color: #46566d; }
.tw-sh-empty { padding: 14px 16px; font-size: 13px; color: #6b7787; }
.tw-sh-table { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0; }
.tw-sh-table col.c-item { width: 32%; } .tw-sh-table col.c-st { width: 15%; } .tw-sh-table col.c-who { width: 17%; } .tw-sh-table col.c-v { width: 15%; } .tw-sh-table col.c-act { width: 21%; }
.tw-sh-table th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6b7787; padding: 9px 16px; border-bottom: 1px solid var(--line, #e7ebf1); background: #fff; }
.tw-sh-table td { padding: 12px 16px; vertical-align: middle; font-size: 13.5px; border-top: 1px solid #f0f2f6; overflow-wrap: anywhere; }
.tw-sh-table tbody tr:first-child td { border-top: 0; }
.tw-sh-name { font-weight: 600; font-size: 14px; color: #1d2b3a; }
.tw-sh-sub { font-size: 12.5px; color: #6b7787; margin-top: 2px; line-height: 1.4; }
.tw-sh-who, .tw-sh-views { font-size: 12.5px; color: #46566d; line-height: 1.45; }
.tw-sh-dash { color: #a3adbb; }
.tw-sh-acts { text-align: right; white-space: nowrap; }
.tw-sh-acts .tw-btn { margin-left: 6px; }
.tw-sh-table .tw-stage { white-space: nowrap; }
.tw-sh-when { color: #6b7787; white-space: nowrap; }
.tw-sh-act td { padding: 9px 16px; }
.tw-sh-actwrap { max-height: 360px; overflow-y: auto; border: 0; border-radius: 0; }
.tw-sh-act thead th { position: sticky; top: 0; z-index: 1; }
.tw-modal.tw-modal-share { max-width: 600px; }
.tw-shm-sec { padding: 12px 0; border-bottom: 1px solid #eef1f5; }
.tw-shm-sec:first-child { padding-top: 0; }
.tw-shm-h { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7787; margin-bottom: 6px; }
.tw-shm .tw-modal-actions { margin-top: 14px; }
.tw-shm [hidden] { display: none !important; }
@media (max-width: 900px) { .tw-sh-table col.c-who, .tw-sh-table col.c-v { width: 0; } .tw-sh-table td:nth-child(3), .tw-sh-table td:nth-child(4), .tw-sh-table th:nth-child(3), .tw-sh-table th:nth-child(4) { display: none; } }
.tw-sh-acts .tw-btn:disabled { background: #eef1f5 !important; color: #8a97ab !important; border-color: #e3e8ee !important; box-shadow: none !important; cursor: not-allowed; }
.tw-shm textarea { box-sizing: border-box; max-width: 100%; }
/* v3.62.3: deal name lines up with the description box below it (box edge and text) */
.tw-dd-head .tw-input.tw-dd-name { margin-left: 0 !important; padding: 4px 11px !important; box-sizing: border-box; border-radius: 11px !important; }
.tw-dd-head .tw-dd-meta { padding-left: 12px; }
/* v3.62.4: qualification answers, sale and income side by side */
.tw-pq-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 12px; }
.tw-pq-card { border: 1px solid var(--line, #e3e8ee); border-radius: 12px; padding: 12px 14px 4px; background: #fff; display: flex; flex-direction: column; gap: 2px; }
.tw-pq-card-h { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy, #10233f); margin-bottom: 6px; }
.tw-pq-card-h span { font-weight: 500; text-transform: none; letter-spacing: 0; color: #6b7787; margin-left: 6px; }
.tw-pq-card .tw-form-2 { gap: 10px; }
.tw-pq-card > .tw-muted-sm { margin: 4px 0 10px; line-height: 1.45; }
@media (max-width: 720px) { .tw-pq-two { grid-template-columns: 1fr; } }
.tw-wiz-note { font-size: 13px; color: #92400e; background: #fff8eb; border: 1px solid #f6dfb4; border-radius: 8px; padding: 9px 12px; margin: 8px 0; text-align: left; }
/* v3.62.8: client / client's team editor: wide, centered, every field readable */
.tw-modal.tw-modal-people { max-width: 1560px; width: calc(100vw - 64px); }
.tw-modal-ov:has(.tw-modal-people) { padding: 24px; align-items: center; }
.tw-modal-people .tw-modal-body { max-height: calc(100vh - 140px); overflow-y: auto; }
.tw-modal-people .tw-pm-table { min-width: 1180px; }
.tw-modal-people .tw-pm-table[hidden] { display: none; }
.tw-pm-client th.c-salutation { width: 9%; } .tw-pm-client th.c-first_name, .tw-pm-client th.c-last_name { width: 11%; }
.tw-pm-client th.c-phone { width: 12%; } .tw-pm-client th.c-marital_status { width: 10%; } .tw-pm-client th.c-birthdate { width: 11%; }
.tw-pm-client th.c-email { width: 21%; } .tw-pm-client th.c-relationship { width: 12%; }
.tw-pm-team th.c-first_name, .tw-pm-team th.c-last_name { width: 14%; } .tw-pm-team th.c-team_role { width: 13%; }
.tw-pm-team th.c-company { width: 18%; } .tw-pm-team th.c-email { width: 24%; } .tw-pm-team th.c-phone { width: 14%; }
.tw-pm-empty { padding: 18px 16px; font-size: 13.5px; color: #6b7787; border: 1px dashed #d5dce5; border-radius: 10px; text-align: center; }
