:root {
  color-scheme: light;
  --ink: #151515;
  --muted: #6f7378;
  --line: #e4e0da;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --charcoal: #23201d;
  --orange: #ff6f1f;
  --amber: #f1a51f;
  --gold: #f7c948;
  --ember: #c8291e;
  --ember-soft: #fff2e2;
  --green: #14795b;
  --red: #b8262b;
  --status-green: #0f8f6d;
  --status-yellow: #f3c45f;
  --status-red: #ec9187;
  --status-track: #e8dfd2;
  --shadow: 0 18px 50px rgba(26, 22, 18, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

body.auth-check-pending .app-shell,
body.auth-check-pending .toast,
body.auth-check-pending .modal-backdrop,
body.workspace-loading .app-shell,
body.workspace-loading .toast,
body.workspace-loading .modal-backdrop {
  visibility: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 28px 20px;
  background: var(--charcoal);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.brand img {
  width: min(100%, 210px);
  max-height: 82px;
  height: auto;
  object-fit: contain;
}

.brand-text-fallback {
  max-width: 210px;
  color: #fff;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.05;
  text-decoration: none;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 8px;
  padding: 0 6px;
  border: 1px solid rgba(176, 222, 210, 0.55);
  border-radius: 999px;
  background: #e7f6f1;
  color: #0f7f63;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.nav-count-badge::before {
  content: none;
}

.nav-count-badge::after {
  content: none;
}

.nav-count-badge[hidden] {
  display: none;
}

.nav-item:hover .nav-count-badge,
.nav-item.active .nav-count-badge {
  border-color: rgba(247, 211, 106, 0.45);
  background: #fff7d6;
  color: #5b4613;
}

.advisor-mode .nav-item[data-client-hidden] {
  color: #f7d36a;
}

.advisor-firm-mode .nav-item[data-section="overview"],
.advisor-firm-mode .nav-item[data-section="overview"].active {
  color: #f7d36a;
}

.advisor-client-mode .nav-item[data-section="households"] {
  color: #f7d36a;
}

.platform-mode .nav-item[data-platform-only] {
  color: #f7d36a;
}

.advisor-mode .nav-item[data-client-hidden]:hover,
.advisor-mode .nav-item[data-client-hidden].active {
  border-color: rgba(247, 201, 72, 0.28);
  background: rgba(247, 201, 72, 0.12);
  color: #fff7d6;
}

.platform-mode .nav-item[data-platform-only]:hover,
.platform-mode .nav-item[data-platform-only].active {
  border-color: rgba(247, 201, 72, 0.28);
  background: rgba(247, 201, 72, 0.12);
  color: #fff7d6;
}

.security-card {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.sidebar-footer .client-referral-button,
.sidebar-footer .advisor-sidebar-button {
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1;
}

.sidebar-footer .client-referral-button,
.sidebar-footer .advisor-referral-button {
  border-color: rgba(247, 201, 72, 0.42);
  background: rgba(247, 201, 72, 0.16);
  color: #fff;
}

.sidebar-footer .client-guidance-button {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-color: rgba(247, 201, 72, 0.58);
  background: linear-gradient(135deg, rgba(247, 201, 72, 0.22), rgba(255, 111, 31, 0.16));
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.18;
  white-space: normal;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.sidebar-footer .client-guidance-button:hover {
  border-color: rgba(247, 201, 72, 0.72);
  background: linear-gradient(135deg, rgba(247, 201, 72, 0.28), rgba(255, 111, 31, 0.22));
}

.security-card strong,
.security-card span {
  display: block;
}

.security-card span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  line-height: 1.4;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: #43d18e;
  box-shadow: 0 0 0 4px rgba(67, 209, 142, 0.16);
}

.workspace {
  position: relative;
  min-width: 0;
  padding: 30px;
}

.topbar,
.section-heading,
.panel-header,
.top-actions,
.button-group,
.note-actions {
  display: flex;
  align-items: center;
}

.topbar {
  position: relative;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-right: 500px;
}

.top-actions {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 20;
  gap: 12px;
}

.client-guidance-topbar-button {
  flex: 0 0 auto;
  min-height: 42px;
  border-color: rgba(20, 121, 91, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.1), rgba(255, 255, 255, 0.96)),
    #fff;
  color: var(--green);
  padding: 0 16px;
  font-size: 0.86rem;
  font-weight: 500;
  box-shadow: 0 10px 24px rgba(26, 22, 18, 0.06);
  white-space: nowrap;
}

.client-guidance-topbar-button:hover,
.client-guidance-topbar-button:focus-visible {
  border-color: rgba(20, 121, 91, 0.36);
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.16), rgba(255, 255, 255, 0.98)),
    #fff;
  color: var(--green);
}

.client-view-parity-pill {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(180, 83, 9, 0.22);
  border-radius: 999px;
  background: #fff7ed;
  color: #92400e;
  padding: 0 12px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  box-shadow: 0 8px 20px rgba(26, 22, 18, 0.05);
  white-space: nowrap;
}

.client-view-parity-pill.ok {
  border-color: rgba(20, 121, 91, 0.2);
  background: #eefbf6;
  color: var(--green);
}

.client-view-parity-pill.checking {
  border-color: rgba(91, 109, 128, 0.2);
  background: #f1f5f9;
  color: #475569;
}

.client-view-parity-pill.critical {
  border-color: rgba(185, 28, 28, 0.24);
  background: #fff1f2;
  color: #991b1b;
}

.client-view-parity-pill:hover,
.client-view-parity-pill:focus-visible {
  transform: translateY(-1px);
}

.account-menu {
  position: relative;
  flex: 0 0 auto;
}

.notification-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(35, 32, 29, 0.16);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(26, 22, 18, 0.08);
}

.notification-bell svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-bell:hover,
.notification-bell[aria-expanded="true"] {
  border-color: rgba(247, 201, 72, 0.5);
  background: #fffaf0;
}

.notification-bell span {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  padding: 0 4px;
  font-size: 0.68rem;
  line-height: 1;
}

.account-menu-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(35, 32, 29, 0.16);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(26, 22, 18, 0.08);
  font: inherit;
  font-weight: 650;
}

.account-menu-toggle:hover,
.account-menu-toggle[aria-expanded="true"] {
  border-color: rgba(247, 201, 72, 0.5);
  background: #fffaf0;
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  width: 230px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 48px rgba(26, 22, 18, 0.16);
}

.account-menu-summary {
  display: grid;
  gap: 2px;
  padding: 8px 8px 10px;
  border-bottom: 1px solid var(--line);
}

.account-menu-summary strong {
  color: var(--ink);
  font-weight: 500;
}

.account-menu-summary span {
  color: var(--muted);
  font-size: 0.78rem;
}

.account-menu-item {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  padding: 0 10px;
  text-align: left;
  font: inherit;
  font-weight: 500;
}

.account-menu-item:hover {
  border-color: var(--line);
  background: #fbfaf7;
}

.notification-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(470px, 100vw);
  height: 100vh;
  background: #050505;
  color: #fff;
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.32);
}

.notification-drawer-header,
.notification-drawer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 26px;
}

.notification-drawer-header {
  min-height: 82px;
}

.notification-drawer-header h2 {
  font-size: 1.35rem;
}

.notification-drawer-header button,
.notification-drawer-controls button,
.notification-settings-back {
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
}

.notification-drawer-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #fff;
}

.notification-drawer-icon:hover,
.notification-drawer-controls button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.notification-drawer-controls {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: 14px;
}

.notification-filter-select {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: #111;
  color: #fff;
  padding: 0 14px;
  font: inherit;
}

.notification-mark-read {
  min-height: 38px;
  border-radius: 999px !important;
  padding: 0 12px;
}

.notification-list {
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px 26px 30px;
}

.notification-card {
  display: grid;
  gap: 14px;
  border-radius: 5px;
  background: #4a4a4a;
  color: #e9e9e9;
  padding: 18px 20px;
}

.notification-card.read {
  opacity: 0.72;
}

.notification-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f5f5f5;
  font-weight: 600;
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4463ff;
}

.notification-card.read .notification-dot {
  background: #777;
}

.notification-card p {
  margin: 0;
  color: #d6d6d6;
  line-height: 1.45;
}

.notification-card small {
  color: #d6d6d6;
  white-space: nowrap;
}

.notification-empty {
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.72);
  padding: 26px;
  text-align: center;
}

.notification-settings {
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 0;
  padding: 18px 26px 34px;
}

.notification-settings h2 {
  margin: 34px 0 28px;
  font-size: 1.55rem;
}

.notification-settings-section,
.notification-setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 18px 0;
}

.notification-settings-section {
  color: #fff;
  font-weight: 600;
}

.notification-setting-row strong {
  display: block;
  margin-bottom: 6px;
  color: #f6f6f6;
  font-weight: 600;
}

.notification-setting-row small {
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.45;
}

.notification-setting-row input {
  width: 18px;
  height: 18px;
  accent-color: #fff;
}

.topbar-title {
  display: grid;
  flex: 1 1 auto;
  gap: 8px;
  min-width: 0;
}

.page-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.page-title-avatar {
  display: none;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(54px, 6vw, 72px);
  height: clamp(54px, 6vw, 72px);
  overflow: hidden;
  border: 1px solid rgba(20, 121, 91, 0.28);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(20, 121, 91, 0.1), rgba(247, 201, 72, 0.12));
  color: #0f5e46;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(26, 22, 18, 0.08);
}

.page-title-avatar.visible {
  display: grid;
}

.page-title-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
}

.page-subtitle {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.onboarding-active .mode-switch {
  display: none;
}

.onboarding-active .nav-list {
  opacity: 0.46;
}

.onboarding-active .nav-item {
  cursor: not-allowed;
}

.onboarding-active .nav-item.active {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.onboarding-panel {
  display: grid;
  gap: 16px;
  margin: -4px 0 24px;
  padding: 18px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.1), rgba(255, 255, 255, 0.96) 48%),
    #fff;
  box-shadow: var(--shadow);
}

.onboarding-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.onboarding-actions,
.onboarding-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 36px rgba(31, 27, 24, 0.12);
}

.onboarding-bottom-actions {
  margin-top: 24px;
}

.onboarding-goals-step .onboarding-panel > .onboarding-actions,
.onboarding-goals-step #goals.active > .section-heading {
  display: none;
}

.onboarding-main h2 {
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.onboarding-main p:last-child,
.onboarding-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.onboarding-step-count {
  flex: 0 0 auto;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  font-size: 0.84rem;
}

.onboarding-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.onboarding-step {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  padding: 0 10px;
  text-align: left;
}

.onboarding-step span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f2eee7;
  color: var(--muted);
  font-size: 0.76rem;
}

.onboarding-step.active {
  border-color: rgba(20, 121, 91, 0.26);
  background: #edf8f4;
  color: var(--ink);
}

.onboarding-step.locked {
  cursor: not-allowed;
  opacity: 0.55;
}

.onboarding-step.complete span {
  background: rgba(20, 121, 91, 0.12);
  color: var(--green);
}

.onboarding-detail {
  display: grid;
  gap: 12px;
}

.onboarding-profile-card,
.onboarding-goal-picker {
  display: grid;
  gap: 12px;
}

.onboarding-profile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.onboarding-profile-summary span,
.onboarding-profile-summary small,
.onboarding-checklist small {
  color: var(--muted);
  font-size: 0.78rem;
}

.onboarding-profile-summary small {
  display: block;
  margin-top: 4px;
  line-height: 1.35;
}

.onboarding-profile-summary strong,
.onboarding-checklist strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
}

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

.onboarding-checklist button,
.onboarding-goal-picker label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 0.88rem;
  text-align: left;
}

.onboarding-checklist i {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 1px solid #d8d1c8;
  border-radius: 999px;
  color: var(--green);
  font-style: normal;
  font-size: 0.72rem;
}

.onboarding-checklist button:hover {
  border-color: rgba(200, 41, 30, 0.18);
  background: #fffaf4;
}

.onboarding-checklist button.complete {
  border-color: rgba(20, 121, 91, 0.2);
  background: #f4fbf8;
}

.onboarding-checklist button.complete i {
  border-color: rgba(20, 121, 91, 0.28);
  background: rgba(20, 121, 91, 0.1);
}

.onboarding-checklist button.missing {
  border-color: rgba(184, 38, 43, 0.24);
  background: #fff8f6;
}

.onboarding-checklist button.missing i {
  border-color: rgba(184, 38, 43, 0.26);
  background: rgba(184, 38, 43, 0.08);
  color: var(--red);
}

.onboarding-checklist button.waived {
  border-color: rgba(35, 32, 29, 0.1);
  background: #fff;
  color: var(--muted);
}

.onboarding-checklist button.waived i {
  border-color: rgba(35, 32, 29, 0.12);
  background: #f6f4ef;
  color: var(--muted);
}

.advisor-onboarding-controls {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(247, 201, 72, 0.26);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(247, 201, 72, 0.08), rgba(255, 255, 255, 0.92) 52%),
    #fff;
  padding: 14px;
}

.advisor-onboarding-controls-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.advisor-onboarding-controls-header span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.advisor-onboarding-controls-header strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-weight: 500;
}

.advisor-onboarding-controls-header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.advisor-onboarding-shortcuts {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.advisor-requirement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.advisor-requirement-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}

.advisor-requirement-toggle.current {
  border-color: rgba(20, 121, 91, 0.26);
}

.advisor-requirement-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.advisor-requirement-toggle strong {
  display: block;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 500;
}

.advisor-requirement-toggle small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.advisor-requirement-toggle em {
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  padding: 4px 8px;
  font-size: 0.7rem;
  font-style: normal;
  white-space: nowrap;
}

.advisor-requirement-toggle.waived em {
  background: #f3f0eb;
  color: var(--muted);
}

.onboarding-goal-picker input {
  accent-color: var(--ember);
}

.onboarding-goal-picker label {
  align-items: flex-start;
}

.onboarding-goal-picker label.selected {
  border-color: rgba(20, 121, 91, 0.28);
  background: #f4fbf8;
}

.onboarding-goal-picker label > span {
  display: grid;
  gap: 3px;
}

.onboarding-goal-picker strong {
  color: var(--ink);
  font-weight: 500;
}

.onboarding-goal-picker small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
  line-height: 1.35;
}

.onboarding-guidance-card {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.onboarding-guidance-card span {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.onboarding-guidance-card strong {
  color: var(--ink);
  font-weight: 500;
}

.onboarding-guidance-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.onboarding-actions > div,
.onboarding-bottom-actions > div {
  display: flex;
  gap: 10px;
}

.onboarding-actions [data-onboarding-next],
.onboarding-bottom-actions [data-onboarding-next] {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: #fff;
}

.onboarding-actions.required-step,
.onboarding-bottom-actions.required-step {
  justify-content: flex-end;
}

.onboarding-field-missing input,
.risk-tolerance-row.onboarding-field-missing {
  border-color: rgba(184, 38, 43, 0.72);
  box-shadow: 0 0 0 3px rgba(184, 38, 43, 0.08);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.advisor-client-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  width: min(760px, 100%);
  margin: 0 0 4px;
  padding: 4px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(26, 22, 18, 0.06);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.advisor-client-search:focus-within {
  border-color: rgba(247, 201, 72, 0.52);
  background: #fff;
  box-shadow: 0 14px 34px rgba(26, 22, 18, 0.1);
}

.advisor-recent-households-button {
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 246, 241, 0.94)),
    #fff;
  color: #5f5851;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(26, 22, 18, 0.04);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.advisor-recent-households-button:hover,
.advisor-recent-households-button:focus-visible {
  border-color: rgba(20, 121, 91, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 248, 244, 0.94)),
    #fff;
  color: #14795b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 6px 14px rgba(20, 121, 91, 0.12);
  outline: 0;
  transform: translateY(-1px);
}

.advisor-recent-households-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.advisor-search-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.advisor-search-field::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid #8b8278;
  border-radius: 999px;
  transform: translateY(-58%);
  pointer-events: none;
}

.advisor-search-field::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 50%;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: #8b8278;
  transform: translateY(4px) rotate(45deg);
  transform-origin: left center;
  pointer-events: none;
}

.advisor-client-search input {
  min-height: 40px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 0 12px 0 42px;
  font: inherit;
  outline: 0;
}

.advisor-client-search input::placeholder {
  color: #7d766f;
}

.advisor-search-submit {
  flex: 0 0 auto;
  min-height: 38px;
  border-color: var(--charcoal);
  border-radius: 8px;
  background: var(--charcoal);
  color: #fff;
  padding: 0 16px;
  box-shadow: none;
}

.advisor-search-submit:hover {
  background: #151515;
  color: #fff;
}

.advisor-search-popover {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  max-height: min(430px, 70vh);
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(26, 22, 18, 0.16);
}

.advisor-search-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px 10px;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.advisor-search-popover-head span {
  color: var(--ink);
}

.advisor-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.advisor-search-result-row,
.advisor-search-recent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-radius: 9px;
}

.advisor-search-recent-row {
  position: relative;
  padding: 2px 4px;
}

.advisor-search-recent-row + .advisor-search-recent-row {
  margin-top: 4px;
  padding-top: 8px;
}

.advisor-search-recent-row + .advisor-search-recent-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  right: 8px;
  height: 1px;
  background: linear-gradient(90deg, rgba(35, 32, 29, 0.08), rgba(35, 32, 29, 0.03));
}

.advisor-search-recent-row:hover {
  background:
    linear-gradient(90deg, rgba(247, 201, 72, 0.08), rgba(255, 255, 255, 0) 72%),
    #fff;
}

.advisor-search-result-row .advisor-search-result,
.advisor-search-result.recent {
  justify-content: flex-start;
  padding-right: 4px;
}

.advisor-search-result:hover,
.advisor-search-result:focus-visible {
  background: rgba(247, 201, 72, 0.12);
  outline: 0;
}

.advisor-search-result span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.advisor-search-result strong,
.advisor-search-result-name,
.advisor-search-result small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advisor-search-result-name {
  color: var(--ink);
  font-weight: 400;
}

.advisor-search-result small,
.advisor-search-result em,
.advisor-search-empty {
  color: var(--muted);
  font-style: normal;
  font-size: 0.78rem;
}

.advisor-search-result em {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: 999px;
  background: rgba(244, 240, 232, 0.55);
}

.advisor-search-copy-id {
  min-width: 76px;
  min-height: 26px;
  margin-right: 6px;
}

.advisor-search-side-pills {
  display: grid;
  gap: 5px;
  justify-items: end;
  margin-right: 6px;
}

.advisor-search-side-pills .advisor-search-copy-id {
  margin-right: 0;
}

.advisor-search-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(20, 121, 91, 0.22);
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.advisor-search-status-pill.inactive {
  border-color: rgba(207, 151, 36, 0.28);
  background: #fff8e8;
  color: #8a5f00;
}

.advisor-search-copy-id.muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-style: normal;
  font-size: 0.74rem;
}

.advisor-search-empty {
  margin: 4px;
  padding: 18px 14px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.08;
}

h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

h3 {
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.top-actions,
.button-group,
.note-actions {
  gap: 10px;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(var(--mode-switch-count, 3), 1fr);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.mode-button {
  min-width: 82px;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.mode-button.active {
  background: var(--charcoal);
  color: #fff;
}

.primary-button,
.secondary-button,
.text-button,
.icon-button {
  min-height: 40px;
  border-radius: var(--radius);
  font-weight: 760;
}

.primary-button {
  border: 1px solid var(--charcoal);
  background: var(--charcoal);
  color: #fff;
  padding: 0 16px;
}

.primary-button:hover {
  background: #080706;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--ember);
  padding: 0;
}

.icon-button {
  width: 40px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ember);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.client-mode .overview-main-grid,
.client-mode .client-overview-secondary {
  grid-template-columns: minmax(0, 1fr);
}

.client-mode .overview-main-grid {
  display: none;
}

.client-overview-hero {
  display: block;
}

.client-mode .client-overview-hero {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(380px, 0.92fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
  min-height: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.client-mode .metric-grid {
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  margin-bottom: 0;
  align-content: start;
}

.client-mode .metric-grid.miller-off {
  grid-template-rows: auto;
}

.client-mode .metric-card {
  display: grid;
  align-content: start;
}

.client-mode .net-worth-overview-card,
.client-mode .goal-overview-card,
.client-mode .flames-value-card,
.client-mode .client-brand-promo-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, #fff 56%, #fbfaf7 100%);
}

.client-mode .net-worth-overview-card::before,
.client-mode .goal-overview-card::before,
.client-mode .flames-value-card::before,
.client-mode .client-brand-promo-card::before {
  content: none;
}

.client-mode .net-worth-overview-card::before {
  background: none;
}

.client-mode .goal-overview-card::before {
  background: none;
}

.client-mode .flames-value-card::before {
  background: none;
}

.advisor-client-mode .client-overview-hero {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(380px, 0.92fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
  min-height: 0;
}

.advisor-client-mode .metric-grid {
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  margin-bottom: 0;
  align-content: start;
}

.advisor-client-mode .metric-grid.miller-off {
  grid-template-rows: auto;
}

.client-mode .overview-side-stack.miller-off .goal-overview-card,
.advisor-client-mode .overview-side-stack.miller-off .goal-overview-card {
  display: grid;
  align-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, #fbfaf7 100%);
}

.advisor-client-mode .metric-card {
  display: grid;
  align-content: center;
}

.advisor-client-mode .net-worth-overview-card,
.advisor-client-mode .goal-overview-card,
.advisor-client-mode .flames-value-card,
.advisor-client-mode .client-brand-promo-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, #fff 56%, #fbfaf7 100%);
}

.advisor-client-mode .net-worth-overview-card::before,
.advisor-client-mode .goal-overview-card::before,
.advisor-client-mode .flames-value-card::before,
.advisor-client-mode .client-brand-promo-card::before {
  content: none;
}

.advisor-client-mode .net-worth-overview-card::before {
  background: none;
}

.advisor-client-mode .goal-overview-card::before {
  background: none;
}

.advisor-client-mode .flames-value-card::before {
  background: none;
}

.client-view-parity-card,
.client-view-parity-modal {
  display: grid;
  gap: 10px;
  align-content: start !important;
  border-color: rgba(20, 121, 91, 0.18);
  background: linear-gradient(135deg, #f6fffb 0%, #fff 70%);
  box-shadow: none;
}

.client-view-parity-modal-backdrop {
  z-index: 90;
}

.client-view-parity-modal {
  width: min(620px, 100%);
  padding: 20px;
}

.client-view-parity-card.checking,
.client-view-parity-modal.checking {
  border-color: rgba(91, 109, 128, 0.22);
  background: linear-gradient(135deg, #f8fafc 0%, #fff 70%);
}

.client-view-parity-card.warning,
.client-view-parity-modal.warning {
  border-color: rgba(180, 83, 9, 0.24);
  background: linear-gradient(135deg, #fff8ed 0%, #fff 70%);
}

.client-view-parity-card.critical,
.client-view-parity-modal.critical {
  border-color: rgba(185, 28, 28, 0.3);
  background: linear-gradient(135deg, #fff1f2 0%, #fff 70%);
}

.client-view-parity-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.client-view-parity-heading strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.client-view-parity-heading h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1.16rem;
  font-weight: 700;
}

.client-view-parity-heading > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: #eefbf6;
  color: var(--green);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.client-view-parity-card.checking .client-view-parity-heading > span,
.client-view-parity-modal.checking .client-view-parity-modal-status span {
  border-color: rgba(91, 109, 128, 0.2);
  background: #f1f5f9;
  color: #475569;
}

.client-view-parity-card.warning .client-view-parity-heading > span,
.client-view-parity-modal.warning .client-view-parity-modal-status span {
  border-color: rgba(180, 83, 9, 0.22);
  background: #fff7ed;
  color: #92400e;
}

.client-view-parity-card.critical .client-view-parity-heading > span,
.client-view-parity-modal.critical .client-view-parity-modal-status span {
  border-color: rgba(185, 28, 28, 0.24);
  background: #fff1f2;
  color: #991b1b;
}

.client-view-parity-card p,
.client-view-parity-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.client-view-parity-card ul,
.client-view-parity-modal ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.client-view-parity-card li,
.client-view-parity-modal li {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(91, 109, 128, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  padding: 9px 10px;
}

.client-view-parity-card li strong,
.client-view-parity-modal li strong {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
}

.client-view-parity-card li span,
.client-view-parity-modal li span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.client-view-parity-modal-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(91, 109, 128, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.client-view-parity-modal-status span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: #eefbf6;
  color: var(--green);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}

.client-view-parity-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.client-view-parity-modal-grid > div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(91, 109, 128, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.client-view-parity-modal-grid small {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.client-view-parity-modal-grid strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 650;
}

.client-view-parity-modal-grid span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.8rem;
}

.overview-card-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.overview-card-topline .metric-delta {
  margin-top: 0;
}

.flames-discovery-nudge-card {
  display: block;
  position: relative;
  overflow: hidden;
  padding: 20px 22px 18px;
  border-color: rgba(20, 121, 91, 0.16);
  background:
    linear-gradient(135deg, rgba(248, 252, 250, 0.98), rgba(255, 255, 255, 0.98) 58%, rgba(251, 248, 239, 0.5)),
    #fff;
  box-shadow: 0 10px 24px rgba(32, 27, 22, 0.06);
}

.flames-discovery-nudge-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
  min-width: 0;
}

.flames-discovery-nudge-main {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.flames-discovery-nudge-topline {
  align-items: center;
}

.flames-discovery-nudge-topline .eyebrow {
  margin: 0;
}

.flames-discovery-dismiss {
  min-height: 28px;
  padding: 0;
  color: #69717b;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.flames-discovery-dismiss:hover,
.flames-discovery-dismiss:focus-visible {
  color: var(--ink);
}

.flames-discovery-client-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: rgba(232, 247, 241, 0.9);
  color: #14795b;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.flames-discovery-client-status.off {
  border-color: rgba(143, 108, 35, 0.2);
  background: #fff8e8;
  color: #8c6720;
}

.flames-discovery-nudge-copy {
  max-width: 650px;
  margin: 0;
  color: #3f4853;
  font-size: 0.86rem;
  line-height: 1.5;
}

.flames-discovery-single-prompt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
  padding: 8px 0 2px;
}

.flames-discovery-single-prompt h2 {
  display: block;
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-size: 1.46rem;
  font-weight: 680;
  letter-spacing: 0;
  line-height: 1.12;
}

.flames-discovery-single-prompt p {
  display: block;
  max-width: 720px;
  margin: 8px 0 0;
  color: #39424d;
  font-size: 0.92rem;
  line-height: 1.48;
}

.flames-discovery-starting-points {
  display: grid;
  gap: 7px;
  max-width: 760px;
  margin-top: 13px;
  padding: 0;
  border: 0;
  background: transparent;
}

.flames-discovery-starting-points span {
  display: block;
  color: #6a717b;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.flames-discovery-starting-points ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flames-discovery-starting-points li {
  position: relative;
  margin: 0;
  padding-left: 16px;
  color: #3f4853;
  font-size: 0.82rem;
  line-height: 1.43;
}

.flames-discovery-starting-points li::before {
  content: "";
  position: absolute;
  top: 0.58em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #14795b;
}

.flames-discovery-guidance {
  max-width: 760px;
  margin-top: 13px;
  padding: 2px 0 2px 12px;
  border-left: 3px solid rgba(37, 95, 133, 0.28);
}

.flames-discovery-guidance span {
  display: block;
  color: #5f6872;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-transform: uppercase;
}

.flames-discovery-guidance p {
  max-width: 680px;
  margin-top: 5px;
  color: #3f4853;
  font-size: 0.82rem;
  line-height: 1.45;
}

.flames-discovery-mini-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.flames-discovery-mini-actions small {
  max-width: 520px;
  color: #69717b;
  font-size: 0.72rem;
  line-height: 1.35;
}

.flames-discovery-mini-cta {
  min-height: 30px;
  padding: 7px 12px;
  border-color: rgba(35, 32, 29, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.1;
  text-decoration: none;
  box-shadow: none;
}

.flames-discovery-mini-cta:hover,
.flames-discovery-mini-cta:focus-visible {
  border-color: rgba(20, 121, 91, 0.32);
  background: #fff;
  color: #14795b;
}

.flames-discovery-next-step {
  display: block;
  margin-top: 14px;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid rgba(226, 221, 212, 0.82);
  border-radius: 0;
  background: transparent;
}

.flames-discovery-next-step-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.flames-discovery-next-step span,
.flames-discovery-next-step strong,
.flames-discovery-next-step p {
  display: block;
}

.flames-discovery-next-step span {
  color: #66717b;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.flames-discovery-next-step strong {
  margin-top: 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 620;
  line-height: 1.25;
}

.flames-discovery-next-step p {
  max-width: 680px;
  margin: 0;
  color: #5b6470;
  font-size: 0.8rem;
  line-height: 1.4;
}

.flames-discovery-next-step-action {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.flames-discovery-reason-grid {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.flames-discovery-reason-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(35, 32, 29, 0.07);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(251, 250, 247, 0.82)),
    #fff;
}

.flames-discovery-reason-item:nth-child(2) .flames-discovery-icon {
  border-color: rgba(199, 154, 54, 0.2);
  background: #fff8e8;
  color: #8c6720;
}

.flames-discovery-reason-item:nth-child(3) .flames-discovery-icon {
  border-color: rgba(37, 95, 133, 0.18);
  background: #eef8fc;
  color: #255f85;
}

.flames-discovery-icon {
  width: 40px;
  height: 40px;
  border-color: rgba(20, 121, 91, 0.22);
  border-radius: 10px;
  background: #eef8f4;
  box-shadow: 0 8px 18px rgba(20, 121, 91, 0.08);
}

.flames-discovery-icon svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.9;
}

.flames-discovery-reason-grid span {
  display: block;
  margin-bottom: 3px;
  color: #6a717b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.flames-discovery-reason-grid strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
}

.flames-discovery-reason-grid small {
  display: block;
  margin-top: 4px;
  color: #5f6872;
  font-size: 0.72rem;
  line-height: 1.4;
}

.flames-discovery-nudge-panel {
  display: grid;
  align-content: start;
  gap: 13px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(37, 95, 133, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(239, 248, 253, 0.72)),
    #fff;
}

.flames-discovery-nudge-panel span,
.flames-discovery-nudge-panel strong,
.flames-discovery-nudge-panel p {
  display: block;
}

.flames-discovery-nudge-panel span {
  color: #5f6872;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.flames-discovery-nudge-panel strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.25;
}

.flames-discovery-nudge-panel p {
  margin: 8px 0 0;
  color: #4a535e;
  font-size: 0.78rem;
  line-height: 1.45;
}

.flames-discovery-nudge-actions {
  display: grid;
  gap: 8px;
  align-items: stretch;
}

.flames-discovery-nudge-actions .primary-button,
.flames-discovery-nudge-actions .secondary-button {
  min-height: 36px;
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.flames-discovery-nudge-actions .primary-button {
  border-color: #14795b;
  background: #14795b;
  color: #fff;
  box-shadow: 0 10px 24px rgba(20, 121, 91, 0.18);
}

.flames-discovery-nudge-actions .secondary-button {
  background: #fff;
}

.flames-discovery-nudge-footer {
  color: #6a717b;
  font-size: 0.7rem;
  line-height: 1.35;
}

.overview-side-stack .flames-discovery-nudge-card.overview-side-value-card {
  padding: 16px;
}

.overview-side-stack .flames-discovery-nudge-card.overview-side-value-card .flames-discovery-nudge-shell {
  grid-template-columns: 1fr;
}

.overview-side-stack .flames-discovery-nudge-card.overview-side-value-card .flames-discovery-nudge-panel {
  min-height: 0;
}

.overview-side-stack .flames-discovery-nudge-card.overview-side-value-card .flames-discovery-single-prompt h2 {
  font-size: 1.18rem;
}

.overview-side-stack .flames-discovery-nudge-card.overview-side-value-card .flames-discovery-single-prompt p {
  font-size: 0.82rem;
}

.overview-side-stack .flames-discovery-nudge-card.overview-side-value-card .flames-discovery-starting-points {
  padding: 0;
}

.overview-side-stack .flames-discovery-nudge-card.overview-side-value-card .flames-discovery-starting-points li {
  font-size: 0.76rem;
}

.overview-side-stack .flames-discovery-nudge-card.overview-side-value-card .flames-discovery-guidance p {
  font-size: 0.76rem;
}

.overview-side-stack .flames-discovery-nudge-card.overview-side-value-card .flames-discovery-next-step {
  align-items: flex-start;
  flex-direction: column;
}

@media (max-width: 760px) {
  .flames-discovery-nudge-card {
    padding: 16px;
  }

  .flames-discovery-nudge-shell {
    grid-template-columns: 1fr;
  }

  .flames-discovery-nudge-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .flames-discovery-reason-grid {
    display: grid;
  }

  .flames-discovery-single-prompt {
    grid-template-columns: 1fr;
  }

  .flames-discovery-single-prompt h2 {
    font-size: 1.28rem;
  }

  .flames-discovery-mini-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .flames-discovery-next-step {
    align-items: flex-start;
    flex-direction: column;
  }

  .flames-discovery-next-step-action {
    justify-content: flex-start;
  }
}

.overview-side-stack {
  display: grid;
  gap: 16px;
  min-height: 100%;
}

.overview-side-stack[hidden] {
  display: none !important;
}

.overview-side-stack.miller-on {
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr);
  align-content: start;
}

.overview-side-stack.miller-off {
  grid-template-rows: auto auto;
}

.overview-side-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-height: 0;
}

.overview-side-value-card {
  align-content: start;
  min-height: 0;
  overflow: auto;
}

.overview-advisor-card,
.overview-client-task-card {
  min-height: 0;
}

.overview-advisor-card {
  display: grid;
  gap: 14px;
  align-content: start;
  background: #fff;
}

.overview-advisor-card.has-headshot {
  grid-template-columns: 1fr;
}

.advisor-card-content {
  display: grid;
  gap: 14px;
  align-content: start;
}

.advisor-card-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.advisor-card-intro {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.overview-advisor-card h2 {
  margin: 0;
  font-size: clamp(1.2rem, 1.5vw, 1.55rem);
  font-weight: 500;
}

.advisor-card-photo {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: clamp(66px, 6vw, 84px);
  height: clamp(66px, 6vw, 84px);
  flex: 0 0 clamp(66px, 6vw, 84px);
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 999px;
  background: rgba(237, 248, 244, 0.82);
  color: #0f766e;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 14px 28px rgba(26, 21, 15, 0.08);
}

.advisor-card-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
  transform-origin: center;
}

.advisor-card-message {
  max-width: 62ch;
  margin: 2px 0 0;
}

.overview-client-task-card {
  display: grid;
  align-content: start;
  gap: 14px;
  background:
    linear-gradient(135deg, rgba(247, 201, 72, 0.12), rgba(255, 255, 255, 0.96) 62%),
    #fff;
}

.overview-client-task-card h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.25vw, 1.35rem);
  font-weight: 500;
}

.overview-client-task-list {
  display: grid;
  gap: 10px;
}

.overview-client-task-row {
  display: grid;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.overview-client-task-row .task-complete-toggle {
  justify-self: start;
}

.overview-client-task-row div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.overview-client-task-row strong {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 500;
}

.overview-client-task-row small,
.overview-client-task-empty small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.overview-client-task-empty {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(20, 121, 91, 0.14);
  border-radius: var(--radius);
  background: rgba(237, 248, 244, 0.62);
  padding: 14px;
}

.overview-client-task-empty > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-weight: 500;
}

.overview-client-task-empty div {
  display: grid;
  gap: 4px;
}

.overview-client-task-empty strong {
  color: var(--ink);
  font-weight: 500;
}

.client-brand-promo-card {
  display: grid;
  gap: 14px;
  min-height: 0;
  align-content: start;
  border-color: rgba(35, 32, 29, 0.12);
  background: #fff;
  box-shadow: 0 18px 42px rgba(26, 22, 18, 0.055);
}

.client-mode .client-brand-promo-card,
.advisor-client-mode .client-brand-promo-card {
  background: #fff;
}

.client-brand-feature {
  display: block;
}

.client-brand-feature-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.client-brand-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.client-brand-kicker p:not(.eyebrow) {
  margin: 0;
  color: #3a342f;
  font-size: 0.96rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.client-brand-kicker .eyebrow,
.client-mode #overview .client-brand-kicker .eyebrow,
.advisor-client-mode #overview .client-brand-kicker .eyebrow {
  margin: 0;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.client-brand-promo-stack {
  display: grid;
  gap: 0;
}

.client-brand-promo-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 16px;
  row-gap: 8px;
  align-items: center;
  border-bottom: 1px solid rgba(35, 32, 29, 0.08);
  padding: 0 0 15px;
}

.client-brand-promo-item + .client-brand-promo-item {
  padding-top: 15px;
}

.client-brand-promo-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.client-brand-promo-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.brand-promo-icon {
  display: grid;
  place-items: center;
  align-self: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 999px;
  background: #f3f1ef;
  color: #625b54;
}

.brand-promo-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-promo-icon.blog {
  background: #edf8f4;
  color: #0f766e;
}

.brand-promo-icon.youtube {
  background: #fff3e8;
  color: #b45309;
}

.brand-promo-icon.event {
  background: #fff8df;
  color: #8a5f00;
}

.brand-promo-icon.webinar {
  background: #eff6ff;
  color: #2563eb;
}

.brand-promo-icon.guide {
  background: #f6efe4;
  color: #7c5d2f;
}

.brand-promo-icon.newsletter {
  background: #f4f0ff;
  color: #6d4cc2;
}

.brand-promo-icon.referral {
  background: #ecfeff;
  color: #0e7490;
}

.client-brand-promo-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.08rem, 1.18vw, 1.34rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.18;
}

.client-brand-promo-card .client-brand-description {
  max-width: 68ch;
  margin: 0;
  color: #37322d;
  font-size: 0.92rem;
  line-height: 1.5;
}

.client-brand-source {
  margin: -4px 0 0;
  color: #625b54;
  font-size: 0.76rem;
  line-height: 1.3;
}

.brand-promo-type {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 26px;
  border-radius: 999px;
  background: #f3f1ef;
  color: #625b54;
  padding: 0 9px;
  font-size: 0.72rem;
}

.client-brand-promo-actions {
  display: grid;
  gap: 8px;
  align-items: stretch;
  justify-items: stretch;
  min-width: 160px;
}

.client-brand-read-link,
.client-brand-share-button {
  display: inline-flex;
  align-items: center;
  align-self: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: var(--radius);
  background: #f4f2ef;
  color: var(--ink);
  padding: 0 13px;
  font-size: 0.84rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  text-align: left;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(26, 22, 18, 0.06);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.client-brand-read-link:hover,
.client-brand-read-link:focus-visible {
  background: #fff7ef;
  border-color: rgba(255, 112, 31, 0.54);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(255, 112, 31, 0.12);
}

.client-brand-read-link {
  border-color: rgba(255, 112, 31, 0.34);
  background: #fffaf5;
}

.client-brand-share-button {
  border-color: rgba(255, 112, 31, 0.34);
  background: #fff7ef;
  color: var(--orange);
  box-shadow: 0 10px 24px rgba(255, 112, 31, 0.1);
  cursor: pointer;
}

.client-brand-share-button:hover,
.client-brand-share-button:focus-visible {
  border-color: rgba(255, 112, 31, 0.54);
  background: #fff0e3;
  box-shadow: 0 14px 28px rgba(255, 112, 31, 0.16);
  transform: translateY(-1px);
}

.client-brand-action-icon,
.client-brand-share-button svg {
  flex: 0 0 auto;
}

.client-brand-share-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.client-brand-read-link span,
.client-brand-share-button span {
  color: inherit;
  font-size: 0.9rem;
}

.client-brand-read-link .client-brand-action-icon {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 12px;
  color: var(--orange);
  font-size: 0;
  line-height: 1;
}

.client-brand-read-link .client-brand-action-icon::before,
.client-brand-read-link .client-brand-action-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  display: block;
  transform: translateY(-50%);
}

.client-brand-read-link .client-brand-action-icon::before {
  left: 1px;
  width: 13px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.client-brand-read-link .client-brand-action-icon::after {
  right: 1px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid currentColor;
}

.client-brand-promo-actions small {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.client-brand-promo-list {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(35, 32, 29, 0.08);
  padding-top: 12px;
}

.client-brand-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.client-brand-list-heading span {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.client-brand-promo-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 10px 12px;
  text-decoration: none;
  font-size: 0.84rem;
}

.client-brand-promo-list a:last-child {
  border-bottom: 1px solid rgba(35, 32, 29, 0.08);
}

.client-brand-promo-list a:hover {
  background: transparent;
  transform: translateY(-1px);
}

.client-brand-promo-list span {
  width: fit-content;
  color: #625b54;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.client-brand-promo-list strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: normal;
}

.client-brand-promo-list em {
  color: #625b54;
  font-size: 0.9rem;
  font-style: normal;
}

.task-complete-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid rgba(20, 121, 91, 0.22);
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  padding: 0 11px;
  font: inherit;
  font-size: 0.78rem;
}

.task-complete-toggle span {
  width: 13px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  background: #fff;
}

.advisor-contact-list {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.advisor-contact-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  text-align: left;
  gap: 12px;
  min-height: 40px;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 9px 12px;
  text-decoration: none;
}

.advisor-contact-row:hover {
  border-color: rgba(20, 121, 91, 0.22);
  background: #f8fcfa;
}

.advisor-contact-row.copied {
  border-color: rgba(20, 121, 91, 0.32);
  background: #edf8f4;
}

.advisor-contact-row.copied small {
  color: var(--green);
}

.advisor-contact-row small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.advisor-contact-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.94rem;
  font-weight: 500;
}

.advisor-headshot-customization {
  display: grid;
  gap: 10px;
}

.advisor-headshot-toggle span {
  display: grid;
  gap: 3px;
}

.advisor-headshot-toggle strong {
  font-weight: 500;
}

.advisor-headshot-toggle small {
  color: var(--muted);
  font-size: 0.76rem;
}

.advisor-headshot-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}

.advisor-headshot-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: rgba(237, 248, 244, 0.82);
  color: #0f766e;
  font-size: 0.85rem;
  font-weight: 500;
}

.advisor-headshot-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
}

.advisor-headshot-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
}

.advisor-headshot-focus-controls {
  flex: 1 1 100%;
}

.advisor-contact-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.metric-card,
.panel,
.folder-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 18px;
}

.advisor-firm-card {
  min-height: 150px;
  background: #fff;
}

.advisor-empty-card {
  background:
    linear-gradient(135deg, rgba(35, 32, 29, 0.04), rgba(255, 255, 255, 0.92)),
    #fff;
}

.advisor-attention-card {
  background:
    linear-gradient(135deg, rgba(200, 41, 30, 0.1), rgba(255, 255, 255, 0.94) 58%),
    #fff;
}

.firm-dashboard {
  display: grid;
  gap: 16px;
}

.firm-dashboard[hidden] {
  display: none;
}

.your-firm-dashboard {
  align-content: start;
}

.your-firm-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
}

.your-firm-heading h2 {
  margin: 2px 0 4px;
  font-size: 1.45rem;
}

.your-firm-id-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.your-firm-panel-stack {
  display: grid;
  gap: 16px;
}

.current-client-panel {
  background: #fff;
}

.current-client-notice {
  margin: 0;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background: #f2fbf7;
  color: var(--green);
  padding: 12px 14px;
  font-size: 0.85rem;
  line-height: 1.45;
}

.current-client-notice.warning {
  border-color: rgba(180, 83, 9, 0.22);
  background: #fff8ed;
  color: #92400e;
}

.current-client-setup-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #fbfaf7 100%);
}

.current-client-setup-card.has-error {
  border-color: rgba(180, 83, 9, 0.24);
  background: #fffaf1;
}

.current-client-setup-copy {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.current-client-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.current-client-setup-copy > div {
  display: grid;
  gap: 5px;
}

.current-client-setup-copy small {
  color: var(--muted);
}

.current-client-diagnostic {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.74rem;
  word-break: break-word;
}

.current-client-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.integration-hero {
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.075), rgba(255, 255, 255, 0.96) 58%),
    #fff;
}

.integration-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.integration-tab-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 248, 244, 0.82)),
    #fff;
  padding: 8px;
}

.integration-tab-row button {
  display: grid;
  gap: 4px;
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.integration-tab-row button span {
  font-weight: 700;
}

.integration-tab-row button small {
  color: var(--muted);
  font-size: 0.78rem;
}

.integration-tab-row button.active {
  border-color: rgba(20, 121, 91, 0.26);
  background: #fff;
  box-shadow: 0 8px 22px rgba(44, 37, 31, 0.08);
}

.integration-tab-row button.active small {
  color: var(--green);
}

.integration-tab-panel {
  display: grid;
  gap: 16px;
}

.integration-summary-card,
.integration-copy-card,
.integration-secret-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 248, 244, 0.72)),
    #fff;
}

.integration-summary-card {
  display: grid;
  gap: 5px;
  padding: 16px;
}

.integration-summary-card.ready {
  border-color: rgba(20, 121, 91, 0.2);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.98), rgba(255, 255, 255, 0.92)),
    #fff;
}

.integration-summary-card small,
.integration-copy-card span,
.integration-field span {
  color: var(--muted);
  font-size: 0.76rem;
}

.integration-summary-card strong {
  font-size: 1.02rem;
}

.integration-summary-card span:last-child,
.integration-field small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.integration-detail-card {
  display: grid;
  gap: 16px;
  background: #fff;
}

.integration-field-grid {
  display: grid;
  gap: 12px;
}

.integration-field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.integration-field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.integration-field,
.integration-copy-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.integration-field {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 248, 244, 0.66)),
    #fff;
}

.integration-field.full {
  grid-column: 1 / -1;
}

.integration-field input,
.integration-field textarea,
.integration-field select {
  width: 100%;
  min-width: 0;
}

.integration-field textarea {
  resize: vertical;
}

.integration-copy-card {
  padding: 12px;
}

.integration-copy-card strong {
  font-size: 0.92rem;
  line-height: 1.45;
  word-break: break-word;
}

.integration-copy-button {
  justify-self: start;
}

.integration-secret-note {
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 248, 237, 0.86), rgba(255, 255, 255, 0.96)),
    #fff;
}

.texting-hero-panel {
  display: grid;
  gap: 16px;
  background: #fff;
}

.texting-hero-header,
.texting-connection-card,
.texting-connection-main,
.texting-list-topbar,
.texting-thread-topbar,
.texting-match-panel,
.texting-composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.texting-status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f5f2ec;
  padding: 7px 11px;
  color: var(--ink);
  font-size: 0.78rem;
}

.texting-status-pill.is-connected {
  border-color: rgba(20, 121, 91, 0.2);
  background: #edf8f4;
  color: var(--green);
}

.texting-status-pill.has-error {
  border-color: #f2c17e;
  background: #fff7e8;
  color: #8a4b06;
}

.texting-connection-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 18px;
  background: #fffdfa;
}

.texting-connection-card.is-connected {
  border-color: rgba(20, 121, 91, 0.22);
  background: #f6fcf9;
}

.texting-connection-card.has-error {
  border-color: #f2c17e;
  background: #fff8ec;
}

.texting-connection-main {
  justify-content: flex-start;
  min-width: 0;
}

.texting-connection-main > div {
  display: grid;
  gap: 5px;
}

.texting-connection-main small,
.texting-account-card small,
.texting-sync-card small,
.texting-inbox-source small,
.texting-list-topbar p,
.texting-thread-topbar p,
.texting-conversation-card small,
.texting-empty-conversation p {
  color: var(--muted);
}

.texting-connection-avatar,
.texting-user-avatar,
.texting-contact-avatar,
.texting-large-icon {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(20, 121, 91, 0.22);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.96), rgba(237, 248, 244, 0.86)),
    #edf8f4;
  color: var(--green);
  font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72), 0 4px 12px rgba(20, 121, 91, 0.08);
}

.texting-connection-avatar {
  width: 42px;
  height: 42px;
  font-size: 0.76rem;
}

.texting-console-shell {
  display: grid;
  grid-template-columns: 238px minmax(320px, 370px) minmax(0, 1fr);
  height: clamp(690px, calc(100vh - 188px), 860px);
  min-height: 690px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.48), rgba(255, 255, 255, 0.92) 34%, rgba(246, 248, 251, 0.96)),
    #f7f9fb;
  box-shadow: var(--shadow-soft);
}

.texting-left-rail,
.texting-thread-list,
.texting-thread-stage {
  min-width: 0;
}

.texting-left-rail {
  display: grid;
  align-content: start;
  gap: 13px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(246, 249, 251, 0.96)),
    #f6f8fb;
  padding: 15px;
}

.texting-rail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.texting-rail-stats span {
  display: grid;
  gap: 3px;
  min-height: 58px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
  padding: 9px 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

.texting-rail-stats strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.texting-brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.texting-brand-row strong {
  min-width: 0;
  flex: 1;
}

.texting-orbit-mark {
  width: 18px;
  height: 18px;
  border: 4px solid #8fb8ff;
  border-right-color: #2563eb;
  border-radius: 999px;
}

.texting-status-dot {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.texting-status-dot.is-connected {
  border-color: rgba(20, 121, 91, 0.2);
  background: #edf8f4;
  color: var(--green);
}

.texting-status-dot.has-error {
  border-color: #f2c17e;
  background: #fff7e8;
  color: #8a4b06;
}

.texting-account-card,
.texting-sync-card,
.texting-inbox-source,
.texting-rail-link,
.texting-conversation-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.texting-sync-card,
.texting-inbox-source {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px;
  text-align: left;
}

.texting-account-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: flex-start;
  gap: 11px;
  border-color: rgba(20, 121, 91, 0.16);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.72), rgba(255, 255, 255, 0.92)),
    #fff;
  padding: 12px;
  text-align: left;
  box-shadow: 0 10px 22px rgba(25, 22, 18, 0.045);
}

.texting-account-details {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.texting-account-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.texting-account-title-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.91rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.texting-account-title-row span {
  flex: 0 0 auto;
  border: 1px solid #ead8b2;
  border-radius: 999px;
  background: #fff7e8;
  padding: 2px 6px;
  color: #8a4b06;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
}

.texting-account-title-row span.is-connected {
  border-color: rgba(20, 121, 91, 0.2);
  background: #edf8f4;
  color: var(--green);
}

.texting-account-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.texting-account-meta span {
  border: 1px solid rgba(226, 221, 212, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 3px 7px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

.texting-left-rail .current-client-notice {
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0 2px;
  color: var(--green);
  font-size: 0.78rem;
  line-height: 1.35;
}

.texting-left-rail .current-client-notice.warning {
  border: 1px solid rgba(180, 83, 9, 0.22);
  border-radius: var(--radius-sm);
  background: #fff8ed;
  padding: 9px 10px;
  color: #92400e;
}

.texting-sync-card,
.texting-inbox-source,
.texting-rail-link,
.texting-icon-button,
.texting-tab-row button,
.texting-thread-actions button,
.texting-composer-toolbar button {
  cursor: pointer;
}

.texting-sync-card:disabled,
.texting-rail-link:disabled,
.texting-icon-button:disabled,
.texting-tab-row button:disabled,
.texting-thread-actions button:disabled,
.texting-composer-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.texting-sync-card {
  width: 100%;
  border-color: rgba(20, 121, 91, 0.14);
  background: #fbfffd;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.texting-sync-card.is-text-only {
  grid-template-columns: 1fr;
  padding: 14px;
}

.texting-sync-card.is-text-only strong {
  display: block;
  margin-bottom: 3px;
}

.texting-sync-card:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: rgba(20, 121, 91, 0.28);
  box-shadow: 0 10px 24px rgba(25, 22, 18, 0.06);
}

.texting-sync-icon,
.texting-inbox-icon {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  background: #eaf2ff;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 800;
}

.texting-sync-logo {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 12px;
  background: #fff;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
}

.texting-sync-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

.texting-rail-section {
  display: grid;
  gap: 8px;
}

.texting-rail-section > small {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.texting-rail-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.texting-rail-section-heading small {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.texting-workspace-refresh {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: 999px;
  background: #fff;
  color: #4f5964;
  cursor: pointer;
}

.texting-workspace-refresh svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.texting-workspace-refresh:hover,
.texting-workspace-refresh:focus-visible {
  border-color: rgba(20, 121, 91, 0.26);
  color: var(--green);
}

.texting-workspace-refresh:disabled {
  background: #f8f7f4;
  color: #9a9288;
  cursor: wait;
}

.texting-workspace-sync-note {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.texting-workspace-sync-note.is-updated {
  color: var(--green);
}

.texting-workspace-sync-note.has-error {
  color: #9f3d21;
}

.texting-inbox-source.is-active {
  border-color: rgba(37, 99, 235, 0.22);
  background: #f0f7ff;
  box-shadow: inset 3px 0 0 rgba(37, 99, 235, 0.62);
}

.texting-rail-link {
  padding: 11px 12px;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
}

.texting-thread-list {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 12px;
  min-height: 0;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 251, 0.94)),
    #fff;
  padding: 14px;
}

.texting-list-topbar h2,
.texting-thread-topbar h2 {
  margin: 0;
  font-size: 1.25rem;
}

.texting-list-topbar p,
.texting-thread-topbar p {
  margin: 3px 0 0;
  font-size: 0.84rem;
}

.texting-icon-button,
.texting-thread-actions button,
.texting-composer-toolbar button,
.texting-tab-row button {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 9px 11px;
  color: var(--ink);
  font-weight: 600;
}

.texting-icon-button,
.texting-thread-actions button {
  font-weight: 500;
}

.texting-thread-actions button:disabled,
.texting-composer-toolbar button:disabled,
.texting-icon-button:disabled {
  background: #f8f7f4;
  color: #766f67;
  opacity: 1;
}

.texting-composer-toolbar .primary-button {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: #fff;
}

.texting-composer-toolbar .primary-button:not(:disabled):hover {
  background: #080706;
  color: #fff;
}

.texting-composer-toolbar .primary-button:disabled {
  border-color: rgba(35, 32, 29, 0.16);
  background: #ece8e0;
  color: #6f6861;
}

.texting-tab-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.texting-tab-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.texting-tab-row button:last-child {
  flex: 1 1 auto;
}

.texting-tab-row button.is-active {
  border-color: rgba(20, 121, 91, 0.2);
  background: #edf8f4;
  color: var(--green);
}

.texting-tab-row button span {
  min-width: 22px;
  border-radius: 999px;
  background: rgba(35, 32, 29, 0.06);
  padding: 2px 7px;
  color: inherit;
  font-size: 0.72rem;
}

.texting-thread-search.advisor-client-search {
  width: 100%;
  margin: 0;
  padding: 3px;
  border-radius: 10px;
  box-shadow: none;
}

.texting-thread-search.advisor-client-search:focus-within {
  border-color: rgba(20, 121, 91, 0.26);
  box-shadow: 0 8px 18px rgba(20, 121, 91, 0.08);
}

.texting-search-history-button {
  flex-basis: 34px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.texting-search-history-button svg {
  width: 17px;
  height: 17px;
}

.texting-search-history-button.is-active {
  border-color: rgba(20, 121, 91, 0.22);
  background:
    linear-gradient(180deg, rgba(237, 248, 244, 0.98), rgba(255, 255, 255, 0.94)),
    #edf8f4;
  color: var(--green);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 6px 14px rgba(20, 121, 91, 0.1);
}

.texting-search-field::before {
  left: 12px;
  width: 10px;
  height: 10px;
}

.texting-search-field::after {
  left: 22px;
  width: 6px;
}

.texting-thread-search.advisor-client-search input {
  min-height: 34px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 0 10px 0 35px;
  outline: 0;
}

.texting-contact-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.86fr);
  gap: 8px;
}

.texting-contact-controls label {
  min-width: 0;
}

.texting-contact-controls select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffdfa;
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  padding: 0 10px;
  outline: 0;
}

.texting-contact-controls select:focus {
  border-color: rgba(20, 121, 91, 0.28);
  box-shadow: 0 0 0 3px rgba(20, 121, 91, 0.08);
}

.texting-conversation-stack {
  display: grid;
  align-content: start;
  align-self: stretch;
  justify-content: stretch;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.texting-conversation-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  min-height: 64px;
  position: relative;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button.texting-conversation-card {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.texting-conversation-card:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.texting-conversation-card.is-selected {
  border-color: rgba(20, 121, 91, 0.32);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.94), rgba(255, 255, 255, 0.98)),
    #edf8f4;
  box-shadow: inset 3px 0 0 rgba(20, 121, 91, 0.72), 0 12px 22px rgba(25, 22, 18, 0.05);
}

.texting-conversation-card:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: rgba(20, 121, 91, 0.24);
  box-shadow: 0 10px 22px rgba(25, 22, 18, 0.05);
}

.texting-conversation-card.is-ghost {
  color: var(--muted);
}

.texting-contact-summary {
  display: grid;
  min-width: 0;
}

.texting-contact-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.texting-contact-summary span {
  color: var(--ink);
  font-weight: 650;
}

.texting-contact-status {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 62px;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: right;
}

.texting-contact-status strong {
  display: inline-flex;
  min-width: 24px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(237, 248, 244, 0.9);
  color: var(--green);
  font-size: 0.72rem;
}

.texting-contact-status strong:empty {
  display: none;
}

.texting-contact-status small {
  max-width: 74px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.texting-contact-avatar,
.texting-user-avatar {
  width: 38px;
  height: 38px;
  font-size: 0.73rem;
}

.texting-contact-avatar.has-photo,
.texting-user-avatar.has-photo {
  overflow: hidden;
  padding: 0;
  background: #fff;
  border-color: rgba(20, 121, 91, 0.18);
}

.texting-contact-avatar.has-photo img,
.texting-user-avatar.has-photo img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.texting-sender-avatar {
  width: 42px;
  height: 42px;
  font-size: 0.82rem;
  border: 2px solid #fff;
  box-shadow: 0 8px 18px rgba(20, 121, 91, 0.14), 0 0 0 1px rgba(20, 121, 91, 0.16);
}

.texting-thread-stage {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.92), rgba(246, 248, 251, 0) 34%),
    linear-gradient(180deg, rgba(247, 250, 249, 0.96), rgba(241, 246, 248, 0.96)),
    #f6f8fb;
}

.texting-thread-topbar {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, #fff, rgba(237, 248, 244, 0.64)),
    #fff;
  padding: 14px 18px;
}

.texting-thread-person {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.texting-thread-person > div {
  min-width: 0;
}

.texting-thread-person h2,
.texting-thread-person p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.texting-thread-actions {
  display: flex;
  gap: 8px;
}

.texting-message-canvas {
  position: relative;
  display: grid;
  align-content: start;
  gap: 18px;
  overflow: auto;
  padding: 22px 24px 18px;
}

.texting-message-canvas.is-empty {
  align-content: center;
}

.texting-message-canvas.is-empty .texting-date-chip {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
}

.texting-date-chip {
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.texting-empty-conversation {
  justify-self: center;
  max-width: 440px;
  padding: 16px 22px 10px;
  text-align: center;
}

.texting-empty-conversation.is-compact {
  align-self: start;
  justify-self: stretch;
  max-width: none;
  padding: 2px 8px 0;
  text-align: center;
}

.texting-large-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 10px;
}

.texting-empty-conversation h3 {
  margin: 0 0 6px;
  font-size: 1.18rem;
}

.texting-empty-conversation p {
  margin: 0;
  line-height: 1.45;
}

.texting-quick-replies {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.texting-quick-replies button {
  min-height: 34px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--green);
  padding: 7px 11px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.texting-quick-replies button:hover {
  border-color: rgba(20, 121, 91, 0.32);
  background: #edf8f4;
}

.texting-setup-checklist {
  display: grid;
  gap: 12px;
  width: min(680px, 92%);
  margin: 18px auto 0;
  border: 1px solid rgba(20, 121, 91, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.84), rgba(255, 255, 255, 0.96) 72%),
    #fff;
  padding: 16px;
  text-align: left;
}

.texting-setup-checklist > div:first-child {
  display: grid;
  gap: 4px;
}

.texting-setup-checklist strong {
  font-size: 0.95rem;
}

.texting-setup-checklist p {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.texting-setup-rows {
  display: grid;
  gap: 8px;
}

.texting-setup-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.55fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 10px;
}

.texting-setup-row code {
  display: block;
  color: var(--green);
  font-size: 0.78rem;
  white-space: normal;
  word-break: break-word;
}

.texting-setup-row span {
  display: grid;
  gap: 3px;
}

.texting-setup-row small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.texting-message-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: min(760px, 88%);
}

.texting-message-row.is-outbound {
  justify-self: end;
}

.texting-message-row.is-inbound {
  justify-self: start;
}

.texting-message-stack {
  display: grid;
  justify-items: end;
  gap: 7px;
  min-width: 0;
}

.texting-message-row.is-inbound .texting-message-stack {
  justify-items: start;
}

.texting-message-bubble {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 13px 15px;
  line-height: 1.45;
  box-shadow: 0 10px 24px rgba(25, 22, 18, 0.05);
}

.texting-message-row.is-outbound .texting-message-bubble {
  border-color: rgba(20, 121, 91, 0.2);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.96), rgba(255, 255, 255, 0.98)),
    #f7fbfa;
}

.texting-message-row.is-inbound .texting-message-bubble {
  border-color: rgba(98, 122, 145, 0.18);
  background:
    linear-gradient(135deg, rgba(250, 252, 255, 0.98), rgba(255, 255, 255, 0.98)),
    #fff;
}

.texting-message-bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.texting-message-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  border-top: 0 solid rgba(226, 221, 212, 0);
  padding-top: 0;
  opacity: 0;
  transition:
    max-height 0.16s ease,
    margin-top 0.16s ease,
    border-color 0.16s ease,
    padding-top 0.16s ease,
    opacity 0.16s ease;
}

.texting-message-bubble:hover .texting-message-meta-row,
.texting-message-bubble:focus-within .texting-message-meta-row {
  max-height: 28px;
  margin-top: 9px;
  border-top-width: 1px;
  border-top-color: rgba(226, 221, 212, 0.76);
  padding-top: 7px;
  opacity: 1;
}

.texting-message-meta-row small,
.texting-message-meta-row span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.texting-message-actions {
  position: relative;
  justify-self: end;
}

.texting-message-row.is-inbound .texting-message-actions {
  justify-self: start;
}

.texting-message-actions summary {
  list-style: none;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 11px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(25, 22, 18, 0.05);
}

.texting-message-actions summary::-webkit-details-marker {
  display: none;
}

.texting-message-actions[open] summary {
  border-color: rgba(20, 121, 91, 0.34);
  background: #edf8f4;
}

.current-client-task-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(31, 28, 24, 0.34);
  padding: 24px;
}

.current-client-task-modal {
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.5), rgba(255, 255, 255, 0.96) 42%, rgba(255, 251, 244, 0.82)),
    #fff;
  box-shadow: 0 28px 80px rgba(31, 28, 24, 0.22);
}

.current-client-task-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.current-client-task-modal-header h3 {
  margin: 2px 0 4px;
  font-size: 1.2rem;
}

.current-client-task-modal-header p:last-child {
  margin: 0;
  color: var(--muted);
}

.current-client-task-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.current-client-task-form {
  display: grid;
  gap: 16px;
  padding: 18px 22px 20px;
}

.current-client-task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.current-client-task-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.current-client-task-grid input,
.current-client-task-grid select,
.current-client-task-grid textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

.current-client-task-title-field,
.current-client-task-repeat-preview,
.current-client-task-detail {
  grid-column: 1 / -1;
}

.current-client-task-grid textarea {
  min-height: 112px;
  padding: 10px 12px;
  resize: vertical;
}

.current-client-task-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 2px;
}

.current-client-task-modal-footer small {
  color: var(--muted);
}

.current-client-task-modal-footer > div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.current-client-task-modal-footer button {
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0 16px;
}

.texting-message-action-menu {
  position: absolute;
  right: 0;
  z-index: 8;
  display: grid;
  gap: 7px;
  width: 250px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px;
  box-shadow: 0 18px 36px rgba(25, 22, 18, 0.13);
}

.texting-message-action-menu button {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.texting-message-action-menu button:hover {
  border-color: rgba(20, 121, 91, 0.18);
  background: #f7fbfa;
}

.texting-message-action-menu span {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 500;
}

.texting-message-action-menu small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.32;
}

.texting-match-panel {
  margin: 0 18px 12px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.72), rgba(255, 255, 255, 0.98)),
    #fbfffd;
  padding: 12px 14px;
}

.texting-match-panel small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.texting-match-panel strong {
  display: block;
  margin-top: 3px;
  font-size: 0.9rem;
}

.texting-context-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.texting-context-actions span {
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: #edf8f4;
  padding: 6px 10px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
}

.texting-context-actions button {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 7px 10px;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.texting-context-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.texting-composer {
  margin: 0 18px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 16px 30px rgba(25, 22, 18, 0.07);
}

.texting-composer > .texting-quick-replies {
  justify-content: flex-start;
  margin: 0;
  border-bottom: 1px solid rgba(226, 221, 212, 0.74);
  background: rgba(255, 255, 255, 0.78);
  padding: 9px 12px;
}

.texting-composer > .texting-quick-replies button {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 0.76rem;
}

.texting-composer textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 0;
  padding: 14px;
  background: #fff;
  font: inherit;
  line-height: 1.45;
  outline: 0;
}

.texting-composer textarea:focus {
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.18), rgba(255, 255, 255, 0.94)),
    #fff;
}

.texting-composer-toolbar {
  border-top: 1px solid var(--line);
  padding: 10px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.texting-composer-toolbar > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.texting-composer-hint {
  display: none;
}

.texting-composer-toolbar .primary-button {
  margin-left: auto;
}

.texting-composer-toolbar .texting-schedule-button + .primary-button {
  margin-left: 0;
}

.texting-schedule-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid rgba(226, 221, 212, 0.95);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted);
  padding: 0 13px;
  font-weight: 700;
}

.texting-schedule-button svg,
.texting-scheduled-icon svg,
.current-client-schedule-presets svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.texting-schedule-button:not(:disabled):hover {
  border-color: rgba(20, 121, 91, 0.28);
  background: #edf8f4;
  color: #14795b;
}

.texting-send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 104px;
  min-height: 38px;
  border-color: #14795b !important;
  border-radius: var(--radius-sm);
  background: #14795b !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(20, 121, 91, 0.18);
}

.texting-send-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.texting-send-button:not(:disabled):hover {
  border-color: #0f634b !important;
  background: #0f634b !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.texting-send-button:disabled {
  border-color: rgba(20, 121, 91, 0.18) !important;
  background: #edf8f4 !important;
  color: #6f827b !important;
  box-shadow: none;
  cursor: not-allowed;
}

.texting-scheduled-stack {
  display: grid;
  gap: 10px;
  margin: 14px auto 0;
  width: min(720px, 100%);
}

.texting-scheduled-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid rgba(186, 207, 202, 0.72);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.78), rgba(255, 255, 255, 0.94)),
    #fff;
  padding: 12px;
}

.texting-scheduled-row.has-error {
  border-color: rgba(236, 94, 82, 0.35);
  background:
    linear-gradient(135deg, rgba(255, 246, 244, 0.9), rgba(255, 255, 255, 0.96)),
    #fff;
}

.texting-scheduled-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(20, 121, 91, 0.22);
  border-radius: 999px;
  background: #edf8f4;
  color: #14795b;
}

.texting-scheduled-row strong,
.texting-scheduled-row p,
.texting-scheduled-row small {
  display: block;
}

.texting-scheduled-row strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.texting-scheduled-row p {
  margin: 5px 0;
  color: var(--ink);
  line-height: 1.35;
}

.texting-scheduled-row small {
  color: var(--muted);
  font-size: 0.78rem;
}

.texting-scheduled-error {
  color: #b23b30 !important;
}

.texting-scheduled-row button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 700;
}

.current-client-schedule-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(31, 28, 24, 0.34);
  padding: 24px;
}

.current-client-schedule-modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 28px 80px rgba(31, 28, 24, 0.24);
}

.current-client-schedule-header,
.current-client-schedule-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.current-client-schedule-header {
  padding: 18px 20px 12px;
}

.current-client-schedule-header h3 {
  margin: 0;
  font-size: 1rem;
}

.current-client-schedule-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.current-client-schedule-body {
  display: grid;
  gap: 12px;
  padding: 10px 20px 18px;
}

.current-client-schedule-selected {
  display: grid;
  gap: 4px;
  border: 1px solid #d8e2ef;
  border-radius: var(--radius-sm);
  padding: 13px 14px;
}

.current-client-schedule-selected span,
.current-client-schedule-preset-group small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.current-client-schedule-selected strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.current-client-schedule-typeahead input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d8e2ef;
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font: inherit;
}

.current-client-schedule-error {
  margin: 0;
  color: #b23b30;
  font-size: 0.82rem;
  font-weight: 700;
}

.current-client-schedule-presets {
  display: grid;
  gap: 12px;
}

.current-client-schedule-preset-group {
  display: grid;
  gap: 7px;
}

.current-client-schedule-preset-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.current-client-schedule-preset-group button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid rgba(226, 221, 212, 0.8);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(31, 28, 24, 0.05);
}

.current-client-schedule-preset-group button:hover {
  border-color: rgba(20, 121, 91, 0.28);
  background: #edf8f4;
  color: #14795b;
}

.current-client-schedule-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-sm);
  background: #f6f8fb;
  padding: 12px 14px;
}

.current-client-schedule-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.current-client-schedule-toggle span {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #c9d1dc;
  transition: background 0.18s ease;
}

.current-client-schedule-toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.18s ease;
}

.current-client-schedule-toggle input:checked + span {
  background: #182236;
}

.current-client-schedule-toggle input:checked + span::after {
  transform: translateX(16px);
}

.current-client-schedule-toggle strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.current-client-schedule-footer {
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  background: #fbfcfe;
}

.current-client-schedule-footer button {
  min-height: 38px;
  border-radius: var(--radius-sm);
  padding: 0 14px;
}

@media (max-width: 1180px) {
  .texting-console-shell {
    grid-template-columns: 210px minmax(280px, 330px) minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .texting-console-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .texting-left-rail,
  .texting-thread-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .texting-left-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .texting-brand-row,
  .texting-left-rail .current-client-notice,
  .texting-rail-section {
    grid-column: 1 / -1;
  }

  .texting-thread-list {
    max-height: 440px;
  }

  .texting-thread-stage {
    min-height: 620px;
  }

  .texting-thread-topbar,
  .texting-composer-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .texting-thread-actions button,
  .texting-composer-toolbar .primary-button {
    width: 100%;
  }

  .current-client-task-grid {
    grid-template-columns: 1fr;
  }

  .current-client-task-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .current-client-task-modal-footer > div {
    justify-content: stretch;
  }

  .current-client-task-modal-footer button {
    flex: 1;
  }
}

@media (max-width: 640px) {
  .texting-contact-controls {
    grid-template-columns: 1fr;
  }

  .texting-conversation-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .texting-contact-status {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }

  .texting-thread-person h2,
  .texting-thread-person p {
    white-space: normal;
  }
}

.firm-billing-panel {
  display: grid;
  gap: 16px;
}

.billing-hero,
.billing-actions-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.billing-hero {
  padding: 4px 0 2px;
}

.billing-hero h2 {
  margin: 2px 0 6px;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.billing-hero-status {
  display: grid;
  justify-items: end;
  gap: 5px;
  min-width: 190px;
}

.billing-hero-status strong {
  font-size: 1.55rem;
  line-height: 1;
}

.billing-hero-status small {
  color: var(--muted);
  font-size: 0.82rem;
}

.billing-alert {
  margin: 0;
  border: 1px solid #f6d08b;
  border-radius: var(--radius-sm);
  background: #fff8e7;
  color: #7a4b05;
  padding: 11px 13px;
  font-size: 0.88rem;
}

.billing-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.billing-summary-grid article,
.billing-plan-card,
.billing-actions-card,
.billing-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.billing-summary-grid article {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.billing-summary-grid small,
.billing-note small {
  color: var(--muted);
}

.billing-summary-grid strong {
  font-size: 1.02rem;
  font-weight: 600;
}

.billing-summary-grid span {
  color: var(--muted);
  font-size: 0.82rem;
}

.billing-plan-card {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(420px, 0.9fr);
  align-items: stretch;
  gap: 14px;
  padding: 18px;
}

.billing-plan-copy {
  display: grid;
  align-content: center;
  gap: 4px;
}

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

.billing-seat-grid label,
.billing-seat-total {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: #fbfaf7;
}

.billing-seat-grid label:focus-within {
  border-color: #8ecdbb;
  box-shadow: 0 0 0 3px rgba(20, 134, 105, 0.09);
}

.billing-seat-grid span,
.billing-seat-total small {
  color: var(--muted);
  font-size: 0.78rem;
}

.billing-seat-grid input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.billing-seat-grid small {
  color: var(--muted);
  font-size: 0.75rem;
}

.billing-seat-total {
  align-content: center;
}

.billing-seat-total strong {
  font-size: 1.25rem;
}

.billing-actions-card {
  padding: 14px 16px;
  background: #fbfaf7;
}

.billing-actions-card > div:first-child {
  display: grid;
  gap: 4px;
}

.billing-actions-card small {
  color: var(--muted);
}

.billing-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.billing-note {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: #fbfaf7;
}

@media (max-width: 980px) {
  .billing-hero,
  .billing-actions-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .billing-hero-status {
    justify-items: start;
    min-width: 0;
  }

  .billing-summary-grid,
  .billing-plan-card {
    grid-template-columns: 1fr;
  }

  .billing-seat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .billing-seat-grid {
    grid-template-columns: 1fr;
  }
}

.integration-connected {
  color: #047857;
  background: #e8f8f0;
}

.integration-needs-attention {
  color: #92400e;
  background: #fff2d7;
}

.integration-warning {
  color: #b45309 !important;
}

.firm-command-layout {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(460px, 1.05fr) minmax(420px, 0.95fr);
  gap: 16px;
  align-items: stretch;
}

.firm-command-layout.miller-disabled {
  grid-template-columns: minmax(0, 1fr);
}

.firm-snapshot-panel,
.firm-command-miller-card {
  min-height: 320px;
}

.firm-snapshot-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  background: #fff;
}

.firm-dashboard-scope-control {
  display: grid;
  gap: 5px;
  min-width: min(280px, 100%);
  color: var(--muted);
  font-size: 0.76rem;
}

.firm-dashboard-scope-control select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0 12px;
}

.firm-snapshot-metric-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.firm-snapshot-metric {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 24px rgba(26, 22, 18, 0.04);
  padding: 12px;
}

.firm-snapshot-metric span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.firm-snapshot-metric strong {
  color: var(--ink);
  font-size: clamp(1.2rem, 1.5vw, 1.55rem);
  font-weight: 500;
}

.firm-snapshot-metric small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.firm-snapshot-attention {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.firm-snapshot-attention h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
}

.firm-snapshot-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.firm-snapshot-signal-grid.work-only {
  grid-template-columns: minmax(0, 1fr);
}

.firm-snapshot-signal-grid article {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px 12px;
}

.firm-snapshot-signal-grid article.wide {
  grid-column: 1 / -1;
  min-height: auto;
}

.firm-snapshot-signal-grid strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.2;
}

.firm-snapshot-signal-grid span {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.25;
}

.firm-snapshot-signal-grid small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.firm-miller-internal-panel {
  background: #fff;
}

.firm-command-miller-card {
  min-height: 420px;
}

.firm-miller-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.firm-miller-internal-pill {
  min-width: auto;
  min-height: 34px;
  padding: 0 13px;
  white-space: nowrap;
  font-size: 0.82rem;
}

.firm-miller-history-panel {
  margin-top: 0;
}

.firm-miller-assistant-form {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  padding: 12px;
}

.firm-miller-input-form {
  margin-top: 14px;
}

.firm-miller-assistant-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
}

.firm-miller-assistant-form textarea {
  width: 100%;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-weight: 400;
  resize: vertical;
}

.firm-miller-assistant-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.firm-miller-assistant-actions span,
.firm-miller-internal-response p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.firm-miller-chat-empty {
  display: grid;
  gap: 5px;
  border: 1px dashed rgba(35, 32, 29, 0.16);
  border-radius: var(--radius);
  background: #fbfaf7;
  padding: 18px;
  color: var(--muted);
}

.firm-miller-chat-empty strong {
  color: var(--ink);
  font-weight: 500;
}

.firm-miller-chat-thread {
  flex: 1;
  min-height: 260px;
  max-height: 420px;
  border: 0;
}

.firm-miller-answer-title {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 500;
}

.firm-miller-internal-response {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: var(--radius);
  background: #f6fbf8;
  padding: 12px;
}

.firm-miller-internal-response h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
}

.firm-miller-source-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.firm-miller-source-grid span {
  border: 1px solid rgba(20, 121, 91, 0.14);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 0.76rem;
}

.firm-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.75fr);
  gap: 16px;
}

.migration-center-panel {
  display: grid;
  gap: 16px;
  background: #fff;
}

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

.migration-summary-grid span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 0.84rem;
}

.migration-summary-grid strong {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 500;
}

.migration-import-form {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(20, 121, 91, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  padding: 14px;
}

.migration-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.75fr);
  gap: 12px;
}

.migration-import-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
}

.migration-import-form select,
.migration-import-form input,
.migration-import-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-weight: 400;
}

.migration-import-form select,
.migration-import-form input {
  min-height: 40px;
}

.migration-import-form textarea {
  min-height: 132px;
  resize: vertical;
}

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

.migration-import-notice {
  margin: 0;
  border: 1px solid rgba(247, 201, 72, 0.24);
  border-radius: var(--radius);
  background: #fffaf0;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 0.88rem;
}

.migration-preview-list {
  display: grid;
  gap: 8px;
}

.migration-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  padding: 12px;
}

.migration-preview-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.migration-preview-row strong {
  color: var(--ink);
  font-weight: 500;
}

.migration-preview-row small {
  color: var(--muted);
  font-size: 0.78rem;
}

.migration-preview-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f3f1ef;
  color: var(--muted);
  padding: 4px 9px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.advisor-roster-panel {
  display: grid;
  gap: 16px;
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.82), rgba(255, 255, 255, 0.96) 48%, rgba(255, 246, 223, 0.68)),
    #fff;
}

.advisor-roster-list {
  display: grid;
  gap: 10px;
}

.advisor-roster-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.advisor-roster-row span {
  color: var(--ink);
  font-size: 0.95rem;
}

.advisor-roster-row strong {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 500;
}

.advisor-roster-row small {
  color: var(--muted);
  font-size: 0.78rem;
}

.firm-team-panel {
  display: grid;
  gap: 16px;
  background: #fff;
}

.firm-team-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.firm-planning-tools-default-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 245, 0.92)),
    #fff;
  padding: 12px;
}

.firm-planning-tools-default-card span {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
}

.firm-planning-tools-default-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.firm-planning-tools-default-card label,
.planning-tools-lock-select-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
}

.firm-planning-tools-default-card select,
.planning-tools-lock-select-field select {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
}

.planning-tools-lock-select-field small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.firm-team-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.firm-team-summary span {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 10px 12px;
  font-size: 0.86rem;
}

.firm-team-summary strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 500;
}

.firm-tags-panel {
  display: grid;
  gap: 14px;
}

.firm-tags-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.firm-tags-summary span {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 0.78rem;
}

.firm-tags-summary strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 500;
}

.firm-tag-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid rgba(20, 121, 91, 0.14);
  border-radius: var(--radius);
  background: #fbfdfc;
  padding: 14px;
}

.firm-tag-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  min-width: 0;
}

.firm-tag-multiple-button {
  align-self: end;
  min-height: 40px;
  white-space: nowrap;
}

.firm-multi-tag-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.82), rgba(255, 255, 255, 0.96)),
    #fff;
  padding: 14px;
}

.firm-tag-form label,
.firm-tag-row label,
.firm-multi-tag-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.firm-tag-form input,
.firm-tag-row input,
.firm-multi-tag-form textarea {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
  font: inherit;
}

.firm-multi-tag-form textarea {
  min-height: 116px;
  padding: 11px;
  resize: vertical;
}

.firm-multi-tag-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.firm-tag-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 10px;
}

.firm-tag-row {
  display: grid;
  grid-template-columns: minmax(132px, 0.42fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(250, 249, 246, 0.82), rgba(255, 255, 255, 0.96)),
    #fff;
  padding: 12px 14px;
}

.firm-tag-preview {
  display: grid;
  gap: 7px;
  align-content: center;
  min-width: 0;
}

.firm-tag-preview small {
  color: var(--muted);
  font-size: 0.72rem;
}

.firm-tag-edit-field {
  min-width: 0;
}

.firm-tag-edit-field span {
  color: var(--muted);
  font-size: 0.72rem;
}

.firm-tag-row-actions {
  display: flex;
  justify-content: flex-end;
}

.firm-member-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  border: 1px solid rgba(241, 165, 31, 0.28);
  border-radius: var(--radius);
  background: #fffaf0;
  padding: 14px;
}

.firm-member-form label,
.firm-team-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
}

.firm-member-form input,
.firm-member-form select,
.firm-team-row input,
.firm-team-row select,
.firm-team-row textarea {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-weight: 400;
}

.firm-team-row textarea {
  min-height: 78px;
  padding: 10px;
  resize: vertical;
}

.firm-member-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.firm-member-address-field {
  grid-column: span 2;
}

.firm-member-access-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(220px, 1fr) minmax(260px, 1fr);
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 245, 0.9)),
    #fff;
}

.firm-member-access-state-card {
  display: grid;
  gap: 6px;
  min-height: 64px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 8px 10px;
}

.firm-member-access-state-card > span {
  color: var(--muted);
  font-size: 0.76rem;
}

.firm-member-access-state-card small {
  color: var(--muted);
  font-size: 0.74rem;
}

.firm-member-access-state-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.firm-member-access-button {
  min-height: 30px;
  width: max-content;
  padding: 0 10px;
  font-size: 0.74rem;
}

.firm-team-list {
  display: grid;
  gap: 10px;
}

.firm-team-row {
  display: grid;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 246, 0.88)),
    #fff;
  padding: 14px;
  box-shadow: 0 12px 34px rgba(26, 22, 18, 0.045);
}

.firm-team-row-main {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.firm-team-fields-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.firm-owner-row {
  border-color: rgba(241, 165, 31, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.72), rgba(255, 255, 255, 0.98)),
    #fff;
}

.firm-team-identity {
  display: grid;
  gap: 10px;
  min-width: 0;
  height: 100%;
  align-content: start;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(250, 249, 246, 0.86)),
    #fff;
  padding: 12px;
}

.firm-team-identity-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.firm-team-identity-header span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.firm-team-identity strong {
  color: var(--ink);
  font-weight: 500;
}

.firm-team-summary-lines {
  display: grid;
  gap: 5px;
}

.firm-team-summary-lines .entity-id-line {
  margin-top: 1px;
}

.firm-team-editor-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.firm-team-editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(26, 21, 15, 0.08);
}

.firm-team-editor-heading span {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
}

.firm-team-editor-heading small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.firm-member-profile-photo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.firm-member-profile-avatar {
  display: inline-grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(31, 151, 118, 0.22);
  border-radius: 50%;
  background: #effaf5;
  color: var(--green);
  font-weight: 700;
}

.firm-member-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.firm-member-profile-photo-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.firm-member-profile-photo-copy span {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
}

.firm-member-profile-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.firm-member-profile-photo-actions .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 11px;
  font-size: 0.78rem;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}

.firm-team-identity small {
  color: var(--muted);
  font-size: 0.78rem;
}

.firm-team-identity .firm-member-needs-details {
  color: #9a6a00;
}

.firm-member-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.firm-member-setup-link {
  color: var(--orange);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.78rem;
}

.firm-member-setup-link:hover {
  text-decoration: underline;
}

.firm-member-invite-button {
  width: max-content;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.firm-member-invite-status {
  flex: 1 1 100%;
  color: var(--muted);
  font-size: 0.76rem;
}

.firm-owner-pill,
.firm-member-status {
  display: inline-flex;
  width: max-content;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 0.72rem;
  font-style: normal;
}

.firm-member-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  align-self: end;
  min-height: 38px;
  align-items: center;
}

.firm-member-advisor-defaults {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.58), rgba(255, 255, 255, 0.96) 48%, rgba(255, 248, 231, 0.36)),
    #fff;
  padding: 12px;
}

.firm-member-advisor-defaults-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(26, 21, 15, 0.08);
}

.firm-member-advisor-defaults-header span {
  display: block;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 650;
}

.firm-member-advisor-defaults-header small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.firm-advisor-card-count {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: rgba(237, 248, 244, 0.86);
  color: var(--green);
  padding: 0 10px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 600;
}

.firm-member-advisor-defaults-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 0.8fr);
  gap: 12px;
  align-items: start;
}

.firm-advisor-message-panel,
.firm-advisor-headshot-field,
.firm-advisor-contact-section {
  min-width: 0;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  padding: 12px;
}

.firm-advisor-card-copy-field,
.firm-advisor-headshot-field {
  min-width: 0;
}

.firm-advisor-card-copy-field {
  display: grid;
  gap: 7px;
}

.firm-advisor-headshot-field {
  display: grid;
  gap: 10px;
}

.firm-advisor-headshot-upload {
  box-shadow: none;
  border-color: rgba(20, 121, 91, 0.14);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.66), rgba(255, 255, 255, 0.96)),
    #fff;
  padding: 12px;
}

.firm-advisor-contact-section {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
}

.firm-advisor-contact-section-header span {
  display: block;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
}

.firm-advisor-contact-section-header small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.firm-advisor-contact-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.firm-advisor-contact-option {
  min-height: 56px;
  align-content: center;
  padding: 9px 10px;
}

.firm-advisor-contact-option span {
  font-size: 0.8rem;
}

.firm-owner-pill {
  background: #fff1bd;
  color: #7b5a06;
}

.firm-member-status {
  background: #f3f1ef;
  color: var(--muted);
}

.firm-member-status.active {
  background: #e8f7f1;
  color: var(--green);
}

.firm-member-status.pending-invite {
  background: #fff8dc;
  color: #7b5a06;
}

.firm-member-status.not-invited {
  background: #f3f1ef;
  color: var(--muted);
}

.firm-member-status.account-active {
  background: #e8f7f1;
  color: #007a5a;
}

.firm-member-status.needs-details {
  background: #fff4dd;
  color: #9a6a00;
}

.firm-member-status.inactive {
  background: #fff0ec;
  color: var(--ember);
}

.firm-member-remove {
  width: 28px;
  height: 28px;
  min-height: 28px;
  margin-left: auto;
  font-size: 0.85rem;
}

.firm-member-remove:disabled,
.firm-team-row select:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.firm-miller-command-panel {
  display: grid;
  gap: 18px;
  background: #fff;
}

.firm-miller-command-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
}

.firm-miller-main,
.firm-miller-insights {
  display: grid;
  align-content: start;
  gap: 14px;
}

.firm-miller-insights section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
  box-shadow: 0 12px 28px rgba(26, 22, 18, 0.04);
}

.firm-miller-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.firm-miller-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
  box-shadow: 0 12px 26px rgba(26, 22, 18, 0.035);
}

.firm-miller-status-card div {
  display: grid;
  gap: 4px;
}

.firm-miller-status-card small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.firm-miller-status-card span,
.firm-topic-list span,
.firm-miller-roadmap span,
.firm-miller-priority-list article > div > span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.firm-miller-status-card strong {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 500;
}

.firm-miller-status-card.needs-response {
  border-color: rgba(200, 41, 30, 0.2);
  background: #fff;
  box-shadow: inset 4px 0 0 rgba(200, 41, 30, 0.52), 0 12px 26px rgba(26, 22, 18, 0.035);
}

.firm-miller-status-card.advisor-review {
  border-color: rgba(247, 201, 72, 0.34);
  background: #fff;
  box-shadow: inset 4px 0 0 rgba(247, 201, 72, 0.72), 0 12px 26px rgba(26, 22, 18, 0.035);
}

.firm-miller-status-card.monitor {
  border-color: rgba(35, 32, 29, 0.12);
  background: #fff;
  box-shadow: inset 4px 0 0 rgba(35, 32, 29, 0.42), 0 12px 26px rgba(26, 22, 18, 0.035);
}

.firm-miller-status-card.referral {
  border-color: rgba(20, 121, 91, 0.22);
  background: #fff;
  box-shadow: inset 4px 0 0 rgba(20, 121, 91, 0.58), 0 12px 26px rgba(26, 22, 18, 0.035);
}

.firm-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.firm-panel {
  min-width: 0;
}

.firm-panel-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  border-radius: 999px;
  background: #f5f1ea;
  color: var(--ink);
  font-size: 0.84rem;
}

.task-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.task-header-actions .secondary-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.86rem;
  font-weight: 650;
}

.task-header-actions .secondary-button.active {
  border-color: rgba(241, 165, 31, 0.44);
  background: #fff6df;
  color: var(--ink);
}

.firm-action-list,
.firm-miller-list,
.firm-compact-list,
.firm-focus-list {
  display: grid;
  gap: 10px;
}

.firm-action-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

button.firm-action-item {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.firm-action-item:hover {
  border-color: rgba(35, 32, 29, 0.18);
  background: #fffaf3;
}

.firm-action-item.red {
  border-left-color: var(--red);
}

.firm-action-item.green {
  border-left-color: var(--green);
}

.firm-action-item.charcoal {
  border-left-color: var(--charcoal);
}

.firm-action-item span,
.firm-focus-list span,
.firm-health-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.firm-action-item strong,
.firm-miller-list strong,
.firm-compact-list span,
.firm-focus-list strong,
.firm-health-grid strong {
  color: var(--ink);
  font-weight: 500;
}

.firm-action-item p,
.firm-miller-list p,
.firm-focus-list small,
.firm-compact-list small {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.opportunity-command-panel {
  gap: 12px;
}

.opportunity-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.opportunity-section-toggle {
  min-height: 36px;
  padding: 0 14px;
  white-space: nowrap;
}

.opportunity-collapsed-summary {
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  padding: 14px 16px;
  font-size: 0.86rem;
  line-height: 1.4;
}

.opportunity-brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(238, 248, 244, 0.9), rgba(255, 255, 255, 0.96) 58%, rgba(255, 249, 238, 0.78)),
    #fff;
}

.opportunity-brief span {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.opportunity-brief strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 650;
  line-height: 1.25;
}

.opportunity-brief p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.opportunity-scan-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.opportunity-strip-item {
  display: inline-grid;
  min-width: 116px;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
}

.opportunity-strip-item strong {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1;
}

.opportunity-strip-item small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.opportunity-strip-item.risk {
  border-color: rgba(184, 38, 43, 0.22);
  background: #fff7f5;
}

.opportunity-strip-item.miss {
  border-color: rgba(207, 151, 36, 0.28);
  background: #fffaf0;
}

.opportunity-strip-item.opportunity {
  border-color: rgba(20, 121, 91, 0.18);
  background: #f1faf6;
}

.opportunity-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.opportunity-toggle button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
}

.opportunity-toggle button.active {
  background: var(--charcoal);
  color: #fff;
}

.opportunity-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
}

.opportunity-metric-grid article {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
}

.opportunity-metric-grid article.is-priority {
  border-color: rgba(20, 121, 91, 0.18);
  background: #f1faf6;
}

.opportunity-metric-grid span,
.opportunity-list-heading span,
.opportunity-card-top span,
.opportunity-signal-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.opportunity-metric-grid strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1.18;
}

.opportunity-metric-grid small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.opportunity-command-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.28fr);
  gap: 14px;
  align-items: start;
}

.opportunity-list {
  display: grid;
  gap: 12px;
}

.opportunity-list-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 0 2px 2px;
}

.opportunity-list-heading h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 500;
}

.opportunity-list-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.opportunity-list-heading span {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 6px 10px;
  white-space: nowrap;
}

.opportunity-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.2fr);
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid #f1a51f;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 18px rgba(35, 32, 29, 0.035);
  content-visibility: auto;
  contain-intrinsic-size: 210px;
}

.opportunity-card.green {
  border-left-color: var(--green);
}

.opportunity-card.red {
  border-left-color: var(--red);
}

.opportunity-card.charcoal {
  border-left-color: var(--charcoal);
}

.opportunity-card-main {
  display: grid;
  gap: 7px;
}

.opportunity-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.opportunity-category-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink) !important;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

.opportunity-category-pill.risk {
  border-color: rgba(184, 38, 43, 0.2);
  background: #fff4f2;
  color: var(--red) !important;
}

.opportunity-category-pill.miss {
  border-color: rgba(207, 151, 36, 0.28);
  background: #fff8e8;
}

.opportunity-category-pill.opportunity {
  border-color: rgba(20, 121, 91, 0.2);
  background: #edf8f4;
  color: var(--green) !important;
}

.opportunity-card-top em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #f5f1ea;
  color: var(--ink);
  padding: 5px 8px;
  font-size: 0.72rem;
  font-style: normal;
  white-space: nowrap;
}

.opportunity-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.97rem;
  font-weight: 500;
}

.opportunity-card-heading {
  display: grid;
  gap: 6px;
}

.opportunity-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.opportunity-advisor-prompt {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(35, 32, 29, 0.07);
  border-radius: 8px;
  background: #fcfbf8;
}

.opportunity-advisor-prompt span,
.opportunity-household-block span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.opportunity-advisor-prompt p {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.34;
}

.opportunity-signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 1px;
}

.opportunity-signal-grid div {
  min-width: 0;
  padding-left: 8px;
  border-left: 2px solid rgba(20, 121, 91, 0.24);
}

.opportunity-signal-grid p {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.34;
}

.opportunity-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.opportunity-household-block {
  display: grid;
  gap: 4px;
}

.opportunity-card-side strong {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.3;
}

.opportunity-card-side small {
  color: var(--muted);
  line-height: 1.4;
}

.opportunity-route-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #faf8f4;
  color: var(--muted);
  padding: 5px 8px;
  font-size: 0.72rem;
}

.opportunity-card-side .secondary-button {
  width: 100%;
  justify-content: center;
  min-height: 34px;
  font-weight: 650;
}

.opportunity-card-actions {
  display: grid;
  width: 100%;
  gap: 6px;
}

.opportunity-load-more-button {
  justify-self: center;
  min-height: 38px;
  margin-top: 2px;
  padding: 0 18px;
}

.opportunity-ignore-button {
  color: var(--muted);
  background: #fff;
}

.opportunity-ignore-menu {
  display: grid;
  width: 100%;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #faf8f4;
}

.opportunity-ignore-menu .secondary-button {
  min-height: 34px;
  font-size: 0.9rem;
  font-weight: 560;
}

.danger-soft-button {
  border-color: rgba(184, 38, 43, 0.18);
  background: #fff4f2;
  color: var(--red);
}

.opportunity-insight-panel {
  display: grid;
  gap: 12px;
}

.opportunity-insight-panel section {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.opportunity-insight-panel .opportunity-insight-hero {
  border-color: rgba(20, 121, 91, 0.16);
  background:
    linear-gradient(135deg, rgba(238, 248, 244, 0.9), rgba(255, 255, 255, 0.96)),
    #fff;
}

.opportunity-insight-panel h3 {
  margin: 4px 0 8px;
  font-size: 1.02rem;
  font-weight: 500;
}

.opportunity-insight-panel p,
.opportunity-insight-panel li {
  color: var(--muted);
  line-height: 1.45;
}

.opportunity-insight-panel ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.opportunity-insight-panel li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 4px;
  margin-right: 8px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg) translate(1px, -2px);
}

.opportunity-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opportunity-chip-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 6px 9px;
  font-size: 0.78rem;
}

.opportunity-next-step {
  background: #fff !important;
}

.opportunity-next-step span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.opportunity-next-step strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
}

.flames-prompt-performance-card {
  gap: 16px;
  margin-top: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 250, 0.96) 48%, rgba(255, 249, 236, 0.72)),
    #fff;
}

.flames-prompt-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.flames-prompt-summary-grid article {
  display: grid;
  gap: 5px;
  min-height: 104px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  padding: 12px;
}

.flames-prompt-performance-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.84rem;
}

.flames-prompt-performance-note strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
}

.flames-prompt-control-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.flames-prompt-rank-bar,
.flames-prompt-filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.flames-prompt-rank-bar {
  justify-content: flex-start;
}

.flames-prompt-rank-bar > span,
.flames-prompt-filter-toolbar span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.flames-prompt-rank-bar button {
  min-height: 32px;
  border: 1px solid rgba(35, 32, 29, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #4f5964;
  padding: 0 10px;
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}

.flames-prompt-rank-bar button:hover,
.flames-prompt-rank-bar button.active {
  border-color: rgba(20, 121, 91, 0.26);
  background: #edf8f4;
  color: var(--green);
}

.flames-prompt-filter-toolbar > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.flames-prompt-filter-toolbar strong {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
}

.flames-prompt-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
  padding: 2px;
}

.flames-prompt-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 320px;
  min-height: 34px;
  border: 1px solid rgba(35, 32, 29, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #4f5964;
  padding: 5px 9px 5px 11px;
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}

.flames-prompt-filter-chip.active {
  border-color: rgba(20, 121, 91, 0.28);
  background: #edf8f4;
  color: var(--green);
}

.flames-prompt-filter-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flames-prompt-filter-chip small {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(35, 32, 29, 0.06);
  color: var(--muted);
  padding: 3px 6px;
  font-size: 0.68rem;
}

.flames-prompt-filter-chip.active small {
  background: #fff;
  color: var(--green);
}

.flames-prompt-performance-table {
  display: grid;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
  padding-right: 2px;
}

.flames-prompt-performance-row {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(320px, 1.3fr) minmax(190px, 0.55fr) minmax(190px, 0.52fr);
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  padding: 12px;
}

.flames-prompt-performance-row.header {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: auto;
  border-color: transparent;
  background: rgba(251, 250, 247, 0.96);
  color: var(--muted);
  padding: 8px 12px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.flames-prompt-performance-row.has-activity {
  border-color: rgba(20, 121, 91, 0.24);
  background: linear-gradient(135deg, rgba(237, 248, 244, 0.86), rgba(255, 255, 255, 0.98));
}

.flames-prompt-performance-row > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.flames-prompt-performance-row strong,
.flames-prompt-performance-row p,
.flames-prompt-performance-row small {
  overflow-wrap: anywhere;
}

.flames-prompt-performance-row strong {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.3;
}

.flames-prompt-performance-row p {
  margin: 0;
  color: #3f4853;
  font-size: 0.84rem;
  line-height: 1.44;
}

.flames-prompt-performance-row small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.flames-prompt-category,
.flames-prompt-cta-preview {
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(35, 32, 29, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #4f5964;
  padding: 5px 9px;
  font-size: 0.74rem;
  line-height: 1.2;
}

.flames-prompt-cta-preview {
  min-height: 30px;
  border-color: rgba(20, 121, 91, 0.2);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 650;
}

@media (max-width: 1180px) {
  .flames-prompt-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flames-prompt-performance-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flames-prompt-performance-row.header {
    display: none;
  }
}

@media (max-width: 760px) {
  .flames-prompt-summary-grid,
  .flames-prompt-performance-row {
    grid-template-columns: 1fr;
  }

  .flames-prompt-filter-toolbar,
  .flames-prompt-filter-toolbar > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .flames-prompt-filter-chip {
    max-width: 100%;
    width: 100%;
    justify-content: space-between;
  }
}

.task-workflow-panel {
  gap: 18px;
}

.task-workflow-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 1fr) 220px;
  gap: 12px;
  margin-bottom: 10px;
}

.task-window-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.35fr);
  align-items: center;
  gap: 16px;
  margin: 4px 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.98), rgba(249, 246, 239, 0.96) 74%),
    #f4faf7;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 28px rgba(20, 121, 91, 0.05);
}

.task-window-panel h3 {
  margin: 3px 0 4px;
  font-size: 1rem;
  font-weight: 500;
}

.task-window-panel .panel-copy {
  margin: 0;
  font-size: 0.84rem;
}

.task-window-default-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.task-window-default-row small {
  color: var(--muted);
  font-size: 0.76rem;
}

.task-window-default-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.task-window-default-button.saved {
  border-color: rgba(20, 121, 91, 0.28);
  background: #edf8f4;
  color: #0f6f55;
}

.task-window-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr);
  gap: 10px;
}

.task-window-controls label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
}

.task-window-controls select,
.task-window-controls input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

.task-window-controls input:disabled {
  background: #f4f1ec;
  color: var(--muted);
  cursor: not-allowed;
}

.task-workflow-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
}

.task-workflow-context span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.task-workflow-context strong {
  font-weight: 500;
}

.task-workflow-list {
  display: grid;
  gap: 10px;
}

.task-workflow-row {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.task-workflow-row:hover {
  border-color: rgba(26, 21, 15, 0.14);
  background: #fffdf9;
  box-shadow: 0 10px 26px rgba(26, 21, 15, 0.04);
}

.task-workflow-row.editing {
  background: linear-gradient(135deg, rgba(255, 246, 223, 0.42), #fff 62%);
}

.task-workflow-row.red {
  border-color: var(--line);
}

.task-workflow-row.green {
  border-color: var(--line);
}

.task-workflow-row.charcoal {
  border-color: var(--line);
}

.task-row-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.task-row-top span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.task-row-top strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-weight: 500;
}

.task-row-top p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.task-detail-copy {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.task-detail-copy p {
  margin: 0;
  white-space: pre-line;
}

.task-detail-list {
  margin: 4px 0 0;
  padding-left: 1.25rem;
}

.task-detail-list li + li {
  margin-top: 2px;
}

.task-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.task-row-meta small {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(26, 21, 15, 0.08);
  border-radius: 999px;
  background: #fbfaf7;
  color: var(--muted);
  padding: 0 8px;
  font-size: 0.76rem;
}

.task-client-complete-notice {
  display: grid;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background: #edf8f4;
  padding: 9px 11px;
}

.task-client-complete-notice span {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 500;
  text-transform: none;
}

.task-client-complete-notice small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.task-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: center;
  justify-content: flex-end;
  gap: 6px;
}

.task-row-actions .secondary-button {
  min-height: 34px;
  min-width: auto;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 650;
}

.task-row-actions [data-edit-task] {
  padding-inline: 10px;
}

.task-row-completion-actions {
  display: grid;
  gap: 6px;
}

.task-row-actions .task-history-button {
  border-color: rgba(26, 21, 15, 0.1);
  background: #fbfaf7;
  color: var(--muted);
}

.task-row-actions .task-history-button[aria-expanded="true"],
.task-row-actions .task-history-button:hover {
  border-color: rgba(20, 121, 91, 0.22);
  background: #edf8f4;
  color: var(--green);
}

.task-row-actions [data-firm-open-household] {
  background: #fbfaf7;
}

.task-row-actions [data-complete-task] {
  border-color: rgba(20, 121, 91, 0.2);
  background: #edf8f4;
  color: var(--green);
}

.task-row-actions [data-complete-task]:hover {
  border-color: rgba(20, 121, 91, 0.34);
  background: #e2f4ed;
}

.task-row-actions .task-delete-button {
  border-color: rgba(184, 38, 43, 0.18);
  background: #fff7f6;
  color: var(--red);
}

.task-row-actions .task-delete-button:hover {
  border-color: rgba(184, 38, 43, 0.36);
  background: #ffecea;
}

.task-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  padding: 0 11px;
  font-size: 0.76rem;
}

.task-history-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(26, 21, 15, 0.08);
  border-radius: var(--radius);
  background: #fbfaf7;
  padding: 12px;
}

.task-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-history-header strong {
  font-weight: 650;
}

.task-history-header small {
  color: var(--muted);
  font-size: 0.78rem;
}

.task-history-list {
  display: grid;
  gap: 9px;
}

.task-history-entry {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.task-history-entry > span {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(20, 121, 91, 0.08);
}

.task-history-entry strong {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
}

.task-history-entry small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.task-assignment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
}

.task-edit-title {
  grid-column: span 2;
}

.task-edit-detail {
  grid-column: 1 / -1;
}

.task-detail-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.task-detail-heading > span:first-child {
  color: var(--muted);
}

.task-detail-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.task-format-button {
  min-height: 28px;
  border: 1px solid rgba(26, 21, 15, 0.1);
  border-radius: 999px;
  background: #fbfaf7;
  color: var(--ink);
  padding: 0 10px;
  font-size: 0.74rem;
  font-weight: 500;
}

.task-format-button:hover {
  border-color: rgba(20, 121, 91, 0.22);
  background: #edf8f4;
  color: var(--green);
}

.task-edit-due {
  min-width: 190px;
}

.task-edit-repeat {
  min-width: 170px;
}

.task-edit-repeat-preview {
  grid-column: 1 / -1;
}

.task-create-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.task-assignment-grid label,
.task-create-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.task-workflow-toolbar select,
.task-assignment-grid select,
.task-assignment-grid input,
.task-assignment-grid textarea,
.task-create-form input,
.task-create-form select,
.task-create-form textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

.task-assignment-grid textarea {
  min-height: 76px;
  padding: 10px 12px;
  resize: vertical;
}

.task-date-control {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
}

.task-date-picker-shell {
  position: relative;
  min-width: 52px;
}

.task-date-button {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.task-date-button:hover,
.task-date-button:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  background: #fffdf9;
  outline: none;
}

.task-date-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-date-control input[type="date"] {
  position: absolute;
  inset: 0;
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.task-date-control input[type="date"]::-webkit-calendar-picker-indicator {
  display: none;
}

.task-save-cell {
  display: grid;
  align-content: end;
  gap: 5px;
}

.task-save-cell small {
  color: var(--green);
  font-size: 0.74rem;
  text-align: center;
}

.task-save-button {
  min-height: 40px;
  min-width: 118px;
}

.task-save-button.task-save-ready {
  border-color: rgba(20, 121, 91, 0.28);
  background: #edf8f4;
  color: var(--green);
}

.task-save-button:disabled {
  cursor: default;
  opacity: 0.62;
}

.task-create-form {
  display: grid;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.task-bulk-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(241, 165, 31, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 246, 223, 0.62), rgba(255, 255, 255, 0.94) 56%),
    #fff;
}

.task-bulk-parse-form {
  display: grid;
  gap: 12px;
}

.task-bulk-textarea,
.task-bulk-draft-row label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.task-create-form textarea {
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
}

.task-bulk-parse-form textarea {
  width: 100%;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 12px;
  font: inherit;
  resize: vertical;
}

.task-create-detail {
  grid-column: span 2;
}

.task-repeat-preview {
  grid-column: 1 / -1;
  border: 1px solid rgba(241, 165, 31, 0.22);
  border-radius: var(--radius);
  background: #fff8e8;
  color: var(--charcoal);
  padding: 10px 12px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.task-bulk-empty {
  border: 1px dashed rgba(26, 21, 15, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  padding: 13px 14px;
  font-size: 0.86rem;
}

.task-bulk-empty span {
  display: block;
  color: var(--ink);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 6px;
}

.task-bulk-empty p {
  margin: 0;
  line-height: 1.55;
}

.task-bulk-create-form {
  display: grid;
  gap: 12px;
}

.task-bulk-draft-list {
  display: grid;
  gap: 10px;
}

.task-bulk-draft-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(140px, 0.75fr) minmax(150px, 0.85fr) minmax(190px, 1fr) minmax(150px, 0.75fr) minmax(240px, 1.1fr) 34px;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  padding: 12px;
}

.task-bulk-draft-row.client-context {
  grid-template-columns: minmax(220px, 1.15fr) minmax(150px, 0.75fr) minmax(190px, 1fr) minmax(150px, 0.75fr) minmax(240px, 1.1fr) 34px;
}

.task-bulk-draft-row label {
  min-width: 0;
}

.task-bulk-draft-row input,
.task-bulk-draft-row select,
.task-bulk-draft-row textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
}

.task-bulk-draft-row textarea {
  min-height: 72px;
  padding: 9px 10px;
  resize: vertical;
}

.task-bulk-title input {
  color: var(--ink);
}

.task-bulk-remove {
  align-self: end;
  width: 34px;
  height: 34px;
}

.task-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.task-empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
  color: var(--muted);
}

.task-repeat-pill {
  border-color: rgba(241, 165, 31, 0.22) !important;
  background: #fff6df !important;
  color: var(--ember) !important;
}

.task-scheduled-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.task-scheduled-panel.collapsed {
  gap: 0;
}

.task-scheduled-panel .task-workflow-context small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.task-scheduled-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.task-scheduled-list {
  display: grid;
  gap: 10px;
}

.task-scheduled-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px dashed rgba(26, 21, 15, 0.16);
  border-radius: var(--radius);
  background: #fbfaf7;
}

.task-scheduled-row span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.task-scheduled-row strong {
  display: block;
  margin-top: 3px;
  font-weight: 500;
}

.task-scheduled-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
}

.firm-miller-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(26, 22, 18, 0.035);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.firm-miller-list article:hover {
  border-color: rgba(35, 32, 29, 0.16);
  box-shadow: 0 16px 34px rgba(26, 22, 18, 0.06);
  transform: translateY(-1px);
}

.firm-miller-list-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 0;
}

.firm-miller-list-header h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 500;
}

.firm-miller-list-header span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f5f1ea;
  color: var(--muted);
  font-size: 0.78rem;
}

.firm-miller-conversation-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.firm-miller-conversation-meta span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.firm-miller-conversation-meta small {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f5f1ea;
  color: var(--muted);
  font-size: 0.72rem;
}

.firm-miller-list article > span {
  border-radius: 999px;
  background: #fff6df;
  color: var(--ember);
  padding: 5px 9px;
  font-size: 0.74rem;
  white-space: nowrap;
}

.firm-miller-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.firm-miller-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.firm-miller-actions .secondary-button,
.firm-miller-ignore-button {
  min-height: 34px;
  padding: 0 14px;
}

.firm-miller-ignore-button {
  color: var(--muted);
}

.firm-miller-ignore-button.confirming {
  border-color: rgba(200, 41, 30, 0.24);
  background: var(--ember-soft);
  color: var(--ember);
}

.firm-miller-actions em {
  border-radius: 999px;
  background: #f5f1ea;
  color: var(--ink);
  padding: 5px 9px;
  font-size: 0.74rem;
  font-style: normal;
  white-space: nowrap;
}

.firm-miller-actions em.needs-response {
  background: #fff0ed;
  color: var(--red);
}

.firm-miller-actions em.advisor-review {
  background: #fff6df;
  color: var(--ember);
}

.firm-miller-actions em.referral {
  background: #edf8f4;
  color: var(--green);
}

.panel-header.compact {
  margin-bottom: 10px;
}

.panel-header.compact h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 400;
}

.firm-topic-list,
.firm-miller-roadmap {
  display: grid;
  gap: 8px;
}

.firm-topic-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.firm-topic-list strong {
  color: var(--ink);
  font-weight: 500;
}

.firm-miller-roadmap span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
}

.firm-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.firm-health-grid div,
.firm-focus-list div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.firm-health-grid strong,
.firm-focus-list strong {
  display: block;
  margin-top: 6px;
  font-size: 1.12rem;
}

.firm-compact-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  text-align: left;
}

.firm-compact-list button:hover {
  border-color: rgba(200, 41, 30, 0.22);
  background: #fffaf4;
}

.tax-dashboard {
  display: grid;
  gap: 16px;
}

.tax-estimates-card {
  display: grid;
  gap: 16px;
}

.tax-rate-form {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-left: auto;
}

.tax-rate-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.tax-rate-form input {
  width: 86px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.tax-estimate-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tax-estimate-summary div,
.tax-quarter-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.tax-estimate-summary div {
  background:
    linear-gradient(135deg, rgba(247, 201, 72, 0.12), rgba(255, 255, 255, 0.95) 58%),
    #fff;
  padding: 14px;
}

.tax-estimate-summary span,
.tax-quarter-main span,
.tax-quarter-main small,
.tax-quarter-fields label {
  color: var(--muted);
  font-size: 0.78rem;
}

.tax-estimate-summary strong,
.tax-quarter-main strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-weight: 500;
}

.tax-quarterly-list {
  display: grid;
  gap: 10px;
}

.tax-quarter-row {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.tax-quarter-row.complete {
  border-color: rgba(20, 121, 91, 0.22);
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.08), rgba(255, 255, 255, 0.96) 52%),
    #fff;
}

.tax-quarter-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tax-made-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.tax-made-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.tax-quarter-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.tax-quarter-fields label {
  display: grid;
  gap: 6px;
}

.tax-quarter-fields .tax-made-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: end;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  white-space: nowrap;
}

.tax-quarter-fields .tax-made-toggle input {
  flex: 0 0 auto;
  margin: 0;
}

.tax-quarter-row.complete .tax-made-toggle {
  border-color: rgba(20, 121, 91, 0.2);
  background: #edf8f4;
}

.tax-quarter-fields input:not([type="checkbox"]) {
  min-height: 40px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
}

.tax-quarter-fields input[readonly] {
  background: #fbfaf7;
  color: var(--ink);
}

.household-list-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.household-admin-panel-stack {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.archived-households-panel {
  display: grid;
  gap: 14px;
}

.archived-households-heading,
.archived-household-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.archived-households-heading span {
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
}

.archived-households-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.archived-households-collapsed-note {
  display: flex;
  align-items: center;
  min-height: 58px;
  border: 1px dashed rgba(139, 129, 116, 0.34);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fbfaf7, #fff);
  color: var(--ink);
  padding: 12px 14px;
}

.archived-households-collapsed-note div {
  display: grid;
  gap: 4px;
}

.archived-households-collapsed-note strong {
  font-size: 0.92rem;
  font-weight: 500;
}

.archived-households-collapsed-note small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.archived-household-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.archived-household-row {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px 14px;
}

.archived-household-row div {
  display: grid;
  gap: 4px;
}

.archived-household-row strong {
  font-size: 0.95rem;
  font-weight: 500;
}

.archived-household-row small {
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 760px) {
  .archived-households-heading,
  .archived-households-heading-actions {
    grid-template-columns: 1fr;
  }

  .archived-households-heading {
    display: grid;
    align-items: stretch;
  }

  .archived-households-heading-actions {
    display: grid;
    justify-content: stretch;
  }

  .archived-households-heading-actions button {
    width: 100%;
  }
}

.household-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.household-list-toolbar .primary-button {
  flex: 0 0 auto;
}

.household-list-toolbar .search-input {
  width: min(420px, 100%);
}

.household-list-toolbar select {
  min-width: 180px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.household-list-toolbar span {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
}

.household-scroll-list {
  display: grid;
  gap: 8px;
  grid-auto-rows: max-content;
  align-content: start;
  max-height: min(1120px, calc(100vh - 170px));
  min-height: min(820px, calc(100vh - 170px));
  overflow: auto;
  padding-right: 4px;
  container-type: inline-size;
}

.household-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.45fr) minmax(96px, 0.5fr) minmax(110px, 0.58fr) minmax(82px, 0.44fr) minmax(112px, 0.58fr) minmax(128px, 0.62fr) minmax(180px, 0.95fr);
  gap: 12px;
  align-items: center;
  min-height: 128px;
  height: 128px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 16px;
  text-align: left;
  cursor: pointer;
  overflow: visible;
  position: relative;
}

.household-row:hover,
.household-row:focus-within {
  border-color: rgba(200, 41, 30, 0.22);
  background: #fffaf4;
  z-index: 8;
}

.household-row span {
  display: grid;
  gap: 5px;
  align-content: center;
  min-width: 0;
}

.household-row strong {
  font-size: 0.92rem;
  font-weight: 500;
}

.household-row small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.household-primary-cell {
  display: grid !important;
  align-self: center;
  align-content: center;
  gap: 12px !important;
  min-height: 88px;
  overflow: visible;
  padding-top: 5px;
}

.household-identity-block {
  display: grid !important;
  gap: 6px !important;
  min-width: 0;
}

.household-identity-top {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 8px !important;
  min-width: 0;
}

.household-client-stack {
  display: grid !important;
  flex: 0 1 auto;
  gap: 3px !important;
  align-content: center;
  min-height: 0;
  min-width: 0;
}

.household-person-name {
  display: block !important;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.94rem !important;
  font-weight: 500 !important;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.household-client-stack.has-secondary .household-person-name {
  line-height: 1.24;
}

.household-secondary-name {
  color: #171717;
}

.household-id-slot {
  display: flex !important;
  flex: 0 0 auto;
  align-self: center;
  justify-content: flex-start;
  min-width: max-content;
}

.household-id-slot .copy-id-pill {
  flex: 0 0 auto;
  min-height: 19px;
  padding: 0 7px;
  font-size: 0.66rem;
  line-height: 1;
}

.household-contact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 28px;
  padding: 0 12px;
  font-size: 0.74rem;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  margin-top: 0;
}

.household-invite-footer {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  flex-wrap: wrap;
  margin-top: 0;
  min-height: 0;
  min-width: 0;
  overflow: visible;
}

.household-invite-detail {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding-left: 2px;
  white-space: nowrap;
}

.household-invite-warning {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  color: #d93025;
  font-weight: 700;
  white-space: nowrap;
}

.household-invite-actions {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  flex-wrap: wrap;
  min-width: 0;
  overflow: visible;
  padding-top: 2px;
}

.household-invite-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 30px;
  margin-top: 0;
  padding: 0 11px;
  font-size: 0.73rem;
  white-space: nowrap;
  position: static;
}

.household-invite-action.primary-invite-action {
  border-color: var(--line);
  background: #fff;
}

.entity-id-line {
  display: inline-flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px !important;
  color: var(--muted);
  line-height: 1.25;
  margin-top: 1px;
}

.copy-id-pill {
  display: inline-flex;
  width: max-content;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #59636c;
  padding: 0 7px;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.copy-id-pill:hover,
.copy-id-pill:focus-visible {
  border-color: #c9c1b5;
  background: #fbfaf7;
  color: var(--ink);
  outline: none;
}

.copy-id-pill.copied {
  border-color: rgba(20, 121, 91, 0.22);
  background: #edf8f4;
  color: var(--green);
}

.household-tags-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 42px;
  cursor: default;
}

.household-tags-cell::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 39;
  width: min(280px, calc(100vw - 40px));
  height: 14px;
  pointer-events: none;
}

.household-tags-cell:hover::after,
.household-tags-cell:focus-within::after {
  pointer-events: auto;
}

.household-tags-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 999px;
  background: #fff;
  color: #5f666c;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: default;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.household-tags-summary.has-tags {
  border-color: rgba(20, 121, 91, 0.22);
  background: #edf8f4;
  color: var(--green);
}

.household-tags-summary:hover,
.household-tags-summary:focus-visible {
  border-color: rgba(20, 121, 91, 0.34);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
  outline: none;
}

.household-tags-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  display: grid;
  gap: 10px;
  width: min(280px, calc(100vw - 40px));
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 36px rgba(16, 24, 40, 0.14);
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
}

.household-tags-cell:hover .household-tags-popover,
.household-tags-cell:focus-within .household-tags-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.household-tags-popover-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.household-tags-popover-title small {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.household-tags-popover-title em {
  color: #6f7378;
  font-size: 0.72rem;
  font-style: normal;
  white-space: nowrap;
}

.crm-tag-controls {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.household-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  align-items: center;
}

.household-tag-pills.is-empty {
  min-height: 26px;
}

.client-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  width: max-content;
  max-width: 100%;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  padding: 0 8px;
  font-size: 0.76rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.client-tag-pill button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 121, 91, 0.1);
  color: var(--green);
  font-size: 0.72rem;
  cursor: pointer;
}

.client-tag-empty {
  display: inline-flex;
  color: var(--muted);
  font-size: 0.78rem;
}

.household-tag-select {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 9px;
  font-size: 0.78rem;
  cursor: pointer;
}

.household-tag-select:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

.relationship-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-style: normal;
  text-transform: capitalize;
}

.relationship-status-pill.active {
  background: #edf8f4;
  color: var(--green);
}

.relationship-status-pill.inactive {
  background: #f5f1ea;
  color: #6f7378;
}

@container (max-width: 760px) {
  .household-row {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
    min-height: 128px;
    height: auto;
    padding: 16px;
  }

  .household-row:has(.household-invite-action) {
    min-height: 128px;
    padding-bottom: 20px;
  }

  .household-row > span {
    align-content: center;
  }

  .household-row > span:first-child {
    gap: 9px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(226, 218, 208, 0.72);
  }

  .household-client-stack {
    gap: 4px !important;
  }

  .household-row > span:not(:first-child) {
    grid-template-columns: minmax(96px, max-content) 1fr;
    align-items: center;
    justify-content: start;
    gap: 8px 10px;
  }

  .household-row > span:not(:first-child) small {
    order: -1;
  }

  .household-invite-footer {
    display: flex !important;
    gap: 8px !important;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 4px;
  }

  .household-invite-actions {
    display: flex !important;
    align-items: center;
    gap: 8px !important;
    flex-wrap: wrap;
  }

  .household-invite-action {
    width: 100%;
    min-height: 30px;
    padding: 0 9px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .household-row > .household-tags-cell {
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 0;
  }

  .household-tags-cell::after {
    left: 0;
    right: auto;
  }

  .household-tags-popover {
    left: 0;
    right: auto;
  }

  .household-tag-select {
    width: 100%;
  }
}

.crm-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.crm-household-tags {
  margin-top: 16px;
}

.crm-household-tags:empty {
  display: none;
}

.crm-tags-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.4fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.crm-tags-panel h3 {
  margin: 2px 0 4px;
  font-size: 1rem;
  font-weight: 500;
}

.crm-tag-controls {
  justify-items: end;
}

@media (max-width: 760px) {
  .crm-tags-panel,
  .firm-tag-toolbar,
  .firm-tag-form,
  .firm-multi-tag-form,
  .firm-tag-list,
  .firm-tag-row,
  .firm-tags-summary {
    grid-template-columns: 1fr;
  }

  .crm-tag-controls,
  .firm-multi-tag-actions,
  .firm-tag-row-actions {
    justify-items: stretch;
    justify-content: stretch;
  }

  .firm-multi-tag-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .firm-tag-row-actions button,
  .firm-multi-tag-actions button {
    width: 100%;
  }
}

.crm-snapshot-card {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(247, 201, 72, 0.1), rgba(255, 255, 255, 0.95) 58%),
    #fff;
  box-shadow: var(--shadow);
}

.crm-snapshot-card.warning {
  background:
    linear-gradient(135deg, rgba(200, 41, 30, 0.1), rgba(255, 255, 255, 0.95) 62%),
    #fff;
}

.crm-snapshot-tag-card {
  display: grid;
  align-content: start;
  gap: 8px;
}

.crm-snapshot-tag-card strong {
  margin-bottom: 0;
}

.crm-snapshot-tag-controls {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.crm-snapshot-tag-card .household-tag-pills {
  min-height: 26px;
}

.crm-snapshot-tag-card .client-tag-empty {
  font-size: 0.76rem;
}

.relationship-card {
  display: grid;
  align-content: start;
}

.relationship-card.inactive {
  background:
    linear-gradient(135deg, rgba(35, 32, 29, 0.06), rgba(255, 255, 255, 0.95) 62%),
    #fff;
}

.relationship-toggle {
  width: max-content;
  min-height: 32px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-size: 0.78rem;
}

.relationship-toggle:hover {
  border-color: rgba(200, 41, 30, 0.24);
  background: #fffaf4;
}

.customize-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  margin-top: 16px;
}

.customize-card {
  display: grid;
  grid-column: span 4;
  align-content: start;
  gap: 14px;
  min-height: 100%;
  border-color: rgba(35, 32, 29, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 245, 0.9) 66%),
    #fff;
  box-shadow: 0 14px 34px rgba(26, 22, 18, 0.045);
}

.customize-card .panel-header {
  align-items: flex-start;
  min-height: 86px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(35, 32, 29, 0.08);
}

.customize-card .panel-header h2 {
  margin-top: 3px;
  font-size: 1.12rem;
  line-height: 1.24;
}

.customize-card .panel-copy {
  margin-top: 5px;
  max-width: 58ch;
}

.advisor-assignment-card {
  order: 1;
}

.planning-tools-lock-customization-card {
  order: 2;
}

.secure-vault-customization-card {
  order: 3;
}

.customize-layout > .customize-card:not(.advisor-assignment-card, .advisor-contact-customization-card, .planning-tools-lock-customization-card, .secure-vault-customization-card, .value-customization-card, .equity-customization-card) {
  order: 4;
}

.advisor-contact-customization-card {
  order: 5;
  grid-column: span 6;
}

.value-customization-card {
  order: 6;
  grid-column: span 6;
}

.equity-customization-card {
  order: 7;
  grid-column: 1 / -1;
}

.customize-card .business-structure-field {
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(250, 249, 245, 0.88)),
    #fff;
  padding: 12px;
}

.customize-card .business-structure-field select {
  min-height: 40px;
}

.customize-card .value-customization-summary {
  min-height: 74px;
  border-color: rgba(20, 121, 91, 0.16);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.8), rgba(255, 255, 255, 0.95) 62%),
    #fff;
}

.extra-tab-options {
  display: grid;
  gap: 10px;
}

.extra-tab-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 245, 0.92)),
    #fff;
  padding: 12px;
}

.extra-tab-option:has(input:checked) {
  border-color: rgba(20, 121, 91, 0.22);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.88), rgba(255, 255, 255, 0.95) 68%),
    #fff;
}

.extra-tab-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--ember);
}

.extra-tab-option span {
  display: grid;
  gap: 4px;
}

.extra-tab-option strong {
  font-size: 0.94rem;
  font-weight: 500;
}

.extra-tab-option small,
.customize-household-name {
  color: var(--muted);
  font-size: 0.82rem;
}

.business-hub-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
  align-items: start;
}

.business-profile-panel,
.business-hub-panel {
  min-width: 0;
}

.business-structure-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(247, 201, 72, 0.12), rgba(255, 255, 255, 0.96) 58%),
    #fff;
  padding: 14px;
}

.business-structure-card span,
.business-structure-card small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.business-structure-card strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.35;
}

.business-net-worth-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.business-net-worth-card,
.business-net-worth-empty {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.business-net-worth-card span,
.business-net-worth-card small,
.business-net-worth-empty {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.business-net-worth-card strong {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.3;
}

.business-net-worth-card.active {
  border-color: rgba(20, 121, 91, 0.24);
  background: #edf8f4;
}

.business-net-worth-card .secondary-button {
  justify-self: start;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 500;
}

.business-net-worth-card b {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.business-hub-list {
  display: grid;
  gap: 14px;
}

.business-hub-empty {
  border: 1px dashed rgba(35, 32, 29, 0.18);
  border-radius: var(--radius);
  background: #fbfaf7;
  color: var(--muted);
  padding: 16px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.business-hub-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.55), rgba(255, 255, 255, 0.96) 42%),
    #fff;
  padding: 16px;
  box-shadow: 0 12px 32px rgba(26, 22, 18, 0.045);
}

.business-hub-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.business-hub-card-header > div:first-child {
  min-width: 0;
}

.business-hub-card-header span,
.business-hub-value-card span,
.business-hub-metrics span {
  display: block;
  color: #68707a;
  font-size: 0.74rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.business-hub-card h3 {
  margin: 4px 0;
  color: var(--ink);
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.25;
}

.business-hub-card-header small,
.business-hub-metrics small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.business-hub-value-card {
  flex: 0 1 150px;
  min-width: 120px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px 12px;
  text-align: right;
}

.business-hub-value-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.business-hub-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.business-hub-metrics > div {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.business-hub-metrics > div.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background: #edf8f4;
}

.business-hub-metrics > div.warning {
  border-color: rgba(221, 75, 47, 0.18);
  background: #fff3ef;
}

.business-hub-metrics strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.business-hub-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.business-hub-form-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #4f555c;
  font-size: 0.78rem;
}

.business-hub-form-grid input,
.business-hub-form-grid select,
.business-hub-form-grid textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.business-hub-form-grid input,
.business-hub-form-grid select {
  min-height: 42px;
  padding: 0 12px;
}

.business-hub-form-grid textarea {
  min-height: 92px;
  resize: vertical;
  padding: 10px 12px;
  line-height: 1.4;
}

.business-hub-notes-field {
  grid-column: 1 / -1;
}

.business-net-worth-control {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 60px;
  border: 1px solid rgba(47, 143, 104, 0.18);
  border-radius: var(--radius);
  background: #f6fbf8;
  padding: 12px 14px;
}

.business-net-worth-control-copy {
  display: grid;
  gap: 3px;
}

.business-net-worth-control-copy strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
}

.business-net-worth-control-copy small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.business-net-worth-switch {
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
}

.business-net-worth-switch input {
  position: absolute;
  inset: 0;
  width: 46px;
  height: 26px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.business-net-worth-switch span {
  display: block;
  width: 46px;
  height: 26px;
  border: 1px solid rgba(35, 32, 29, 0.18);
  border-radius: 999px;
  background: #ded9d2;
  transition:
    background 0.18s ease,
    border-color 0.18s ease;
  pointer-events: none;
}

.business-net-worth-switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(35, 32, 29, 0.18);
  transition: transform 0.18s ease;
}

.business-net-worth-switch input:checked + span {
  border-color: rgba(47, 143, 104, 0.4);
  background: var(--green);
}

.business-net-worth-switch input:checked + span::after {
  transform: translateX(20px);
}

.business-net-worth-switch input:focus-visible + span {
  outline: 2px solid rgba(47, 143, 104, 0.28);
  outline-offset: 3px;
}

.business-balance-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.58), rgba(255, 255, 255, 0.96) 52%),
    #fff;
  padding: 14px;
}

.business-balance-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.business-balance-header span,
.business-balance-summary span,
.business-balance-link,
.business-balance-lock {
  color: #68707a;
  font-size: 0.76rem;
  line-height: 1.35;
}

.business-balance-header h4 {
  margin: 3px 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.25;
}

.business-balance-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.business-balance-net {
  flex: 0 0 158px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 10px 12px;
  text-align: right;
}

.business-balance-net strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.03rem;
  font-weight: 600;
}

.business-balance-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.business-balance-summary > div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
}

.business-balance-summary strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
}

.business-balance-summary small,
.business-balance-row small,
.business-balance-link small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.business-balance-bar {
  display: flex;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e2da;
}

.business-balance-bar span {
  display: block;
  min-width: 0;
}

.business-balance-assets {
  background: #62b69a;
}

.business-balance-liabilities {
  background: #e07a5f;
}

.business-balance-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.business-balance-lists > div {
  display: grid;
  align-content: start;
  gap: 8px;
}

.business-balance-lists h5 {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
}

.business-balance-row,
.business-balance-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 9px 10px;
}

.business-balance-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.business-balance-row strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-balance-row b {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
}

.business-balance-empty {
  grid-template-columns: 1fr;
  color: var(--muted);
  font-size: 0.82rem;
}

.business-balance-remove {
  min-height: auto;
  padding: 0;
  color: #68707a;
  font-size: 0.78rem;
  font-weight: 400;
}

.business-balance-link {
  display: grid;
  gap: 7px;
}

.business-balance-add-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(160px, 1fr) minmax(120px, 0.7fr) auto;
  gap: 8px;
  align-items: center;
}

.business-balance-link select,
.business-balance-link input {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0 12px;
}

.business-balance-add-form .secondary-button {
  min-height: 42px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .business-net-worth-control {
    align-items: flex-start;
    flex-direction: column;
  }

  .business-balance-header,
  .business-balance-lists {
    grid-template-columns: 1fr;
  }

  .business-balance-header {
    display: grid;
  }

  .business-balance-net {
    width: 100%;
    box-sizing: border-box;
    text-align: left;
  }

  .business-balance-summary {
    grid-template-columns: 1fr;
  }

  .business-balance-add-form {
    grid-template-columns: 1fr;
  }
}

.business-structure-field {
  display: grid;
  gap: 8px;
  color: #4f555c;
  font-size: 0.82rem;
}

.business-structure-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

.equity-dashboard {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.35fr);
  gap: 16px;
}

.equity-profile-panel,
.equity-grants-panel,
.equity-planning-panel {
  display: grid;
  gap: 16px;
}

.equity-planning-panel {
  grid-column: 1 / -1;
}

.equity-profile-grid {
  display: grid;
  gap: 10px;
}

.equity-profile-card,
.equity-profile-input {
  display: grid;
  gap: 7px;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.equity-profile-card {
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.08), rgba(255, 255, 255, 0.96) 66%),
    #fff;
}

.equity-profile-card span,
.equity-profile-input span,
.equity-grant-card-header span,
.equity-grant-grid label {
  color: var(--muted);
  font-size: 0.78rem;
}

.equity-profile-card strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}

.equity-profile-input input,
.equity-grant-grid input,
.equity-grant-grid select,
.equity-grant-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-weight: 400;
}

.equity-profile-input input,
.equity-grant-grid input,
.equity-grant-grid select {
  min-height: 40px;
}

.equity-grant-list {
  display: grid;
  gap: 12px;
}

.equity-grant-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.equity-grant-card.collapsed {
  gap: 0;
  border-top-color: rgba(20, 121, 91, 0.42);
  background: #fbfaf7;
}

.equity-grant-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.equity-grant-card-header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.equity-grant-card-header strong {
  color: var(--ink);
  font-weight: 500;
}

.equity-grant-card-header small {
  color: var(--muted);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equity-grant-card-header .equity-delete-confirm {
  color: var(--red);
  font-size: 0.75rem;
}

.equity-grant-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.equity-grant-toggle {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.8rem;
}

.equity-grant-delete-button.pending {
  border-color: rgba(200, 41, 30, 0.34);
  background: #fff1ed;
  color: var(--red);
}

.equity-grant-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.equity-grant-grid label {
  display: grid;
  gap: 7px;
}

.equity-grant-notes {
  grid-column: 1 / -1;
}

.equity-grant-grid textarea {
  min-height: 82px;
  padding-top: 10px;
  resize: vertical;
}

.equity-watchlist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.equity-watchlist span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfaf7;
  color: var(--ink);
  padding: 0 10px;
  font-size: 0.82rem;
}

.equity-type-options {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.value-customization-option small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.value-customization-card {
  min-height: 0;
}

.value-customization-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(247, 201, 72, 0.13), rgba(255, 255, 255, 0.94) 62%),
    #fff;
  padding: 12px;
}

.value-customization-summary span {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
}

.value-customization-summary small {
  color: var(--muted);
  font-size: 0.82rem;
}

.value-customization-list {
  display: grid;
  gap: 10px;
  max-height: min(520px, calc(100vh - 360px));
  overflow: auto;
  padding-right: 4px;
}

.customize-card .value-customization-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 390px;
}

.value-customization-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.value-customization-add-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.value-customization-add-form input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
}

.value-customization-add-form small {
  grid-column: 1 / -1;
  min-height: 1em;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
}

.advisor-contact-options {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.customize-card .advisor-contact-options,
.customize-card .equity-type-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 330px;
}

.advisor-contact-customization-card .advisor-headshot-customization {
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(250, 249, 245, 0.88)),
    #fff;
  padding: 12px;
}

.advisor-card-copy-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.advisor-card-copy-field textarea {
  width: 100%;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}

.advisor-card-copy-field textarea:disabled {
  background: #fbfaf7;
  color: var(--muted);
}

.value-customization-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 245, 0.9)),
    #fff;
  padding: 11px 12px;
}

.value-customization-option.checked {
  border-color: rgba(20, 121, 91, 0.24);
  background: #f4fbf8;
}

.value-customization-option input {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--green);
}

.value-customization-option:has(input:disabled) {
  background: #fbfaf7;
  opacity: 0.7;
}

.value-customization-option span {
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.35;
}

.crm-snapshot-card span,
.crm-snapshot-card small {
  color: var(--muted);
  font-size: 0.78rem;
}

.crm-snapshot-card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 1.35rem;
  font-weight: 500;
}

.crm-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

.crm-work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
  margin-top: 16px;
  align-items: stretch;
  transition: grid-template-columns 0.2s ease;
}

.crm-work-grid.activity-log-collapsed {
  grid-template-columns: minmax(0, 1fr) minmax(148px, 168px);
}

.crm-note-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.crm-note-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
}

.crm-note-form input,
.crm-note-form select,
.crm-note-form textarea,
.crm-note-form .rich-note-editor,
#crm-activity-filter {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.crm-note-form input,
.crm-note-form select,
#crm-activity-filter {
  min-height: 40px;
  padding: 0 12px;
}

.crm-note-form textarea {
  min-height: 190px;
}

.rich-note-editor {
  min-height: 190px;
  max-height: 520px;
  overflow: auto;
  padding: 12px;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.5;
  outline: none;
  white-space: normal;
}

.rich-note-editor.compact {
  min-height: 150px;
}

.rich-note-editor:focus {
  border-color: rgba(20, 121, 91, 0.32);
  box-shadow: 0 0 0 3px rgba(20, 121, 91, 0.08);
}

.rich-note-editor:empty::before {
  content: attr(data-placeholder);
  color: #7a8088;
}

.rich-note-editor p,
.rich-record-output p,
.rich-note-editor blockquote,
.rich-record-output blockquote,
.rich-note-editor ul,
.rich-record-output ul,
.rich-note-editor ol,
.rich-record-output ol {
  margin: 0 0 10px;
}

.rich-note-editor h1,
.rich-note-editor h2,
.rich-note-editor h3,
.rich-note-editor h4,
.rich-record-output h1,
.rich-record-output h2,
.rich-record-output h3,
.rich-record-output h4 {
  margin: 10px 0 6px;
  color: var(--ink);
  font-weight: 720;
  line-height: 1.25;
}

.rich-note-editor h1,
.rich-record-output h1 {
  font-size: 1.22rem;
}

.rich-note-editor h2,
.rich-record-output h2 {
  font-size: 1.1rem;
}

.rich-note-editor h3,
.rich-record-output h3,
.rich-note-editor h4,
.rich-record-output h4 {
  font-size: 0.98rem;
}

.rich-note-editor ul,
.rich-record-output ul,
.rich-note-editor ol,
.rich-record-output ol {
  padding-left: 22px;
}

.rich-note-editor blockquote,
.rich-record-output blockquote {
  border-left: 3px solid rgba(20, 121, 91, 0.24);
  padding: 6px 0 6px 12px;
  color: #535960;
  background: rgba(244, 251, 248, 0.72);
}

.rich-note-editor table,
.rich-record-output table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  overflow: hidden;
  border: 1px solid rgba(35, 32, 29, 0.12);
  border-radius: 8px;
  font-size: 0.86rem;
}

.rich-note-editor th,
.rich-note-editor td,
.rich-record-output th,
.rich-record-output td {
  border: 1px solid rgba(35, 32, 29, 0.1);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.rich-note-editor th,
.rich-record-output th {
  background: #f7f5f1;
  font-weight: 650;
}

.rich-note-editor img,
.rich-record-output img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px 0;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: 8px;
}

.rich-note-editor a,
.rich-record-output a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rich-record-output .crm-current-client-note {
  display: grid;
  gap: 8px;
  max-width: 680px;
  margin-top: 8px;
}

.rich-record-output .crm-current-client-meta,
.rich-record-output .crm-current-client-source {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.rich-record-output .crm-current-client-message {
  margin: 0;
  border-left: 0;
  border-radius: 12px;
  background: #f4fbf8;
  color: var(--ink);
  padding: 12px 14px;
  box-shadow: inset 0 0 0 1px rgba(20, 121, 91, 0.13);
}

.rich-record-output .crm-current-client-message p,
.rich-record-output .crm-current-client-message br {
  font-size: 0.94rem;
  line-height: 1.48;
}

.crm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.crm-follow-up-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.crm-follow-up-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.crm-follow-up-row small,
.crm-activity-item > div:first-child span,
.crm-activity-heading > span,
.crm-activity-item > div > p {
  color: var(--muted);
  font-size: 0.84rem;
}

.crm-follow-up-row strong,
.crm-activity-item > div > strong {
  color: var(--ink);
  font-weight: 500;
}

.crm-follow-up-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.crm-follow-up-row em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--ember-soft);
  color: var(--ember);
  font-size: 0.76rem;
  font-style: normal;
}

.crm-follow-up-row.complete em {
  background: #edf8f4;
  color: var(--green);
}

.crm-client-activity-log-panel {
  min-height: 100%;
  overflow: hidden;
}

.crm-client-activity-log-panel.is-collapsed {
  display: flex;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-color: rgba(20, 121, 91, 0.22);
  background: linear-gradient(135deg, #f7fcfa 0%, #fff 100%);
}

.client-activity-log-rail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  height: 100%;
  min-height: 132px;
  padding: 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  border-radius: inherit;
  transition: background 0.18s ease, transform 0.18s ease;
}

.client-activity-log-rail:hover,
.client-activity-log-rail:focus-visible {
  background: rgba(20, 121, 91, 0.05);
}

.client-activity-log-rail:focus-visible {
  outline: 3px solid rgba(20, 121, 91, 0.18);
  outline-offset: -3px;
}

.client-activity-log-rail-label {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
}

.client-activity-log-rail-copy {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.client-activity-log-rail strong {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 600;
}

.client-activity-log-rail small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.client-activity-log-header {
  align-items: flex-start;
}

.client-activity-log-copy {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.client-activity-log-list {
  display: grid;
  gap: 10px;
}

.client-activity-log-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(120deg, #fff 0%, #fbfdfc 100%);
}

.client-activity-log-marker {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--green);
}

.client-activity-log-row-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.client-activity-log-row-header strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
}

.client-activity-log-row-header span {
  align-self: flex-start;
  padding: 3px 8px;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  color: var(--green);
  font-size: 0.72rem;
  white-space: nowrap;
}

.client-activity-log-row p,
.client-activity-log-row small,
.client-activity-log-empty p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.client-activity-log-empty {
  padding: 14px;
  border: 1px dashed var(--green-line);
  border-radius: var(--radius);
  background: #f8fcfa;
}

.client-activity-log-empty strong {
  color: var(--ink);
  font-weight: 600;
}

.crm-activity-item {
  grid-template-columns: 112px 1fr;
}

.crm-activity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.crm-edit-record-button {
  min-height: 30px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.crm-activity-item p,
.crm-activity-item .crm-record-body {
  margin: 6px 0;
  line-height: 1.45;
}

.crm-activity-item .crm-record-body {
  color: var(--ink);
  font-size: 0.84rem;
}

.crm-record-edit-form {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(241, 165, 31, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(247, 201, 72, 0.08), rgba(255, 255, 255, 0.98) 72%),
    #fff;
}

.crm-record-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crm-record-edit-header > span {
  color: var(--muted);
  font-size: 0.78rem;
}

.crm-record-delete-control {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.crm-record-delete-control small {
  color: var(--red);
  font-size: 0.76rem;
}

.crm-record-delete-button.pending {
  border-color: rgba(184, 38, 43, 0.35);
  background: #fff8f6;
  color: var(--red);
}

.crm-record-edit-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
}

.crm-record-edit-form input,
.crm-record-edit-form select,
.crm-record-edit-form textarea,
.crm-record-edit-form .rich-note-editor {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.crm-record-edit-form input,
.crm-record-edit-form select {
  min-height: 40px;
  padding: 0 12px;
}

.crm-record-edit-form textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

.crm-record-edit-actions {
  justify-content: flex-end;
}

.crm-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 23px;
  margin-top: 8px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f5f1ea;
  color: var(--muted);
  font-size: 0.72rem;
}

.crm-pill.high {
  background: var(--ember-soft);
  color: var(--ember);
}

.crm-pill.watch {
  background: #fff8dc;
  color: #7b5a06;
}

.crm-pill.normal {
  background: #edf8f4;
  color: var(--green);
}

.metric-card strong {
  display: block;
  margin: 6px 0;
  font-size: clamp(1.08rem, 1.6vw, 1.35rem);
  font-weight: 500;
  line-height: 1.1;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 400;
}

.net-worth-equation {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.net-worth-equation span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: #f5f1ea;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.value-checklist {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.value-check-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--ink);
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  padding: 11px 12px;
  font-size: 0.82rem;
  line-height: 1.25;
}

.value-check-row span {
  display: grid;
  place-items: center;
  align-self: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  font-size: 0.62rem;
  font-weight: 900;
}

.value-check-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.value-check-row small {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.value-check-row strong {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 450;
  line-height: 1.35;
}

.value-check-row input {
  margin: 0;
  accent-color: var(--ember);
}

.overview-balance-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.overview-balance-row div {
  padding: 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.overview-balance-row span,
.overview-balance-row b {
  display: block;
}

.overview-balance-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.overview-balance-row b {
  margin-top: 4px;
  font-size: 0.98rem;
  font-weight: 500;
}

.stacked-bar {
  display: flex;
  height: 10px;
  overflow: hidden;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--status-track);
}

.stacked-bar span {
  height: 100%;
}

.stacked-bar-assets {
  background: linear-gradient(90deg, var(--status-green), #17a77e);
}

.stacked-bar-liabilities {
  background: linear-gradient(90deg, var(--status-red), #df6258);
}

.active-goal-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.active-goal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(26, 21, 15, 0.035);
}

.active-goal-dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.active-goal-dot.off {
  background: #ffaaa2;
  box-shadow: 0 0 0 4px rgba(240, 82, 67, 0.1);
}

.active-goal-dot.watch {
  background: var(--status-yellow);
  box-shadow: 0 0 0 4px rgba(243, 196, 95, 0.16);
}

.active-goal-dot.good {
  background: #75ddba;
  box-shadow: 0 0 0 4px rgba(19, 164, 118, 0.12);
}

.active-goal-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.active-goal-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.active-goal-row span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.active-goal-row em,
.active-goal-row b {
  color: var(--ink);
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 450;
}

.active-goal-row em {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.active-goal-row b {
  padding-top: 2px;
  font-weight: 500;
}

.active-goal-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 450;
}

.active-goal-status.off {
  background: #ffe8e5;
  color: #b9342d;
  box-shadow: inset 0 0 0 1px rgba(236, 145, 135, 0.24);
}

.active-goal-status.watch {
  background: #fff5df;
  color: #9b680f;
}

.active-goal-status.good {
  background: #eaf8f3;
  color: #047d61;
}

.active-goal-meter {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--status-track);
}

.active-goal-meter i {
  display: block;
  height: 100%;
  min-width: 6px;
  border-radius: inherit;
}

.active-goal-meter i.off {
  background: var(--status-red);
}

.active-goal-meter i.watch {
  background: var(--status-yellow);
}

.active-goal-meter i.good {
  background: var(--status-green);
}

.goal-count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border: 1px solid rgba(200, 41, 30, 0.16);
  border-radius: 999px;
  background: #fff7ed;
  color: var(--ink);
  padding: 0 7px;
  font-size: 0.72rem;
  font-weight: 500;
}

.metric-delta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 14px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
}

.client-mode #overview .eyebrow,
.client-mode #overview .metric-delta,
.client-mode #overview .overview-balance-row span,
.client-mode #overview .active-goal-row span,
.client-mode #overview .active-goal-row em,
.client-mode #overview .active-goal-row b,
.client-mode #overview .panel-copy,
.client-mode #overview .chat-message p,
.client-mode #overview .value-check-row strong {
  color: var(--ink);
  font-weight: 400;
}

.advisor-client-mode #overview .eyebrow,
.advisor-client-mode #overview .metric-delta,
.advisor-client-mode #overview .overview-balance-row span,
.advisor-client-mode #overview .active-goal-row span,
.advisor-client-mode #overview .active-goal-row em,
.advisor-client-mode #overview .active-goal-row b,
.advisor-client-mode #overview .panel-copy,
.advisor-client-mode #overview .chat-message p,
.advisor-client-mode #overview .value-check-row strong {
  color: var(--ink);
  font-weight: 400;
}

.client-mode #overview .metric-delta {
  background: #f5f1ea;
}

.advisor-client-mode #overview .metric-delta {
  background: #f5f1ea;
}

.client-mode #overview .active-goal-status.off,
.advisor-client-mode #overview .active-goal-status.off {
  background: #ffe8e5;
  color: #b9342d;
  box-shadow: inset 0 0 0 1px rgba(236, 145, 135, 0.24);
  font-weight: 450;
}

.client-mode #overview .active-goal-status.watch,
.advisor-client-mode #overview .active-goal-status.watch {
  background: #fff4dc;
  color: #946610;
  font-weight: 450;
}

.client-mode #overview .active-goal-status.good,
.advisor-client-mode #overview .active-goal-status.good {
  background: #eaf8f3;
  color: #047d61;
  font-weight: 450;
}

.client-mode #overview .active-goal-meter,
.advisor-client-mode #overview .active-goal-meter {
  background: #e8dfd2;
}

.client-mode #overview .active-goal-meter i.off,
.advisor-client-mode #overview .active-goal-meter i.off {
  background: #ec9187;
}

.client-mode #overview .active-goal-meter i.watch,
.advisor-client-mode #overview .active-goal-meter i.watch {
  background: var(--status-yellow);
}

.client-mode #overview .active-goal-meter i.good,
.advisor-client-mode #overview .active-goal-meter i.good {
  background: #0f8f6d;
}

.content-grid,
.account-layout,
.vault-layout,
.goals-layout,
.budgeting-layout,
.schedule-layout,
.notes-layout {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.two-col {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  min-width: 0;
  padding: 18px;
}

.panel-header,
.section-heading {
  justify-content: space-between;
  gap: 16px;
}

.section-heading {
  margin-bottom: 16px;
}

#net-worth > .section-heading h2,
#budgeting > .section-heading h2,
#goals > .section-heading h2,
#vault > .section-heading h2,
#profile > .section-heading h2 {
  font-weight: 400;
}

select,
.search-input,
.chat-form input,
.goal-form input,
.goal-form select,
.net-worth-add-form input,
.net-worth-add-form select,
.net-worth-edit-form input,
.net-worth-edit-form select,
.budget-input-grid input,
.profile-form input,
.address-grid input,
textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

select {
  height: 38px;
  padding: 0 10px;
}

.chart {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 280px;
  margin-top: 22px;
  padding: 16px 12px 0;
  border-radius: var(--radius);
  background:
    linear-gradient(to top, rgba(35, 32, 29, 0.08) 1px, transparent 1px) 0 0 /
      100% 25%,
    #fffaf2;
}

.chart-bar {
  position: relative;
  flex: 1;
  min-width: 16px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--gold), var(--amber) 45%, var(--ember));
}

.chart-bar span {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.75rem;
}

.task-list,
.document-list,
.account-list,
.goal-list,
.timeline,
.budget-bars,
.control-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.goal-dashboard-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(20, 121, 91, 0.08), transparent 38%),
    radial-gradient(circle at top right, rgba(241, 165, 31, 0.09), transparent 32%),
    #fff;
}

.onboarding-active #goals.active .goal-dashboard-panel {
  display: none;
}

.goal-dashboard-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-size: 0.82rem;
}

.task-item,
.doc-row,
.account-row,
.goal-row,
.timeline-item,
.budget-row {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.task-item {
  grid-template-columns: 22px 1fr auto;
  align-items: start;
}

.task-item input {
  margin-top: 2px;
  accent-color: var(--ember);
}

.task-item small,
.doc-row small,
.account-row small,
.timeline-item small,
.panel-copy,
.calendar-chip span {
  color: var(--muted);
  line-height: 1.5;
}

.doc-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.document-table .doc-row {
  grid-template-columns: 1fr 140px 110px auto;
}

.progress-ring {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin: 20px auto 18px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #fff 72%, transparent 73%),
    conic-gradient(var(--ember) 0 74%, #eee6dc 74% 100%);
}

.progress-ring span {
  font-size: 1.65rem;
  font-weight: 900;
}

.calendar-chip {
  display: grid;
  gap: 4px;
  margin: 18px 0;
  padding: 14px;
  border-left: 4px solid var(--ember);
  border-radius: var(--radius);
  background: var(--ember-soft);
}

.compact-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.crm-record-customizer {
  display: grid;
  gap: 14px;
  margin: 14px 0 16px;
  padding: 14px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: var(--radius);
  background: #fbfdfc;
}

.crm-record-customizer[hidden] {
  display: none;
}

.crm-record-customizer-header {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: start;
}

.crm-record-customizer-header h3 {
  margin: 2px 0 3px;
  font-size: 1rem;
  font-weight: 400;
}

.crm-record-type-list {
  display: grid;
  gap: 10px;
}

.crm-record-type-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.36fr) minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.crm-record-type-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.74rem;
}

.crm-record-type-row input,
.crm-record-type-row textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px;
  font: inherit;
}

.crm-record-type-row textarea {
  min-height: 86px;
  resize: vertical;
}

.crm-record-type-delete {
  width: 36px;
  height: 36px;
}

.full-width {
  width: 100%;
}

.account-layout,
.goals-layout,
.budgeting-layout,
.schedule-layout,
.notes-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

#goals .goals-layout {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.net-worth-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.net-worth-column {
  display: grid;
  gap: 18px;
  align-content: start;
}

.net-worth-group {
  display: grid;
  gap: 12px;
}

.net-worth-group + .net-worth-group {
  margin-top: 8px;
}

.net-worth-group-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5d6468;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.net-worth-group-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(35, 32, 29, 0.12);
}

.net-worth-section {
  display: grid;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--nw-border, rgba(35, 32, 29, 0.1));
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, var(--nw-soft, #fbfaf7) 0%, #fff 42%, #fff 100%);
  box-shadow:
    0 12px 34px rgba(26, 22, 18, 0.045),
    0 0 28px var(--nw-glow, rgba(26, 22, 18, 0.04));
}

.net-worth-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: color-mix(in srgb, var(--nw-accent, #5d6468) 66%, #ffffff);
}

.net-worth-section-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 12px 14px 12px 16px;
  overflow: hidden;
  border-bottom: 1px solid var(--nw-border, rgba(35, 32, 29, 0.12));
  background:
    linear-gradient(135deg, var(--nw-header, #f3f5f5) 0%, #fff 100%);
}

.net-worth-summary-grid {
  margin-bottom: 16px;
}

.net-worth-summary-card {
  max-width: none;
}

.net-worth-summary-main {
  display: grid;
  gap: 14px;
}

#net-worth .eyebrow,
#net-worth .metric-delta,
#net-worth .overview-balance-row span {
  font-weight: 400;
}

.net-worth-bank {
  --nw-accent: #2f8f68;
  --nw-border: rgba(47, 143, 104, 0.18);
  --nw-glow: rgba(47, 143, 104, 0.14);
  --nw-header: #edf8f1;
  --nw-soft: #f5fbf7;
}

.net-worth-properties {
  --nw-accent: #2f8f68;
  --nw-border: rgba(47, 143, 104, 0.18);
  --nw-glow: rgba(47, 143, 104, 0.14);
  --nw-header: #edf8f1;
  --nw-soft: #f5fbf7;
}

.net-worth-insurance {
  --nw-accent: #b78222;
  --nw-border: rgba(183, 130, 34, 0.2);
  --nw-glow: rgba(183, 130, 34, 0.13);
  --nw-header: #fff6e6;
  --nw-soft: #fffbf2;
}

.net-worth-other {
  --nw-accent: #2f8f68;
  --nw-border: rgba(47, 143, 104, 0.18);
  --nw-glow: rgba(47, 143, 104, 0.14);
  --nw-header: #edf8f1;
  --nw-soft: #f5fbf7;
}

.net-worth-investments {
  --nw-accent: #2f8f68;
  --nw-border: rgba(47, 143, 104, 0.18);
  --nw-glow: rgba(47, 143, 104, 0.14);
  --nw-header: #edf8f1;
  --nw-soft: #f5fbf7;
}

.net-worth-loans,
.net-worth-credit-cards {
  --nw-accent: #c65a4e;
  --nw-border: rgba(198, 90, 78, 0.2);
  --nw-glow: rgba(198, 90, 78, 0.14);
  --nw-header: #fff0ee;
  --nw-soft: #fff7f6;
}

.net-worth-business {
  --nw-accent: #2f8f68;
  --nw-border: rgba(47, 143, 104, 0.18);
  --nw-glow: rgba(47, 143, 104, 0.14);
  --nw-header: #edf8f1;
  --nw-soft: #f5fbf7;
}

.net-worth-estate-planning {
  --nw-accent: #b78222;
  --nw-border: rgba(183, 130, 34, 0.2);
  --nw-glow: rgba(183, 130, 34, 0.13);
  --nw-header: #fff6e6;
  --nw-soft: #fffbf2;
}

.net-worth-title-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
  font-weight: 500;
}

.net-worth-title-button.static {
  cursor: default;
}

.net-worth-category-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--nw-accent, var(--gold));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--nw-accent, var(--gold)) 14%, transparent);
}

.net-worth-title-text {
  display: block;
  color: #1f1c19;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
}

.net-worth-category-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0;
}

.net-worth-section-total {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
}

.add-mini-button {
  display: grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0;
  font-size: 1.05rem;
  font-weight: 400;
}

.add-mini-button:hover {
  border-color: color-mix(in srgb, var(--nw-accent, var(--gold)) 44%, var(--line));
  background: color-mix(in srgb, var(--nw-accent, var(--gold)) 8%, #fff);
}

.account-count {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.net-worth-item-list {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #f8f8f6;
}

.net-worth-item-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 10px 10px 10px 12px;
  border: 1px solid rgba(35, 32, 29, 0.07);
  border-radius: 7px;
  background: #fff;
}

.net-worth-item-row.dragging {
  opacity: 0.55;
}

.net-worth-item-row.drag-over-before,
.net-worth-item-row.drag-over-after {
  position: relative;
  border-color: rgba(255, 112, 31, 0.38);
}

.net-worth-item-row.drag-over-before::before,
.net-worth-item-row.drag-over-after::after {
  content: "";
  position: absolute;
  right: 10px;
  left: 10px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--gold));
}

.net-worth-item-row.drag-over-before::before {
  top: -6px;
}

.net-worth-item-row.drag-over-after::after {
  bottom: -6px;
}

.net-worth-item-row:hover {
  border-color: rgba(35, 32, 29, 0.14);
  background: #fff;
}

.net-worth-drag-handle {
  display: grid;
  place-items: center;
  width: 26px;
  min-width: 26px;
  height: 34px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  padding: 0;
}

.net-worth-drag-handle::before {
  content: "⋮⋮";
  transform: rotate(90deg);
  color: currentColor;
  font-size: 0.95rem;
  letter-spacing: -0.22em;
}

.net-worth-drag-handle:hover {
  border-color: var(--line);
  background: #fbfaf7;
  color: var(--ink);
}

.net-worth-drag-handle:active {
  cursor: grabbing;
}

.net-worth-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #c7c1ba;
  position: relative;
}

.net-worth-drag-handle::before,
.net-worth-drag-handle::after {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  box-shadow:
    0 6px 0 currentColor,
    0 12px 0 currentColor;
  font-size: 0;
  letter-spacing: 0;
}

.net-worth-drag-handle::before {
  transform: translateX(-2px);
}

.net-worth-drag-handle::after {
  transform: translateX(2px);
}

.net-worth-drag-handle:hover {
  color: #a8a19a;
}

.net-worth-item-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.net-worth-item-chips small {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
}

.net-worth-item-name,
.net-worth-item-amount {
  font-weight: 500;
}

.remove-icon-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.remove-icon-button:hover {
  border-color: rgba(184, 38, 43, 0.35);
  background: #fff8f6;
  color: var(--red);
}

.edit-icon-button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 400;
}

.edit-icon-button:hover {
  border-color: rgba(221, 75, 47, 0.3);
  background: #fff6e6;
}

.estate-planning-list {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #f8f8f6;
}

.estate-planning-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
  background: #f8f8f6;
}

.estate-planning-summary span {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid rgba(35, 32, 29, 0.07);
  border-radius: 7px;
  background: #fff;
}

.estate-planning-summary strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 500;
}

.estate-planning-summary small {
  color: var(--muted);
  font-size: 0.78rem;
}

.estate-planning-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 0.9fr) auto;
  align-items: end;
  gap: 10px;
  min-height: 66px;
  padding: 11px;
  border: 1px solid rgba(35, 32, 29, 0.07);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 400;
}

.estate-document-row {
  grid-template-columns: auto 1fr auto auto auto;
}

.estate-document-row .net-worth-item-amount {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.estate-document-actions {
  grid-column: auto;
  align-self: end;
}

.estate-document-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  font-size: 0.8rem;
}

.estate-document-check::before {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translate(1px, -1px);
}

.estate-planning-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
}

.estate-planning-row select,
.estate-planning-row input {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
}

.estate-planning-row input::placeholder {
  color: var(--muted);
}

.estate-empty-state {
  padding: 14px;
  border: 1px dashed rgba(35, 32, 29, 0.14);
  border-radius: 7px;
  background: #fff;
}

.empty-state {
  padding: 18px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-state.estate-empty-state {
  padding: 14px;
}

.net-worth-add-form,
.estate-document-add-form,
.net-worth-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf7;
}

.net-worth-edit-form {
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.net-worth-add-form label,
.estate-document-add-form label,
.net-worth-edit-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}

.net-worth-add-form input,
.net-worth-add-form select,
.estate-document-add-form input,
.estate-document-add-form select,
.net-worth-edit-form input,
.net-worth-edit-form select {
  min-height: 42px;
  min-width: 0;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 500;
}

.net-worth-add-form button,
.estate-document-add-form button,
.net-worth-edit-form button {
  align-self: end;
}

.net-worth-edit-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.asset-fill,
.liability-fill,
.budget-fill {
  height: 8px;
  border-radius: 999px;
}

.bar-track {
  overflow: hidden;
  margin-top: 8px;
  border-radius: 999px;
  background: #eee8df;
}

.asset-fill {
  background: linear-gradient(90deg, var(--amber), var(--green));
}

.liability-fill {
  background: linear-gradient(90deg, var(--ember), var(--amber));
}

.budget-fill {
  background: linear-gradient(90deg, var(--charcoal), var(--amber));
}

.amount-positive {
  color: var(--green);
  font-weight: 900;
}

.amount-negative {
  color: var(--red);
  font-weight: 900;
}

.vault-layout {
  grid-template-columns: 220px minmax(0, 1fr);
}

.folder-panel {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
}

.folder-item {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 0 12px;
}

.folder-item.active,
.folder-item:hover {
  background: var(--ember-soft);
  color: var(--ink);
}

.search-input {
  min-width: 220px;
  height: 40px;
  padding: 0 12px;
}

.confidence-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.goal-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.goal-form label,
.budget-input-grid label,
.budget-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.goal-form input,
.goal-form select,
.budget-input-grid input {
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 500;
}

.budget-input-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.budget-income-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(35, 32, 29, 0.08);
}

.budget-income-fields label {
  min-width: 0;
}

.budget-income-fields label[hidden] {
  display: none;
}

.budget-income-fields:has(label[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.budget-income-fields.single-income {
  grid-template-columns: minmax(0, 1fr);
}

.budget-input-grid small {
  color: #4f555c;
  font-size: 0.76rem;
  line-height: 1.35;
}

.budget-tax-card {
  padding: 2px 0 18px;
  border: 0;
  border-bottom: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 0;
  background: transparent;
  font-weight: 400;
}

.budget-tax-card input,
.budget-tax-card small,
.budget-tax-card span {
  font-weight: 400;
}

.budget-tax-row {
  display: grid;
  grid-template-columns: minmax(110px, 170px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.budget-tax-assumption-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.budget-tax-assumptions {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #59616a;
  line-height: 1.35;
}

.budget-tax-info-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(15, 127, 102, 0.22);
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
}

.budget-tax-info-button:hover,
.budget-tax-info-button:focus-visible {
  border-color: rgba(15, 127, 102, 0.34);
  background: #e1f4ee;
  outline: none;
}

.budget-tax-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 40;
  display: grid;
  gap: 10px;
  width: min(430px, calc(100vw - 40px));
  padding: 13px;
  border: 1px solid rgba(35, 32, 29, 0.12);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(247, 252, 250, 0.98)),
    #fff;
  box-shadow: 0 18px 48px rgba(26, 22, 18, 0.16);
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.budget-tax-popover::after {
  position: absolute;
  right: 18px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid rgba(35, 32, 29, 0.12);
  border-bottom: 1px solid rgba(35, 32, 29, 0.12);
  background: #fff;
  content: "";
  transform: rotate(45deg);
}

.budget-tax-assumption-wrap:hover .budget-tax-popover,
.budget-tax-assumption-wrap:focus-within .budget-tax-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.budget-tax-popover-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.budget-tax-popover-heading span {
  color: #414951;
  font-size: 0.78rem;
}

.budget-tax-popover-heading strong {
  color: var(--green);
  font-size: 1rem;
  font-weight: 500;
}

.budget-tax-popover-sections {
  display: grid;
  gap: 10px;
}

.budget-tax-popover-section {
  display: grid;
  gap: 6px;
}

.budget-tax-popover-section + .budget-tax-popover-section {
  padding-top: 10px;
  border-top: 1px solid rgba(20, 121, 91, 0.14);
}

.budget-tax-popover-section-title {
  width: fit-content;
  padding: 3px 8px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 999px;
  background: rgba(20, 121, 91, 0.06);
  color: #14795b;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.budget-tax-popover-rows {
  display: grid;
  gap: 6px;
}

.budget-tax-popover-rows div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid rgba(35, 32, 29, 0.07);
  border-radius: 7px;
  background: #fffdf9;
}

.budget-tax-popover-rows span {
  color: #59616a;
  font-size: 0.72rem;
  line-height: 1.25;
}

.budget-tax-popover-rows strong {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 500;
  white-space: nowrap;
}

.budget-tax-popover p {
  margin: 0;
  color: #8a5d18;
  font-size: 0.7rem;
  line-height: 1.35;
}

.budget-tax-override {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  width: fit-content;
  margin-top: 2px;
  color: var(--ink);
  cursor: pointer;
}

.budget-tax-override input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
}

#budget-tax-rate:disabled {
  background: #f7f5f1;
  color: #3c4146;
  opacity: 1;
}

.split-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}

.budget-detail-section-heading,
.budget-detail-field-heading {
  display: flex;
  position: relative;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.budget-detail-section-heading {
  grid-column: 1 / -1;
  padding-top: 2px;
  padding-bottom: 4px;
}

.budget-detail-section-heading::before,
.budget-detail-field-heading::before,
.budget-standalone-field::before,
.budget-retirement-savings-entry-card .saving-retirement-savings-entry-head::before {
  content: none;
}

.budget-detail-section-heading > div:first-child,
.budget-detail-field-heading > label {
  display: grid;
  gap: 3px;
}

.budget-detail-section-heading span,
.budget-detail-field-heading > label {
  color: var(--ink);
  font-size: 0.92rem;
}

.budget-detail-section-heading small,
.budget-standalone-field small,
.budget-detail-field > small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.budget-detail-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.budget-detail-toggle {
  display: inline-flex !important;
  grid-template-columns: none !important;
  position: relative;
  align-items: center;
  gap: 2px;
  min-height: 34px;
  width: auto;
  border: 1px solid rgba(35, 32, 29, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 3px;
  font-size: 0.76rem;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.budget-detail-toggle input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
  pointer-events: none;
}

.budget-detail-mode-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 70px;
  border-radius: 999px;
  padding: 0 11px;
  font-weight: 650;
  letter-spacing: 0;
}

.budget-detail-toggle input:not(:checked) ~ .budget-detail-mode-simple {
  background: #e7f5ef;
  color: #0f6f56;
  box-shadow:
    inset 0 0 0 1px rgba(20, 121, 91, 0.18),
    0 8px 18px rgba(20, 121, 91, 0.1);
}

.budget-detail-toggle input:checked ~ .budget-detail-mode-detailed {
  background: #14795b;
  color: #fff;
  box-shadow: 0 8px 18px rgba(20, 121, 91, 0.18);
}

.budget-detail-toggle:focus-within {
  outline: 2px solid rgba(20, 121, 91, 0.34);
  outline-offset: 2px;
}

.budget-detail-open {
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 0.76rem;
}

.budget-detail-field {
  position: relative;
  display: grid;
  gap: 6px;
  border: 0;
  border-bottom: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 0;
  padding: 0 0 18px;
}

.budget-detail-field > label,
.budget-detail-field-heading label {
  color: var(--ink);
}

.budget-standalone-field {
  display: grid;
  gap: 8px;
  position: relative;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(35, 32, 29, 0.08);
}

.budget-standalone-field .budget-section-heading-text {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.25;
}

.budget-detail-field.budget-detail-active,
.budget-income-fields.budget-detail-active {
  border-color: transparent;
  background: transparent;
}

.budget-detail-total-input {
  background: #fff !important;
  color: var(--ink);
}

.feedback-modal.budget-detail-modal {
  width: min(1320px, calc(100vw - 40px));
  max-width: none;
}

.budget-detail-modal {
  max-height: min(88vh, 880px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  overflow: hidden;
}

.budget-detail-modal-header,
.budget-detail-modal-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.budget-detail-modal-header h2 {
  margin: 3px 0 5px;
}

.budget-detail-modal-header p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.budget-detail-modal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.budget-detail-modal-summary > div {
  display: grid;
  gap: 5px;
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  background: #f7fcfa;
  padding: 12px;
}

.budget-detail-modal-summary span,
.budget-detail-modal-summary small {
  color: var(--muted);
  font-size: 0.78rem;
}

.budget-detail-modal-summary strong {
  color: var(--ink);
  font-size: 1.18rem;
}

.budget-detail-table {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.budget-detail-sheet {
  min-width: 1080px;
}

.budget-detail-sheet-head,
.budget-detail-row {
  display: grid;
  grid-template-columns: minmax(148px, 1fr) minmax(188px, 1.18fr) minmax(118px, 0.7fr) minmax(108px, 0.6fr) minmax(128px, 0.74fr) minmax(112px, 0.62fr) minmax(120px, 0.68fr) 42px;
  align-items: stretch;
}

.budget-detail-sheet:not(.is-income-sheet) .budget-detail-sheet-head,
.budget-detail-sheet:not(.is-income-sheet) .budget-detail-row {
  grid-template-columns: minmax(180px, 1.05fr) minmax(230px, 1.3fr) minmax(130px, 0.72fr) minmax(118px, 0.62fr) minmax(130px, 0.68fr) 42px;
}

.budget-detail-sheet-head {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: #f7f5f1;
}

.budget-detail-sheet-head span {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

.budget-detail-sheet-head span:last-child {
  border-right: 0;
}

.budget-detail-sheet-body {
  display: grid;
}

.budget-detail-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(35, 32, 29, 0.08);
  background: linear-gradient(90deg, #f7fcfa, #fffaf0);
  color: var(--green);
}

.budget-detail-group-header span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.budget-detail-group-header small {
  display: block;
  margin-top: 2px;
  color: #68717b;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.budget-detail-group-header strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
}

.budget-detail-group-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.budget-detail-group-add {
  min-height: 26px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 6px;
  background: #fff;
  padding: 0 9px;
  color: var(--green);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  cursor: pointer;
}

.budget-detail-group-add:hover,
.budget-detail-group-add:focus-visible {
  border-color: rgba(20, 121, 91, 0.34);
  background: #f7fcfa;
  outline: 0;
}

.budget-detail-reset-confirm {
  border-color: rgba(184, 42, 42, 0.32) !important;
  background: #fff4f2 !important;
  color: #b82a2a !important;
}

.budget-detail-row {
  min-height: 44px;
  border-bottom: 1px solid rgba(35, 32, 29, 0.08);
  background: #fff;
}

.budget-detail-row:nth-child(even) {
  background: #fdfcf9;
}

.budget-detail-row:last-child {
  border-bottom: 0;
}

.budget-detail-sheet-cell {
  display: grid;
  align-items: center;
  min-width: 0;
  border-right: 1px solid rgba(35, 32, 29, 0.08);
  color: var(--muted);
  font-size: 0.75rem;
}

.budget-detail-row > .budget-detail-sheet-cell:nth-last-child(3),
.budget-detail-sheet:not(.is-income-sheet) .budget-detail-row > .budget-detail-sheet-cell:nth-last-child(3) {
  border-right: 1px solid rgba(35, 32, 29, 0.08);
}

.budget-detail-row input,
.budget-detail-row select {
  width: 100%;
  min-height: 43px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
}

.budget-detail-row input:focus,
.budget-detail-row select:focus {
  position: relative;
  z-index: 1;
  outline: 2px solid rgba(20, 121, 91, 0.32);
  outline-offset: -2px;
  background: #fff;
}

.budget-detail-row-annual {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  padding: 0 12px;
  border-right: 1px solid rgba(35, 32, 29, 0.08);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
}

.budget-detail-401k-field {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  color: var(--ink);
  font-size: 0.72rem;
}

.budget-detail-401k-field input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: var(--green);
}

.budget-detail-401k-field span:not(.visually-hidden) {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.1;
}

.budget-detail-401k-field.is-disabled {
  color: #a49d95;
}

.budget-detail-remove-row {
  align-self: center;
  justify-self: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  border-color: transparent;
}

.budget-detail-modal-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.budget-detail-modal-footer > div,
.budget-detail-modal-footer-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.budget-retirement-sheet {
  min-width: 1120px;
}

.budget-retirement-sheet-head,
.budget-retirement-sheet-row {
  display: grid;
  grid-template-columns:
    minmax(132px, 0.82fr)
    minmax(190px, 1.14fr)
    minmax(124px, 0.72fr)
    minmax(118px, 0.68fr)
    minmax(120px, 0.72fr)
    minmax(124px, 0.7fr)
    minmax(190px, 1.08fr)
    minmax(130px, 0.72fr)
    42px;
  align-items: stretch;
}

.budget-retirement-sheet-head {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: #f7f5f1;
}

.budget-retirement-sheet-head span {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

.budget-retirement-sheet-row {
  min-height: 44px;
  border-bottom: 1px solid rgba(35, 32, 29, 0.08);
  background: #fff;
}

.budget-retirement-sheet-row:nth-child(even) {
  background: #fdfcf9;
}

.budget-retirement-sheet-row input,
.budget-retirement-sheet-row select {
  width: 100%;
  min-height: 43px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
}

.budget-retirement-sheet-row input:focus,
.budget-retirement-sheet-row select:focus {
  position: relative;
  z-index: 1;
  outline: 2px solid rgba(20, 121, 91, 0.32);
  outline-offset: -2px;
  background: #fff;
}

@media (max-width: 860px) {
  .budget-detail-section-heading,
  .budget-detail-field-heading,
  .budget-detail-modal-header,
  .budget-detail-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .budget-detail-actions,
  .budget-detail-modal-footer > div {
    justify-content: stretch;
  }

  .budget-detail-actions > *,
  .budget-detail-modal-footer button,
  .budget-detail-modal-footer > div {
    width: 100%;
  }

  .budget-detail-modal-summary {
    grid-template-columns: 1fr;
  }

  .budget-detail-sheet {
    min-width: 980px;
  }

  .budget-retirement-sheet {
    min-width: 980px;
  }
}

.planner-step .retirement-lump-sum-inputs {
  grid-template-columns: minmax(120px, 1fr) 64px;
}

.planner-step .retirement-social-security-inputs {
  grid-template-columns: minmax(120px, 1fr) 64px;
}

.planner-step .retirement-assumption-inputs {
  grid-template-columns: minmax(0, 1fr) 64px;
}

.input-with-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.input-with-suffix input {
  border: 0;
}

.input-with-suffix span {
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.waterfall-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 360px;
  margin-top: 18px;
  padding: 14px;
  overflow-x: auto;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(250, 248, 244, 0.94)),
    #fbfaf7;
}

.waterfall-step {
  display: grid;
  align-content: end;
  gap: 8px;
  min-width: 92px;
  height: 100%;
}

.waterfall-bar-wrap {
  display: flex;
  align-items: end;
  min-height: 250px;
}

.waterfall-bar {
  width: 100%;
  min-height: 8px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #6f7883, #3f454b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.waterfall-bar.income,
.waterfall-bar.positive {
  background: linear-gradient(180deg, #0d5f49, #1f8b68);
}

.waterfall-bar.taxes {
  background: linear-gradient(180deg, #84211f, #bd403c);
}

.waterfall-bar.retirement-savings {
  background: linear-gradient(180deg, #5f9fda, #a8cff2);
}

.waterfall-bar.goal-savings {
  background: linear-gradient(180deg, #5f9fda, #a8cff2);
}

.waterfall-bar.fixed-expenses {
  background: linear-gradient(180deg, #d86d68, #f1aaa3);
}

.waterfall-bar.other-spending {
  background: linear-gradient(180deg, #c95858, #efb6ae);
}

.waterfall-bar.deficit,
.waterfall-bar.negative {
  background: linear-gradient(180deg, #8f2630, #d95d63);
}

.waterfall-bar.burn {
  background: linear-gradient(180deg, #eee8dc, #d2c8ba);
}

.waterfall-label {
  display: grid;
  gap: 3px;
  align-content: start;
  min-height: 70px;
}

.waterfall-label strong {
  min-height: 34px;
  font-size: 0.78rem;
  line-height: 1.25;
}

.waterfall-label span {
  color: var(--muted);
  font-size: 0.78rem;
}

.budget-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.budget-summary-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.budget-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.budget-summary-item strong {
  display: block;
  margin-top: 5px;
}

.budget-savings-breakdown {
  margin-top: 12px;
}

.budget-savings-breakdown-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.budget-savings-breakdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(35, 32, 29, 0.08);
}

.budget-savings-breakdown-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.budget-savings-breakdown-list {
  display: grid;
  gap: 8px;
}

.budget-savings-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fbfaf8;
}

.budget-savings-breakdown-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.budget-savings-breakdown-row strong {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 0.92rem;
  text-align: right;
}

#budgeting h2,
#budgeting strong,
#budgeting label,
#budgeting input,
#budgeting .confidence-pill,
#budgeting .input-with-suffix span,
#budgeting .budget-summary-item span {
  font-weight: 400;
}

.goal-row {
  position: relative;
  grid-template-columns: 1fr;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(26, 22, 18, 0.035);
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.goal-row.dragging {
  opacity: 0.62;
}

.goal-row.drag-over .goal-row-main {
  background: #fffaf0;
}

.goal-row.inactive {
  border-color: #ddd7cf;
  background: #faf8f5;
}

.goal-row.inactive .goal-row-main {
  opacity: 0.76;
}

.goal-row.expanded {
  border-color: rgba(15, 127, 159, 0.28);
  background:
    linear-gradient(180deg, rgba(236, 249, 251, 0.58), rgba(248, 252, 253, 0.82) 40%, rgba(251, 250, 247, 0.98)),
    #fbfdfd;
  box-shadow:
    0 14px 32px rgba(15, 127, 159, 0.08),
    0 8px 22px rgba(26, 22, 18, 0.055),
    0 0 0 1px rgba(15, 127, 159, 0.08);
}

.goal-row.expanded::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(28, 159, 137, 0.72), rgba(89, 195, 212, 0.62));
  content: "";
  z-index: 1;
}

.goal-row.expanded .goal-row-main {
  border-bottom: 1px solid rgba(15, 127, 159, 0.12);
  background:
    linear-gradient(135deg, rgba(238, 249, 251, 0.66), rgba(255, 255, 255, 0.98)),
    #fcfefe;
}

.goal-row.expanded.inactive .goal-row-main {
  opacity: 0.88;
}

.goal-row.expanded .goal-detail-panel {
  border-top-color: rgba(15, 127, 159, 0.14);
  background:
    linear-gradient(180deg, rgba(239, 250, 251, 0.54), rgba(250, 252, 252, 0.88) 52%, rgba(243, 241, 239, 0.92)),
    #fbfdfd;
}

.goal-row-main {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  cursor: pointer;
}

.goal-status-rail {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  width: 10px;
}

.goal-status-rail span {
  width: 4px;
  min-height: 58px;
  border-radius: 999px;
  background: #ddd7cf;
}

.goal-row.expanded .goal-status-rail span {
  width: 5px;
  box-shadow: 0 0 0 3px rgba(15, 127, 159, 0.045);
}

.goal-status-good .goal-status-rail span {
  background: linear-gradient(180deg, #48b58b, var(--green));
}

.goal-status-watch .goal-status-rail span {
  background: linear-gradient(180deg, #f7d989, #f3c45f);
}

.goal-status-off .goal-status-rail span {
  background: linear-gradient(180deg, #e99b93, #bf3f2f);
}

.goal-row.inactive .goal-status-rail span {
  background: #d9d3cb;
}

.goal-card-content {
  min-width: 0;
}

.goal-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.goal-title-edit-form {
  display: grid;
  grid-template-columns: minmax(180px, 320px) auto auto;
  gap: 8px;
  align-items: center;
}

.goal-title-edit-form input {
  min-height: 34px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 400;
}

.goal-title-edit-button {
  min-height: 24px;
  padding: 0 9px;
  font-size: 0.72rem;
}

.goal-lock-button,
.goal-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  border: 1px solid #d8d4cd;
  border-radius: 999px;
  background: #f7f5f1;
  color: #5f6670;
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 400;
}

.goal-lock-button {
  cursor: pointer;
}

.goal-lock-button:hover {
  border-color: #bab4ac;
  background: #efede8;
}

.goal-lock-button.unlocked {
  background: #fff;
  color: #69717c;
}

.goal-lock-badge {
  cursor: default;
}

.goal-lock-icon {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 9px;
  margin-top: 5px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.goal-lock-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  width: 8px;
  height: 7px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  transform: translateX(-50%);
}

.goal-lock-button.unlocked .goal-lock-icon::before {
  top: -10px;
  transform: translateX(-30%) rotate(-22deg);
  transform-origin: left bottom;
}

.goal-duplicate-button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.74rem;
}

.goal-title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}

.goal-category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid #e2ded8;
  border-radius: 999px;
  background: #f7f5f1;
  color: #4f555c;
  font-size: 0.72rem;
  font-weight: 400;
}

.goal-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  max-width: 560px;
}

.goal-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.76rem;
}

.goal-status-indicator i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #c65a4e;
  box-shadow: 0 0 0 4px rgba(198, 90, 78, 0.13);
}

.goal-status-indicator.good i {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(20, 121, 91, 0.13);
}

.goal-status-indicator.watch i {
  background: var(--status-yellow);
  box-shadow: 0 0 0 4px rgba(243, 196, 95, 0.16);
}

.goal-status-indicator.inactive i {
  background: #9aa0a6;
  box-shadow: 0 0 0 4px rgba(154, 160, 166, 0.14);
}

.goal-status-toggle {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(20, 121, 91, 0.24);
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  font-size: 0.75rem;
}

.goal-status-toggle.inactive {
  border-color: #dad4cc;
  background: #f4f1eb;
  color: #646b73;
}

.goal-progress-compact {
  display: grid;
  grid-template-columns: auto;
  gap: 0;
  align-items: center;
  min-width: 0;
}

.goal-row-delete-button {
  width: 30px;
  height: 30px;
  border-color: rgba(188, 180, 170, 0.86);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 248, 244, 0.95)),
    #fff;
  color: #6d747c;
  font-size: 0.82rem;
}

.goal-row-delete-button.pending {
  border-color: rgba(198, 90, 78, 0.34);
  background: #fff1ed;
  color: #b83a2f;
  box-shadow: 0 0 0 4px rgba(198, 90, 78, 0.08);
}

.goal-row-delete-button:hover,
.goal-row-delete-button:focus-visible {
  border-color: rgba(198, 90, 78, 0.38);
  background: #fff4f1;
  color: #b83a2f;
  transform: translateY(-1px);
}

.goal-delete-confirm {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(198, 90, 78, 0.2);
  border-radius: 999px;
  background: #fff7f4;
  color: #9f342a;
  padding: 0 10px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.goal-delete-confirm {
  color: var(--red);
  font-size: 0.78rem;
}

.goal-progress-compact span {
  min-width: 46px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 400;
  text-align: center;
}

.goal-mini-meter {
  display: none;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e4de;
}

.goal-mini-meter i {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: var(--progress-color);
}

.goal-drag-handle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: grab;
}

.goal-drag-handle::before {
  content: "";
  width: 14px;
  height: 10px;
  background: repeating-linear-gradient(to bottom, #69717c 0 1px, transparent 1px 4px);
}

.goal-drag-handle:active {
  cursor: grabbing;
}

.goal-drag-handle:hover {
  border-color: rgba(221, 75, 47, 0.3);
  background: #fff6e6;
}

.goal-row-progress-bar {
  height: 5px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e4de;
}

.goal-row-progress-bar i {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: var(--progress-color);
}

.danger-link {
  color: var(--red);
}

.danger-button {
  color: var(--red);
}

.delete-confirm-note {
  margin: -4px 0 12px;
  color: var(--red);
  font-size: 0.82rem;
}

.goal-detail-panel {
  padding: 0;
  border-top: 1px solid var(--line);
  background: #f3f1ef;
}

.locked-goal-client-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: #fbfaf7;
}

.locked-goal-client-panel h3 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
}

.locked-goal-client-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.goal-readonly-panel {
  border-top: 1px solid var(--line);
  background: #f6f5f2;
}

.goal-readonly-panel .goal-planner-shell {
  opacity: 0.96;
}

.goal-readonly-panel .goal-tool-card,
.goal-readonly-panel .goal-calculator-card {
  background: #fbfaf7;
}

.goal-readonly-panel input,
.goal-readonly-panel select,
.goal-readonly-panel textarea {
  border-color: #d6d1c9 !important;
  background: #efede9 !important;
  color: #5f6268 !important;
  cursor: default;
  box-shadow: none !important;
}

.goal-readonly-panel input::placeholder,
.goal-readonly-panel textarea::placeholder {
  color: #8c8f94;
}

.goal-readonly-panel button:disabled,
.goal-status-toggle.read-only-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: #d6d1c9;
  background: #efede9;
  color: #6d7178;
  cursor: default;
  opacity: 1;
}

.goal-readonly-panel .danger-button,
.goal-readonly-panel .remove-icon-button {
  opacity: 0.45;
}

#goals strong,
#goals b,
#goals h2,
#goals h3,
#goals button {
  font-weight: 400;
}

#goals .goal-form label,
#goals .goal-form input,
#goals .goal-form select {
  font-weight: 400;
}

.goal-planner-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
}

.goal-planner-main {
  display: grid;
  gap: 14px;
  align-self: start;
  align-content: start;
}

.goal-planner-shell.child-saving-minimized .goal-planner-main {
  display: none;
}

.goal-calculator-card,
.goal-tool-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 22, 18, 0.05);
}

.goal-calculator-card {
  align-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.goal-planner-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.goal-planner-title {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.goal-planner-heading h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
}

.goal-math-button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.planner-step-list {
  display: grid;
}

.planner-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) minmax(110px, 0.58fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.planner-step:has(.retirement-lump-sum-inputs),
.planner-step:has(.retirement-social-security-inputs) {
  grid-template-columns: 24px minmax(0, 1fr) minmax(190px, 0.72fr);
}

.planner-step:last-child {
  border-bottom: 0;
}

.planner-step-number {
  display: grid;
  place-items: center;
  align-self: center;
  width: 20px;
  height: 20px;
  color: #2d333a;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.planner-step span,
.planner-step small {
  display: block;
}

.planner-step .planner-step-number {
  display: grid;
  place-items: center;
}

.planner-step span {
  font-size: 0.82rem;
}

.planner-step small {
  margin-top: 3px;
  color: #4f555c;
  font-size: 0.72rem;
  line-height: 1.35;
}

.planner-step input,
.planner-step select,
.planner-progress-values input {
  min-width: 0;
  min-height: 34px;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 400;
}

.emergency-planner-tool {
  display: grid;
  gap: 14px;
}

.emergency-reserve-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 16px;
  align-items: center;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.94), rgba(255, 252, 246, 0.9)),
    #fff;
}

.emergency-reserve-hero.complete {
  border-color: rgba(20, 121, 91, 0.24);
  background:
    linear-gradient(135deg, rgba(221, 243, 236, 0.95), rgba(255, 252, 246, 0.9)),
    #fff;
}

.emergency-reserve-hero.off-track {
  border-color: rgba(194, 92, 72, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 241, 238, 0.96), rgba(255, 248, 246, 0.9)),
    #fff;
}

.emergency-reserve-copy {
  min-width: 0;
}

.emergency-reserve-copy span,
.emergency-section-heading span {
  display: block;
  color: #4f555c;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.emergency-reserve-copy h3 {
  margin: 6px 0 6px;
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 500;
  line-height: 1.15;
}

.emergency-reserve-copy p {
  margin: 0;
  color: #424a54;
  font-size: 0.82rem;
  line-height: 1.45;
}

.emergency-reserve-gauge {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(var(--green) calc(var(--reserve-progress) * 1%), #e7e2db 0);
  box-shadow: inset 0 0 0 1px rgba(20, 121, 91, 0.1);
}

.emergency-reserve-hero.off-track .emergency-reserve-gauge {
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(#c85d4d calc(var(--reserve-progress) * 1%), #e7e2db 0);
  box-shadow: inset 0 0 0 1px rgba(194, 92, 72, 0.16);
}

.emergency-reserve-gauge strong,
.emergency-reserve-gauge small {
  grid-area: 1 / 1;
  text-align: center;
}

.emergency-reserve-gauge strong {
  margin-top: -12px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
}

.emergency-reserve-gauge small {
  align-self: center;
  margin-top: 28px;
  max-width: 78px;
  color: #5d6570;
  font-size: 0.66rem;
  line-height: 1.15;
}

.emergency-reserve-meter {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fbfaf7;
}

.emergency-reserve-meter > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #4f555c;
  font-size: 0.76rem;
}

.emergency-control-panel {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.emergency-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
}

.emergency-section-heading small {
  color: #5d6570;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: right;
}

.emergency-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.emergency-target-builder {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.emergency-target-formula-card,
.emergency-deadline-card,
.emergency-scenario-label-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(253, 252, 248, 0.96)),
    #fff;
}

.emergency-target-formula-card {
  border-color: rgba(20, 121, 91, 0.18);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.84), rgba(255, 255, 255, 0.98) 66%),
    #fff;
}

.emergency-target-card-head,
.emergency-deadline-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.emergency-target-card-head span,
.emergency-deadline-heading span {
  display: block;
  color: #4f555c;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
}

.emergency-target-card-head strong,
.emergency-deadline-heading strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
}

.emergency-target-card-head small {
  display: block;
  margin-top: 4px;
  color: #5d6570;
  font-size: 0.72rem;
  line-height: 1.35;
}

.emergency-formula-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px minmax(0, 0.82fr) 30px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.emergency-control-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 252, 248, 0.96)),
    #fff;
  color: #4f555c;
  font-size: 0.74rem;
}

.emergency-formula-grid label,
.emergency-scenario-label-card .saving-retirement-scenario-name-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: #4f555c;
  font-size: 0.74rem;
}

.emergency-formula-operator {
  display: grid;
  place-items: center;
  justify-self: center;
  align-self: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 246, 0.94)),
    #fff;
  color: #14795b;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(26, 22, 18, 0.04);
}

.emergency-control-grid input,
.emergency-control-grid select,
.emergency-formula-grid input,
.emergency-formula-grid select,
.emergency-scenario-label-card input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  box-sizing: border-box;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 400;
}

.emergency-control-grid input[readonly],
.emergency-formula-grid input[readonly] {
  background: #f7f5f1;
}

.emergency-target-equation {
  display: block;
  padding: 8px 10px;
  border: 1px dashed rgba(20, 121, 91, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: #42504c;
  font-size: 0.74rem;
  line-height: 1.35;
}

.emergency-control-label-row,
.emergency-slider-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.emergency-control-label-row strong {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
}

.emergency-target-slider-card {
  border-color: rgba(15, 127, 159, 0.16) !important;
  background:
    linear-gradient(135deg, rgba(239, 250, 251, 0.76), rgba(255, 255, 255, 0.98) 72%),
    #fff !important;
}

.emergency-deadline-card {
  border-color: rgba(15, 127, 159, 0.18);
  background:
    linear-gradient(135deg, rgba(239, 250, 251, 0.8), rgba(255, 255, 255, 0.98) 70%),
    #fff;
}

.emergency-deadline-card.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.84), rgba(255, 255, 255, 0.98) 68%),
    #fff;
}

.emergency-control-grid .emergency-target-slider-card input[type="range"],
.emergency-deadline-card input[type="range"] {
  min-height: 22px;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(20, 121, 91, 0.28), rgba(15, 127, 159, 0.24)),
    #ece8df;
  padding: 0;
  accent-color: var(--green);
}

.emergency-slider-scale small {
  color: #7a828c;
  font-size: 0.66rem;
}

.emergency-control-grid label small,
.emergency-formula-grid label small,
.emergency-deadline-card > small,
.emergency-scenario-label-card small {
  color: #6a717b;
  font-size: 0.7rem;
  line-height: 1.3;
}

.emergency-buffer-card {
  border-color: rgba(35, 32, 29, 0.1) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(253, 252, 248, 0.96)),
    #fff !important;
}

#goals .emergency-reserve-copy h3,
#goals .emergency-reserve-gauge strong {
  font-weight: 600;
}

.retirement-accumulator-tool {
  display: grid;
  gap: 14px;
}

.retirement-accumulator-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 16px;
  align-items: center;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(230, 171, 46, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 231, 0.88), rgba(237, 248, 244, 0.62)),
    #fff;
}

.retirement-accumulator-hero.complete {
  border-color: rgba(20, 121, 91, 0.22);
  background:
    linear-gradient(135deg, rgba(221, 243, 236, 0.95), rgba(255, 248, 231, 0.72)),
    #fff;
}

.retirement-accumulator-copy {
  min-width: 0;
}

.retirement-accumulator-copy span,
.retirement-section-heading span,
.retirement-accumulator-stats span {
  display: block;
  color: #4f555c;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.retirement-accumulator-copy h3 {
  margin: 6px 0;
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.15;
}

.retirement-accumulator-copy p {
  margin: 0;
  color: #424a54;
  font-size: 0.82rem;
  line-height: 1.45;
}

.retirement-accumulator-gauge {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(#f0b84d calc(var(--retirement-progress) * 1%), #e7e2db 0);
  box-shadow: inset 0 0 0 1px rgba(230, 171, 46, 0.14);
}

.retirement-accumulator-hero.complete .retirement-accumulator-gauge {
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(var(--green) calc(var(--retirement-progress) * 1%), #e7e2db 0);
}

.retirement-accumulator-gauge strong,
.retirement-accumulator-gauge small {
  grid-area: 1 / 1;
  text-align: center;
}

.retirement-accumulator-gauge strong {
  margin-top: -12px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
}

.retirement-accumulator-gauge small {
  align-self: center;
  margin-top: 28px;
  max-width: 78px;
  color: #5d6570;
  font-size: 0.66rem;
  line-height: 1.15;
}

.retirement-accumulator-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.retirement-accumulator-stats > div {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 98px;
  padding: 12px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.9)),
    #fff;
}

.retirement-accumulator-stats > div.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background: #edf8f4;
}

.retirement-accumulator-stats strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
}

.retirement-accumulator-stats small {
  color: #5d6570;
  font-size: 0.72rem;
  line-height: 1.35;
}

.retirement-accumulator-meter {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fbfaf7;
}

.retirement-accumulator-meter > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #4f555c;
  font-size: 0.76rem;
}

.retirement-accumulator-meter .planner-meter span {
  background: linear-gradient(90deg, #f0b84d, var(--green));
}

.retirement-control-panel {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.retirement-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
}

.retirement-section-heading small {
  color: #5d6570;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: right;
}

.retirement-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.retirement-control-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fff;
  color: #4f555c;
  font-size: 0.74rem;
}

.retirement-control-grid input,
.retirement-control-grid select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  box-sizing: border-box;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 400;
}

.retirement-control-grid input[readonly] {
  background: #f7f5f1;
}

.retirement-control-grid label small {
  color: #6a717b;
  font-size: 0.7rem;
  line-height: 1.3;
}

.retirement-control-grid .split-input {
  grid-template-columns: minmax(0, 1fr) 78px;
}

.retirement-savings-need-output {
  border-color: rgba(20, 121, 91, 0.18) !important;
  background: #edf8f4 !important;
}

#goals .retirement-accumulator-copy h3,
#goals .retirement-accumulator-gauge strong,
#goals .retirement-accumulator-stats strong {
  font-weight: 600;
}

.saving-retirement-shell {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.saving-retirement-heading {
  margin-bottom: 0;
}

.saving-retirement-tool {
  display: grid;
  gap: 14px;
}

.saving-retirement-tab-strip {
  display: flex;
  gap: 8px;
  align-items: stretch;
  overflow-x: auto;
  padding: 0 2px 2px;
}

.saving-retirement-tabs {
  display: flex;
  gap: 4px;
  align-items: stretch;
  min-width: 0;
}

.saving-retirement-tab {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  min-width: 0;
  min-height: 36px;
  border: 1px solid #d8dce1;
  border-bottom-color: #c7ccd2;
  border-radius: 8px 8px 0 0;
  background: #ebeef2;
  cursor: grab;
}

.planning-scenario-tab {
  min-height: 34px;
  border-color: #dfe4e8;
  border-bottom-color: #dfe4e8;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 250, 0.96)),
    #fff;
  box-shadow: 0 1px 2px rgba(26, 22, 18, 0.04);
  cursor: grab;
}

.saving-retirement-tab.active {
  border-color: #d8dce1;
  border-bottom-color: #fff;
  background: #fff;
}

.planning-scenario-tab.active {
  border-color: rgba(20, 121, 91, 0.34);
  border-bottom-color: rgba(20, 121, 91, 0.34);
  background:
    linear-gradient(180deg, rgba(243, 251, 248, 0.98), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow:
    inset 3px 0 0 rgba(20, 121, 91, 0.72),
    0 1px 3px rgba(26, 22, 18, 0.05);
}

.saving-retirement-tab.dragging {
  opacity: 0.56;
}

.saving-retirement-tab.drag-over-before::before,
.saving-retirement-tab.drag-over-after::after {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  z-index: 2;
  width: 2px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 2px rgba(20, 121, 91, 0.16);
}

.saving-retirement-tab.drag-over-before::before {
  left: -4px;
}

.saving-retirement-tab.drag-over-after::after {
  right: -4px;
}

.saving-retirement-tab-grip {
  position: relative;
  flex: 0 0 12px;
  align-self: stretch;
  width: 12px;
  cursor: grab;
}

.saving-retirement-tab-grip::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 7px;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: #8a929b;
  box-shadow: 0 -5px 0 #8a929b, 0 5px 0 #8a929b;
  transform: translateY(-50%);
}

.saving-retirement-tab > button[data-saving-retirement-scenario-tab],
.saving-retirement-tab > button[data-emergency-scenario-tab],
.saving-retirement-tab > button[data-planning-scenario-tab] {
  appearance: none;
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  min-height: 34px;
  overflow: hidden;
  padding: 0 12px 0 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.saving-retirement-tab > button[data-planning-scenario-tab] {
  padding: 0 12px 0 4px;
  font-weight: 500;
}

.saving-retirement-tab > button[data-emergency-scenario-tab]:focus-visible,
.saving-retirement-tab > button[data-planning-scenario-tab]:focus-visible {
  outline: 2px solid rgba(20, 121, 91, 0.28);
  outline-offset: 2px;
  border-radius: 7px;
}

.saving-retirement-tab-close,
.saving-retirement-tab-add {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #4f555c;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

.saving-retirement-tab-close span,
.saving-retirement-tab-add span {
  display: block;
  transform: translateY(-0.5px);
}

.saving-retirement-tab-close {
  align-self: stretch;
  border-left: 1px solid rgba(216, 220, 225, 0.75);
}

.saving-retirement-tab-add {
  flex: 0 0 auto;
  align-self: stretch;
  border: 1px solid #d8dce1;
  border-radius: 8px 8px 0 0;
  background: #ebeef2;
}

.saving-retirement-tab-close:hover,
.saving-retirement-tab-add:not(:disabled):hover {
  background: rgba(20, 121, 91, 0.08);
  color: var(--teal);
}

.saving-retirement-tab-close:focus-visible,
.saving-retirement-tab-add:focus-visible {
  outline: 2px solid rgba(20, 121, 91, 0.28);
  outline-offset: 2px;
}

.planning-scenario-tab-strip .saving-retirement-tab-add {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-color: #dfe4e8;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #f4f6f8, #edf1f4),
    #f4f6f8;
  color: #3f474f;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(26, 22, 18, 0.04);
}

.saving-retirement-tab-add:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.emergency-scenario-tab-strip {
  align-items: center;
  padding-bottom: 6px;
}

.emergency-scenario-tab-strip .saving-retirement-tabs {
  gap: 6px;
}

.emergency-scenario-tab-strip .saving-retirement-tab {
  min-height: 38px;
  overflow: hidden;
  border-color: #dfe4e8;
  border-bottom-color: #dfe4e8;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #f5f7f8, #edf1f4),
    #f4f6f8;
  box-shadow: 0 1px 2px rgba(26, 22, 18, 0.04);
}

.emergency-scenario-tab-strip .saving-retirement-tab.active {
  border-color: rgba(20, 121, 91, 0.34);
  border-bottom-color: rgba(20, 121, 91, 0.34);
  background:
    linear-gradient(180deg, rgba(243, 251, 248, 0.98), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow:
    inset 3px 0 0 rgba(20, 121, 91, 0.72),
    0 1px 3px rgba(26, 22, 18, 0.05);
}

.emergency-scenario-tab-strip .saving-retirement-tab-close {
  align-self: center;
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  height: 28px;
  margin-right: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #4f555c;
  font-size: 0.82rem;
  font-weight: 500;
}

.emergency-scenario-tab-strip .saving-retirement-tab-add {
  align-self: center;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  height: 38px;
  border-color: #dfe4e8;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #f5f7f8, #edf1f4),
    #f4f6f8;
  color: #3f474f;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(26, 22, 18, 0.04);
}

.emergency-scenario-tab-strip .saving-retirement-tab-close:hover,
.emergency-scenario-tab-strip .saving-retirement-tab-add:not(:disabled):hover {
  background: rgba(20, 121, 91, 0.1);
  color: var(--teal);
}

.saving-retirement-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.34fr);
  gap: 18px;
  align-items: center;
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(15, 127, 159, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(232, 247, 251, 0.88), rgba(255, 248, 231, 0.76)),
    #fff;
  box-shadow: 0 10px 28px rgba(26, 22, 18, 0.05);
}

.saving-retirement-hero.complete {
  border-color: rgba(20, 121, 91, 0.24);
  background:
    linear-gradient(135deg, rgba(221, 243, 236, 0.95), rgba(255, 248, 231, 0.72)),
    #fff;
}

.saving-retirement-hero.off-track {
  border-color: rgba(194, 92, 72, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 241, 238, 0.96), rgba(255, 248, 231, 0.74)),
    #fff;
}

.saving-retirement-hero-copy {
  min-width: 0;
}

.saving-retirement-hero-copy span,
.saving-retirement-card-heading span,
.saving-retirement-savings-summary span {
  display: block;
  color: #4f555c;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.saving-retirement-savings-summary span {
  text-transform: none;
}

.saving-retirement-hero-copy h3 {
  margin: 6px 0;
  color: var(--ink);
  font-size: 1.38rem;
  font-weight: 600;
  line-height: 1.12;
}

.saving-retirement-hero-copy p {
  max-width: 720px;
  margin: 0;
  color: #424a54;
  font-size: 0.86rem;
  line-height: 1.45;
}

.saving-retirement-hero-gauge {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 142px;
  height: 142px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(#0f7f9f calc(var(--saving-progress) * 1%), #e7e2db 0);
  box-shadow: inset 0 0 0 1px rgba(15, 127, 159, 0.14);
}

.saving-retirement-hero.complete .saving-retirement-hero-gauge {
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(var(--green) calc(var(--saving-progress) * 1%), #e7e2db 0);
}

.saving-retirement-hero.off-track .saving-retirement-hero-gauge {
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(#c85d4d calc(var(--saving-progress) * 1%), #e7e2db 0);
  box-shadow: inset 0 0 0 1px rgba(194, 92, 72, 0.16);
}

.saving-retirement-hero-gauge strong,
.saving-retirement-hero-gauge small {
  grid-area: 1 / 1;
  max-width: 104px;
  text-align: center;
}

.saving-retirement-hero-gauge strong {
  margin-top: -14px;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 600;
}

.saving-retirement-hero-gauge small {
  align-self: center;
  margin-top: 36px;
  color: #5d6570;
  font-size: 0.68rem;
  line-height: 1.15;
}

.saving-retirement-savings-summary strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
}

.saving-retirement-card-heading p,
.saving-retirement-savings-summary small {
  color: #5d6570;
  font-size: 0.72rem;
  line-height: 1.35;
}

.saving-retirement-step-card,
.saving-retirement-money-card,
.planning-advisor-fee-card,
.saving-retirement-option-card,
.saving-retirement-chart-card {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.saving-retirement-card-heading,
.planning-advisor-fee-heading,
.saving-retirement-option-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.planning-advisor-fee-card {
  border-color: rgba(37, 95, 133, 0.18);
  background:
    linear-gradient(135deg, rgba(37, 95, 133, 0.045), #fff 62%),
    #fff;
}

.planning-advisor-fee-card.enabled {
  border-color: rgba(37, 95, 133, 0.32);
}

.planning-advisor-fee-heading span {
  color: #255f85;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.planning-advisor-fee-heading h3 {
  margin: 2px 0 4px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
}

.planning-advisor-fee-heading p {
  margin: 0;
  max-width: 680px;
  color: #5d6570;
  font-size: 0.74rem;
  line-height: 1.35;
}

.planning-advisor-fee-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1fr) minmax(190px, 0.9fr);
  gap: 10px;
  align-items: stretch;
}

.planning-advisor-fee-grid label,
.planning-advisor-fee-impact {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: #4f555c;
  font-size: 0.74rem;
  font-weight: 600;
}

.planning-advisor-fee-grid input,
.planning-advisor-fee-grid select {
  width: 100%;
}

.planning-advisor-fee-grid small,
.planning-advisor-fee-impact small {
  color: #6a717b;
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.3;
}

.planning-advisor-fee-impact strong {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
}

.saving-retirement-chart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: stretch;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.scenario-compare-callout {
  display: grid;
  align-content: start;
  gap: 8px;
  width: min(100%, 270px);
}

.scenario-compare-callout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid rgba(20, 121, 91, 0.94);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(24, 139, 105, 0.98), rgba(15, 112, 84, 1)),
    var(--green);
  color: #fff;
  box-shadow: 0 12px 22px rgba(20, 121, 91, 0.18);
  font-weight: 760;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.scenario-compare-callout-button:hover {
  background:
    linear-gradient(135deg, rgba(20, 126, 95, 1), rgba(12, 93, 70, 1)),
    var(--green);
  box-shadow: 0 14px 26px rgba(20, 121, 91, 0.22);
  transform: translateY(-1px);
}

.scenario-compare-callout-button:disabled {
  border-color: #d9d4cc;
  background: #ede9e2;
  color: #7b756d;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.scenario-solve-callout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid rgba(37, 95, 133, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(42, 110, 153, 0.98), rgba(31, 82, 116, 1)),
    #255f85;
  color: #fff;
  box-shadow: 0 12px 22px rgba(31, 82, 116, 0.18);
  font-weight: 760;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.scenario-solve-callout-button:hover {
  background:
    linear-gradient(135deg, rgba(34, 98, 140, 1), rgba(24, 70, 101, 1)),
    #255f85;
  box-shadow: 0 14px 26px rgba(31, 82, 116, 0.23);
  transform: translateY(-1px);
}

.scenario-solve-callout-button:disabled {
  border-color: #d9d4cc;
  background: #ede9e2;
  color: #7b756d;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.scenario-compare-callout small {
  display: block;
  width: 100%;
  color: #4f555c;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
}

.saving-retirement-chart-toggle {
  align-self: flex-start;
  min-height: 44px;
  margin-top: 3px;
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 560;
  white-space: nowrap;
}

.saving-retirement-step-toggle {
  flex: 0 0 auto;
  min-height: 34px;
}

.saving-retirement-step-card.collapsed,
.planning-tool-step-card.collapsed {
  gap: 12px;
}

.saving-retirement-step-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-top: 2px;
}

.saving-retirement-step-summary > div {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  min-height: 76px;
  padding: 11px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.88)),
    #fff;
}

.saving-retirement-step-summary span {
  color: #4f555c;
  font-size: 0.7rem;
}

.saving-retirement-step-summary strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.22;
}

.saving-retirement-step-summary small {
  color: #5d6570;
  font-size: 0.68rem;
  line-height: 1.3;
}

.emergency-scenario-comparison-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.planning-scenario-comparison-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.emergency-scenario-story {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.06), rgba(255, 255, 255, 0.94)),
    #fff;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.45;
}

.planning-scenario-story {
  margin: 0;
}

.emergency-scenario-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.emergency-scenario-summary-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.86)),
    #fff;
  color: var(--ink);
  text-align: left;
}

.emergency-scenario-summary-card.active {
  border-color: rgba(20, 121, 91, 0.22);
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.08), rgba(255, 255, 255, 0.92)),
    #f8fcfa;
  box-shadow: inset 3px 0 0 var(--green);
}

.emergency-scenario-summary-card span,
.emergency-scenario-summary-card small,
.emergency-scenario-summary-card em {
  display: block;
  min-width: 0;
}

.emergency-scenario-summary-card span {
  color: #4f555c;
  font-size: 0.72rem;
}

.emergency-scenario-summary-card strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.emergency-scenario-summary-card small {
  color: #5d6570;
  font-size: 0.72rem;
  line-height: 1.35;
}

.emergency-scenario-summary-card em {
  margin-top: 2px;
  padding-top: 7px;
  border-top: 1px solid rgba(35, 32, 29, 0.08);
  color: #14795b;
  font-size: 0.72rem;
  font-style: normal;
}

.saving-retirement-scenario-builder {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dfe8e5;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(251, 253, 252, 0.98), rgba(250, 249, 245, 0.94)),
    #fff;
}

.saving-retirement-builder-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.saving-retirement-builder-heading h4 {
  margin: 4px 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 650;
}

.saving-retirement-builder-heading > div > span {
  color: #5d6570;
  font-size: 0.74rem;
}

.saving-retirement-builder-heading p {
  max-width: 720px;
  margin: 0;
  color: #5d6570;
  font-size: 0.78rem;
  line-height: 1.45;
}

.saving-retirement-builder-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
}

.saving-retirement-builder-directions,
.saving-retirement-builder-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.saving-retirement-builder-choice,
.saving-retirement-builder-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.saving-retirement-scenario-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 8px;
  background: #f2faf7;
  color: #14795b;
}

.saving-retirement-scenario-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.saving-retirement-scenario-icon.category {
  width: 40px;
  height: 40px;
  background: #f4fbf8;
}

.saving-retirement-scenario-icon.objective {
  width: 42px;
  height: 42px;
  border-color: rgba(37, 95, 133, 0.17);
  background: #eef8fc;
  color: #255f85;
}

.saving-retirement-builder-option-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.saving-retirement-builder-choice:hover,
.saving-retirement-builder-option:hover {
  border-color: rgba(20, 121, 91, 0.28);
  background: #fbfdfc;
}

.saving-retirement-builder-choice:disabled,
.saving-retirement-builder-option:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.saving-retirement-builder-choice:disabled .saving-retirement-scenario-icon,
.saving-retirement-builder-option:disabled .saving-retirement-scenario-icon {
  border-color: rgba(35, 32, 29, 0.08);
  background: #ebe7df;
  color: #827b72;
}

.saving-retirement-builder-choice strong,
.saving-retirement-builder-option strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
}

.saving-retirement-builder-choice span,
.saving-retirement-builder-option span,
.saving-retirement-builder-limit {
  margin: 0;
  color: #5d6570;
  font-size: 0.75rem;
  line-height: 1.4;
}

.saving-retirement-scenario-builder-popout {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 22, 19, 0.44);
}

.saving-retirement-scenario-modal {
  width: min(1040px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  gap: 16px;
  padding: 18px;
  border-color: rgba(35, 32, 29, 0.12);
  box-shadow: 0 26px 80px rgba(12, 10, 8, 0.24);
  overscroll-behavior: contain;
}

.saving-retirement-builder-modal-heading {
  align-items: flex-start;
  padding-bottom: 2px;
}

.saving-retirement-builder-modal-heading h4 {
  max-width: 780px;
  margin-top: 5px;
  font-size: 1.08rem;
}

.saving-retirement-builder-modal-heading p {
  max-width: 820px;
  font-size: 0.82rem;
}

.saving-retirement-builder-objective {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(240, 249, 246, 0.82), rgba(255, 255, 255, 0.98)),
    #f8fcfa;
}

.saving-retirement-builder-objective span,
.saving-retirement-builder-category-heading span {
  display: block;
  color: #68717b;
  font-size: 0.72rem;
  line-height: 1.35;
}

.saving-retirement-builder-objective strong,
.saving-retirement-builder-category-heading strong {
  display: block;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.24;
}

.saving-retirement-builder-objective small {
  display: block;
  margin-top: 3px;
  color: #4f555c;
  font-size: 0.76rem;
  line-height: 1.4;
}

.saving-retirement-builder-categories {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.saving-retirement-builder-category {
  display: grid;
  grid-template-columns: auto minmax(190px, 0.32fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.9)),
    #fff;
}

.saving-retirement-builder-category-heading {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 4px 2px;
}

.saving-retirement-builder-category-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.saving-retirement-scenario-modal .saving-retirement-builder-choice,
.saving-retirement-scenario-modal .saving-retirement-builder-option {
  min-height: 94px;
  padding: 13px;
  gap: 11px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease,
    background 0.15s ease;
}

.saving-retirement-solve-option {
  align-content: start;
}

.saving-retirement-solve-option em {
  justify-self: start;
  margin: 0 0 2px;
  padding: 3px 7px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 999px;
  background: #f7f5f0;
  color: #5d6570;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.saving-retirement-solve-option.recommended {
  border-color: rgba(37, 95, 133, 0.28);
  background:
    linear-gradient(135deg, rgba(239, 248, 253, 0.92), rgba(255, 255, 255, 0.98)),
    #fff;
}

.saving-retirement-solve-option.recommended em {
  border-color: rgba(37, 95, 133, 0.18);
  background: #edf7fc;
  color: #255f85;
}

.saving-retirement-scenario-modal .saving-retirement-builder-choice:hover,
.saving-retirement-scenario-modal .saving-retirement-builder-choice:focus-visible,
.saving-retirement-scenario-modal .saving-retirement-builder-option:hover,
.saving-retirement-scenario-modal .saving-retirement-builder-option:focus-visible {
  border-color: rgba(20, 121, 91, 0.28);
  box-shadow: 0 10px 24px rgba(26, 22, 18, 0.07);
  transform: translateY(-1px);
  outline: none;
}

.saving-retirement-scenario-modal .saving-retirement-builder-choice:disabled,
.saving-retirement-scenario-modal .saving-retirement-builder-option:disabled {
  border-color: #e2ded8;
  background: #f4f1eb;
  box-shadow: none;
  color: #8a837b;
  opacity: 1;
  transform: none;
}

.saving-retirement-scenario-modal .saving-retirement-builder-choice:disabled strong,
.saving-retirement-scenario-modal .saving-retirement-builder-choice:disabled span,
.saving-retirement-scenario-modal .saving-retirement-builder-option:disabled strong,
.saving-retirement-scenario-modal .saving-retirement-builder-option:disabled span,
.saving-retirement-scenario-modal .saving-retirement-builder-option:disabled em {
  color: #827b72;
}

.saving-retirement-scenario-modal .saving-retirement-builder-choice:disabled .saving-retirement-scenario-icon,
.saving-retirement-scenario-modal .saving-retirement-builder-option:disabled .saving-retirement-scenario-icon {
  border-color: rgba(35, 32, 29, 0.08);
  background: #ebe7df;
  color: #827b72;
}

.saving-retirement-scenario-modal .saving-retirement-builder-option:disabled em {
  border-color: rgba(35, 32, 29, 0.08);
  background: #ebe7df;
}

.saving-retirement-scenario-modal .saving-retirement-builder-options {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

@media (max-width: 760px) {
  .saving-retirement-scenario-builder-popout {
    align-items: start;
    padding: 12px;
  }

  .saving-retirement-scenario-modal {
    max-height: calc(100vh - 24px);
    padding: 14px;
  }

  .saving-retirement-builder-modal-heading,
  .saving-retirement-builder-category {
    grid-template-columns: 1fr;
  }

  .saving-retirement-scenario-modal .saving-retirement-builder-actions {
    justify-content: flex-start;
  }

  .saving-retirement-builder-category-options {
    grid-template-columns: 1fr;
  }

  .saving-retirement-scenario-modal .saving-retirement-builder-choice,
  .saving-retirement-scenario-modal .saving-retirement-builder-option {
    min-height: 86px;
  }
}

.saving-retirement-card-heading h3,
.saving-retirement-option-header h3 {
  margin: 5px 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 600;
}

.saving-retirement-card-heading p,
.saving-retirement-option-header p {
  max-width: 720px;
  margin: 0;
  color: #5d6570;
  font-size: 0.78rem;
  line-height: 1.45;
}

.saving-retirement-control-grid,
.saving-retirement-option-grid,
.saving-retirement-savings-inputs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.saving-retirement-option-grid,
.saving-retirement-savings-inputs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.saving-retirement-control-grid label,
.saving-retirement-context-card,
.saving-retirement-income-field,
.saving-retirement-option-grid label,
.saving-retirement-savings-inputs label,
.saving-retirement-add-account label {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fff;
  color: #4f555c;
  font-size: 0.74rem;
}

.saving-retirement-control-grid input,
.saving-retirement-control-grid select,
.saving-retirement-option-grid input,
.saving-retirement-option-grid select,
.saving-retirement-savings-inputs input,
.saving-retirement-savings-inputs select,
.saving-retirement-add-account select,
.saving-retirement-account-controls input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  box-sizing: border-box;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 400;
}

.saving-retirement-control-grid input[readonly],
.saving-retirement-savings-inputs input[readonly] {
  background: #f7f5f1;
}

.saving-retirement-control-grid label small,
.saving-retirement-option-grid label small,
.saving-retirement-savings-inputs label small,
.saving-retirement-add-account label small {
  color: #6a717b;
  font-size: 0.7rem;
  line-height: 1.3;
}

.saving-retirement-step-groups {
  display: grid;
  gap: 14px;
}

.saving-retirement-step-group {
  --saving-step-accent: #14795b;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-left: 12px;
  border-left: 3px solid var(--saving-step-accent);
}

.saving-retirement-step-group.assumptions {
  --saving-step-accent: #087f9b;
}

.saving-retirement-step-group.optional {
  --saving-step-accent: #7c8793;
}

.saving-retirement-step-group-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.saving-retirement-step-group-heading span {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.saving-retirement-step-group-heading::after {
  content: "";
  height: 1px;
  min-width: 20px;
  background: #ebe7e0;
  flex: 1;
}

.saving-retirement-step-group .saving-retirement-control-grid label,
.saving-retirement-step-group .saving-retirement-context-card,
.saving-retirement-step-group .saving-retirement-income-field {
  border-color: rgba(35, 32, 29, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 252, 248, 0.96)),
    #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 1px 2px rgba(26, 22, 18, 0.04);
  font-weight: 600;
}

.saving-retirement-step-group .saving-retirement-control-grid input,
.saving-retirement-step-group .saving-retirement-control-grid select,
.saving-retirement-step-group .saving-retirement-control-grid small,
.saving-retirement-step-group .saving-retirement-control-grid .saving-retirement-income-field strong {
  font-weight: 400;
}

.saving-retirement-step-group.goal .saving-retirement-control-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.saving-retirement-step-group.goal .planning-tool-control-grid.retirement-income-goal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.saving-retirement-context-card strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 500;
}

.saving-retirement-step-group .saving-retirement-control-grid .saving-retirement-mini-switch {
  box-shadow: none;
  font-weight: 400;
}

.saving-retirement-step-group.goal .saving-retirement-control-grid label {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(253, 252, 248, 0.96)),
    #fff;
}

.retirement-income-goal-grid .retirement-income-combo-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(253, 252, 248, 0.96)),
    #fff;
  color: #4f555c;
  font-size: 0.74rem;
  font-weight: 600;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 1px 2px rgba(26, 22, 18, 0.04);
}

.retirement-income-combo-inputs {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 8px;
}

.retirement-income-goal-grid .retirement-income-combo-inputs label {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #5d6570;
  font-size: 0.68rem;
  font-weight: 400;
  box-shadow: none;
}

.retirement-income-goal-grid .retirement-income-combo-card small {
  color: #6a717b;
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1.3;
}

.saving-retirement-step-group.assumptions .saving-retirement-control-grid label {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(253, 252, 248, 0.96)),
    #fff;
}

.saving-retirement-step-group.optional .saving-retirement-control-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.saving-retirement-step-group.optional .saving-retirement-income-field {
  border-color: rgba(35, 32, 29, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(253, 252, 248, 0.96)),
    #fff;
}

.saving-retirement-step-group.optional .saving-retirement-income-field.enabled {
  border-color: rgba(20, 121, 91, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 252, 250, 0.98)),
    #fff;
}

.saving-retirement-step-group.optional .saving-retirement-income-field.long-term-care.enabled {
  border-color: rgba(15, 159, 110, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 252, 250, 0.98)),
    #fff;
}

.saving-retirement-step-group.optional .saving-retirement-income-field.advisor-fee.enabled {
  border-color: rgba(37, 95, 133, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 249, 252, 0.98)),
    #fff;
}

.saving-retirement-step-group.optional .saving-retirement-income-field.disabled {
  color: #6a717b;
}

.saving-retirement-income-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 96px;
  position: relative;
}

.saving-retirement-income-field.enabled {
  border-color: rgba(20, 121, 91, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 252, 250, 0.98)),
    #fff;
}

.saving-retirement-income-field strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.saving-retirement-income-copy {
  display: grid;
  align-content: space-between;
  align-self: stretch;
  gap: 8px;
  min-width: 0;
  padding: 4px 0;
}

.saving-retirement-income-copy small {
  min-width: 0;
  color: #6a717b;
  font-size: 0.7rem;
  line-height: 1.3;
}

.saving-retirement-income-actions {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 8px;
  min-width: 66px;
}

.saving-retirement-control-grid .saving-retirement-mini-switch {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 26px;
  min-width: auto;
  padding: 0 8px;
  border: 1px solid #d8dce1;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.72rem;
}

.saving-retirement-control-grid .saving-retirement-mini-switch input {
  width: 15px;
  min-height: auto;
  height: 15px;
  padding: 0;
  accent-color: var(--green);
}

.saving-retirement-control-grid .saving-retirement-mini-switch small {
  color: #4f555c;
  font-size: 0.72rem;
  line-height: 1;
}

.planning-tool-control-grid .saving-retirement-mini-switch {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 26px;
  min-width: auto;
  padding: 0 8px;
  border: 1px solid #d8dce1;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.72rem;
  box-shadow: none;
}

.planning-tool-control-grid .saving-retirement-mini-switch input {
  width: 15px;
  min-height: auto;
  height: 15px;
  padding: 0;
  accent-color: var(--green);
}

.planning-tool-control-grid .saving-retirement-mini-switch small {
  color: #4f555c;
  font-size: 0.72rem;
  line-height: 1;
}

.retirement-income-assumption-grid .saving-retirement-income-detail-grid label,
.retirement-income-assumption-grid .saving-retirement-context-card,
.retirement-income-source-grid .saving-retirement-income-detail-grid label,
.retirement-income-factor-grid .saving-retirement-income-detail-grid label,
.retirement-income-factor-grid .saving-retirement-context-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fff;
  color: #4f555c;
  font-size: 0.74rem;
}

.retirement-income-assumption-grid .saving-retirement-income-detail-grid input,
.retirement-income-assumption-grid .saving-retirement-income-detail-grid select,
.retirement-income-source-grid .saving-retirement-income-detail-grid input,
.retirement-income-source-grid .saving-retirement-income-detail-grid select,
.retirement-income-factor-grid .saving-retirement-income-detail-grid input,
.retirement-income-factor-grid .saving-retirement-income-detail-grid select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  box-sizing: border-box;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 400;
}

.retirement-income-assumption-grid .saving-retirement-income-detail-grid small,
.retirement-income-assumption-grid .saving-retirement-context-card small,
.retirement-income-source-grid .saving-retirement-income-detail-grid small,
.retirement-income-factor-grid .saving-retirement-income-detail-grid small,
.retirement-income-factor-grid .saving-retirement-context-card small {
  color: #6a717b;
  font-size: 0.7rem;
  line-height: 1.3;
}

.retirement-income-spending-example-list {
  display: grid;
  gap: 6px;
  position: relative;
  padding-left: 2px;
}

.retirement-income-spending-path-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 10px;
  align-items: start;
}

.retirement-income-spending-path-control-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.retirement-income-spending-example-card {
  align-content: start;
  border-color: rgba(20, 121, 91, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 250, 0.94)),
    #fff;
  padding: 12px;
}

.retirement-income-spending-example-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(20, 121, 91, 0.12);
}

.retirement-income-spending-example-head span {
  color: #68717b;
  font-size: 0.7rem;
}

.retirement-income-spending-example-head strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 560;
  white-space: nowrap;
}

.retirement-income-spending-example-list div {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}

.retirement-income-spending-example-list i {
  position: relative;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(20, 121, 91, 0.1);
}

.retirement-income-spending-example-list div:not(:last-child) i::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 3px;
  width: 2px;
  height: 18px;
  border-radius: 999px;
  background: rgba(20, 121, 91, 0.16);
}

.retirement-income-spending-example-list small {
  display: block;
  color: #3f4751;
  font-size: 0.76rem;
  line-height: 1.35;
}

.saving-retirement-step-group .planning-tool-control-grid.retirement-income-source-grid,
.saving-retirement-step-group .planning-tool-control-grid.retirement-income-assumption-grid,
.saving-retirement-step-group .planning-tool-control-grid.retirement-income-factor-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.saving-retirement-step-group .planning-tool-control-grid.retirement-income-assumption-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.saving-retirement-step-group .planning-tool-control-grid.retirement-income-factor-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.retirement-income-assumption-grid > label {
  align-content: start;
}

.retirement-income-assumption-grid > label input,
.retirement-income-assumption-grid > label select {
  height: 36px;
  min-height: 36px;
}

.retirement-income-portfolio-return-field {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.retirement-income-portfolio-return-field .saving-retirement-income-copy {
  gap: 8px;
}

.retirement-income-return-input {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.retirement-income-return-input span {
  color: #4f555c;
  font-size: 0.74rem;
  line-height: 1.2;
}

.retirement-income-return-input input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  box-sizing: border-box;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-weight: 400;
}

.retirement-income-return-input small {
  color: #6a717b;
  font-size: 0.7rem;
  line-height: 1.3;
}

.retirement-income-return-reduction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(35, 32, 29, 0.08);
}

.retirement-income-return-reduction-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.retirement-income-return-reduction-copy span {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.2;
}

.retirement-income-return-reduction-copy small {
  color: #6a717b;
  font-size: 0.68rem;
  line-height: 1.3;
}

.retirement-income-spending-strategy-field {
  align-content: start;
}

.retirement-income-spending-strategy-field > small {
  color: #6a717b;
  font-size: 0.7rem;
  line-height: 1.3;
}

.retirement-income-spending-custom-row {
  margin-top: 2px;
}

.retirement-income-assumption-grid .saving-retirement-income-field,
.retirement-income-source-grid .saving-retirement-income-field,
.retirement-income-factor-grid .saving-retirement-income-field {
  min-height: 76px;
  padding: 9px 10px;
  gap: 8px;
}

.retirement-income-assumption-grid .saving-retirement-income-copy,
.retirement-income-source-grid .saving-retirement-income-copy,
.retirement-income-factor-grid .saving-retirement-income-copy {
  gap: 5px;
  padding: 2px 0;
}

.retirement-income-assumption-grid .saving-retirement-income-actions,
.retirement-income-source-grid .saving-retirement-income-actions,
.retirement-income-factor-grid .saving-retirement-income-actions {
  gap: 5px;
  min-width: 58px;
}

.saving-retirement-income-detail-button {
  min-height: 30px;
  padding: 0 10px;
  white-space: nowrap;
}

.saving-retirement-income-detail-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.saving-retirement-income-detail-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 8px;
  background: #fbfaf7;
}

.retirement-income-other-income-intro,
.retirement-income-source-block {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(253, 252, 248, 0.96)),
    #fff;
}

.retirement-income-other-income-intro {
  border-color: rgba(20, 121, 91, 0.16);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.78), rgba(255, 255, 255, 0.98)),
    #fff;
}

.retirement-income-other-income-intro strong,
.retirement-income-source-block-heading strong {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
}

.retirement-income-other-income-intro small,
.retirement-income-source-block-heading small,
.retirement-income-source-empty {
  color: #6a717b;
  font-size: 0.72rem;
  line-height: 1.35;
}

.retirement-income-source-block.enabled {
  border-color: rgba(20, 121, 91, 0.16);
}

.retirement-income-source-block-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.retirement-income-source-block-heading > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.retirement-income-source-empty {
  margin: 0;
}

.saving-retirement-income-detail-panel.long-term-care {
  border-color: rgba(15, 159, 110, 0.2);
  background:
    linear-gradient(90deg, rgba(15, 159, 110, 0.06), rgba(255, 255, 255, 0) 38%),
    #f7fcfa;
}

.saving-retirement-income-detail-panel.advisor-fee {
  border-color: rgba(37, 95, 133, 0.2);
  background:
    linear-gradient(90deg, rgba(37, 95, 133, 0.06), rgba(255, 255, 255, 0) 38%),
    #f7fbfd;
}

.saving-retirement-income-detail-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.saving-retirement-income-detail-heading span {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
}

.saving-retirement-income-detail-heading small {
  color: #6a717b;
  font-size: 0.72rem;
  line-height: 1.3;
}

.saving-retirement-ltc-explainer {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(15, 159, 110, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #2d333a;
  font-size: 0.76rem;
  line-height: 1.45;
}

.saving-retirement-ltc-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.saving-retirement-ltc-summary-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(15, 159, 110, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.saving-retirement-ltc-summary-grid span {
  color: #5d6570;
  font-size: 0.68rem;
}

.saving-retirement-ltc-summary-grid strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.saving-retirement-ltc-summary-grid small {
  color: #6a717b;
  font-size: 0.68rem;
  line-height: 1.3;
}

.saving-retirement-income-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.saving-retirement-income-detail-grid.retirement-income-spending-path-control-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 920px) {
  .retirement-income-spending-path-layout,
  .saving-retirement-income-detail-grid.retirement-income-spending-path-control-grid {
    grid-template-columns: 1fr;
  }
}

.saving-retirement-control-grid .split-input {
  grid-template-columns: minmax(0, 1fr) 84px;
}

.saving-retirement-money-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.48fr);
  gap: 16px;
  align-items: start;
}

.saving-retirement-savings-entry-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 249, 0.9)),
    #fff;
}

.saving-retirement-savings-entry-head,
.saving-retirement-detailed-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

.saving-retirement-savings-entry-head span,
.saving-retirement-detailed-head span {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
}

.budget-retirement-savings-entry-card .saving-retirement-savings-entry-head span {
  font-weight: 400;
}

.budget-retirement-savings-entry-card .saving-retirement-savings-entry-head {
  position: relative;
  padding-left: 0;
}

.saving-retirement-savings-entry-head small,
.saving-retirement-detailed-head small {
  display: block;
  margin-top: 3px;
  color: #68717b;
  font-size: 0.72rem;
  line-height: 1.35;
}

.budget-retirement-savings-entry-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.budget-retirement-edit-sheet {
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 0.76rem;
}

.saving-retirement-mode-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  min-height: 34px;
  padding: 3px;
  border: 1px solid rgba(35, 32, 29, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.saving-retirement-mode-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 70px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: 0;
}

.saving-retirement-mode-toggle button.active:first-child {
  background: #e7f5ef;
  color: #0f6f56;
  box-shadow:
    inset 0 0 0 1px rgba(20, 121, 91, 0.18),
    0 8px 18px rgba(20, 121, 91, 0.1);
}

.saving-retirement-mode-toggle button.active:last-child {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 18px rgba(20, 121, 91, 0.18);
}

.saving-retirement-mode-toggle:focus-within {
  outline: 2px solid rgba(20, 121, 91, 0.34);
  outline-offset: 2px;
}

.saving-retirement-savings-entry-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.saving-retirement-savings-entry-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.saving-retirement-savings-entry-summary span,
.saving-retirement-simple-grid label,
.saving-retirement-simple-saver,
.saving-retirement-detailed-row.heading span {
  color: #5d6570;
  font-size: 0.7rem;
}

.saving-retirement-savings-entry-summary strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 650;
}

.budget-retirement-savings-entry-card .saving-retirement-savings-entry-summary strong {
  font-size: 0.9rem;
}

.saving-retirement-simple-savings,
.saving-retirement-detailed-savings {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.saving-retirement-simple-grid,
.saving-retirement-simple-saver-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 8px;
}

.saving-retirement-simple-grid label,
.saving-retirement-simple-saver {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fff;
}

.saving-retirement-simple-grid input,
.saving-retirement-simple-grid select,
.saving-retirement-simple-saver input,
.saving-retirement-detailed-row input,
.saving-retirement-detailed-row select {
  width: 100%;
  min-width: 0;
  border: 1px solid #d9d4cc;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 0.82rem;
}

.saving-retirement-simple-grid input,
.saving-retirement-simple-grid select,
.saving-retirement-simple-saver input {
  min-height: 36px;
  padding: 0 9px;
}

.saving-retirement-simple-grid small,
.saving-retirement-simple-saver small {
  color: #68717b;
  font-size: 0.68rem;
  line-height: 1.3;
}

.budget-retirement-simple-lines {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.budget-retirement-simple-row {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.budget-retirement-simple-sentence {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  min-width: 0;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.3;
}

.budget-retirement-simple-destination {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(115px, 150px) 30px;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.budget-retirement-simple-account-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.budget-retirement-simple-sentence input,
.budget-retirement-simple-sentence select,
.budget-retirement-simple-destination input,
.budget-retirement-simple-destination select {
  min-height: 34px;
  border: 1px solid #d9d4cc;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 0.82rem;
}

.budget-retirement-simple-sentence select,
.budget-retirement-simple-destination select {
  padding: 0 28px 0 8px;
}

.budget-retirement-simple-sentence input,
.budget-retirement-simple-destination input {
  padding: 0 9px;
}

.budget-retirement-simple-static {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: 999px;
  background: #fff;
  font-weight: 650;
}

.budget-retirement-simple-amount {
  width: 92px;
}

.budget-retirement-simple-mode {
  width: 66px;
}

.budget-retirement-simple-account-name {
  width: 100%;
}

.budget-retirement-simple-remove {
  width: 30px;
  height: 30px;
  min-height: 30px;
  color: #7b342a;
}

.budget-retirement-simple-remove.confirm-delete {
  width: auto;
  padding: 0 10px;
  border-color: rgba(184, 42, 42, 0.28);
  background: #fff2f0;
  color: #b8262b;
  font-size: 0.72rem;
  font-weight: 700;
}

.budget-retirement-simple-add {
  justify-self: start;
  min-height: 34px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.budget-retirement-savings-detail-preview {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fff;
}

.budget-retirement-savings-detail-preview > div:first-child span {
  display: block;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.35;
}

.budget-retirement-savings-detail-preview > div:first-child small {
  display: block;
  margin-top: 2px;
  color: #68717b;
  font-size: 0.76rem;
  line-height: 1.45;
}

.budget-retirement-savings-detail-preview .empty-state {
  padding: 12px 0 4px;
  color: #68717b;
  font-size: 0.82rem;
  line-height: 1.45;
  background: transparent;
  border: 0;
}

.budget-retirement-savings-preview-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.budget-retirement-savings-preview-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(140px, 1fr) minmax(90px, 0.7fr) minmax(118px, 0.72fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 6px;
  background: #fbfaf8;
}

.budget-retirement-savings-preview-row span,
.budget-retirement-savings-preview-row strong {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.budget-retirement-savings-preview-row span {
  color: #5d6570;
  font-size: 0.74rem;
}

.budget-retirement-savings-preview-row strong {
  color: var(--ink);
  font-size: 0.78rem;
  text-align: right;
}

.goal-render-warning {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(184, 42, 42, 0.18);
  border-radius: 8px;
  background: #fff8f5;
  color: #7b342a;
}

.goal-render-warning strong {
  color: #7b342a;
  font-size: 0.9rem;
}

.goal-render-warning span {
  color: #7b342a;
  font-size: 0.78rem;
  line-height: 1.35;
}

.saving-retirement-detailed-table {
  display: grid;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fff;
}

.saving-retirement-detailed-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(150px, 1.2fr) minmax(110px, 0.8fr) 70px minmax(95px, 0.8fr) minmax(105px, 0.85fr) minmax(95px, 0.8fr) minmax(105px, 0.85fr) minmax(120px, 0.9fr) 34px;
  gap: 6px;
  align-items: center;
  min-width: 1060px;
  padding: 8px;
  border-top: 1px solid #ece7df;
}

.saving-retirement-detailed-row:first-child {
  border-top: 0;
}

.saving-retirement-detailed-row.heading {
  padding-top: 9px;
  padding-bottom: 9px;
  background: #fbfaf8;
}

.saving-retirement-detailed-row input,
.saving-retirement-detailed-row select {
  min-height: 34px;
  padding: 0 8px;
}

.saving-retirement-detailed-row-total {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.saving-retirement-detailed-row-total strong {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
}

.saving-retirement-detailed-row-total small {
  overflow: hidden;
  color: #68717b;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saving-retirement-detailed-remove {
  width: 30px;
  min-width: 30px;
  height: 30px;
  border-color: #e2ded8;
  color: #a9503f;
}

.saving-retirement-account-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.saving-retirement-account-list-head,
.saving-retirement-savings-panel-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

.saving-retirement-account-list-head {
  padding: 2px 2px 0;
}

.saving-retirement-account-list-head span,
.saving-retirement-savings-panel-head span {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

.saving-retirement-account-list-head small,
.saving-retirement-savings-panel-head small {
  display: block;
  margin-top: 3px;
  color: #68717b;
  font-size: 0.72rem;
  line-height: 1.35;
}

.saving-retirement-account-list-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.saving-retirement-account-list-actions .secondary-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.76rem;
}

.saving-retirement-account-row {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(26, 22, 18, 0.03);
}

.saving-retirement-account-row.included {
  border-color: rgba(20, 121, 91, 0.18);
  background:
    linear-gradient(90deg, rgba(20, 121, 91, 0.06), rgba(255, 255, 255, 0) 36%),
    #f8fcfa;
}

.saving-retirement-account-row.excluded {
  background: #fbfaf7;
}

.saving-retirement-account-summary {
  display: grid;
  grid-template-columns: minmax(150px, 0.95fr) minmax(340px, 1.65fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  cursor: pointer;
}

.saving-retirement-account-summary:focus-visible {
  outline: 2px solid rgba(20, 121, 91, 0.34);
  outline-offset: 3px;
  border-radius: 6px;
}

.saving-retirement-account-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 7px;
  min-width: 0;
}

.saving-retirement-account-metrics > div {
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(35, 32, 29, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
}

.saving-retirement-account-metric strong.saving-retirement-account-value-pair {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
  white-space: normal;
}

.saving-retirement-account-metric strong.saving-retirement-account-value-pair > span {
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.15;
}

.saving-retirement-account-metric strong.saving-retirement-account-value-pair small {
  display: inline;
  margin-top: 0;
  color: #69717c;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.15;
}

.saving-retirement-account-detail-button {
  min-height: 32px;
  padding: 0 11px;
  white-space: nowrap;
}

.saving-retirement-account-expanded {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-top: 2px;
}

.saving-retirement-account-row span,
.saving-retirement-account-row small {
  display: block;
  min-width: 0;
}

.saving-retirement-account-row span {
  color: var(--ink);
  font-size: 0.88rem;
}

.saving-retirement-account-row small {
  margin-top: 3px;
  color: #69717c;
  font-size: 0.7rem;
  line-height: 1.25;
}

.saving-retirement-account-row strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.saving-retirement-account-top,
.saving-retirement-account-context {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

.saving-retirement-account-main {
  min-width: 0;
}

.saving-retirement-account-balance {
  flex: 0 0 auto;
  text-align: right;
}

.saving-retirement-account-context {
  align-items: center;
  justify-content: flex-start;
  padding-top: 2px;
}

.saving-retirement-account-chip {
  display: inline-flex !important;
  width: max-content;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 999px;
  background: #fff;
  color: #14795b !important;
  padding: 0 8px;
  font-size: 0.7rem !important;
}

.saving-retirement-account-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  min-width: 0;
}

.emergency-account-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.saving-retirement-account-controls label {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #e2ded8;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: #4f555c;
  font-size: 0.7rem;
}

.saving-retirement-account-controls label span {
  color: #4f555c;
  font-size: 0.68rem;
}

.saving-retirement-account-controls input,
.saving-retirement-account-controls select {
  min-width: 0;
}

.saving-retirement-remove-account {
  justify-self: start;
  align-self: end;
  min-height: auto;
  white-space: nowrap;
  color: #66717b;
  font-size: 0.78rem;
  font-weight: 600;
}

.saving-retirement-remove-account:hover {
  color: #38424c;
}

.saving-retirement-add-account {
  display: grid;
}

.saving-retirement-savings-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(251, 250, 247, 0.86)),
    #fff;
}

.saving-retirement-tax-mix .tax-bucket-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

.saving-retirement-tax-mix .tax-bucket-panel .tax-bucket-layout {
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
}

.saving-retirement-tax-mix .tax-bucket-panel .tax-bucket-pie {
  width: 112px;
}

.saving-retirement-tax-mix .tax-bucket-row {
  grid-template-columns: minmax(0, 1fr) 42px 82px;
  gap: 8px;
  padding: 8px;
}

.saving-retirement-savings-summary {
  display: grid;
  gap: 10px;
}

.saving-retirement-funding-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
}

.saving-retirement-funding-primary,
.saving-retirement-funding-gap,
.saving-retirement-funding-breakdown > div {
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fff;
}

.saving-retirement-funding-primary,
.saving-retirement-funding-gap {
  min-height: 118px;
  padding: 14px;
}

.saving-retirement-funding-primary,
.saving-retirement-funding-gap.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.1), rgba(255, 255, 255, 0.88)),
    #f7fcfa;
}

.saving-retirement-funding-gap.warning {
  border-color: rgba(194, 92, 72, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 241, 238, 0.98), rgba(255, 255, 255, 0.9)),
    #fff7f4;
}

.saving-retirement-funding-gap strong {
  font-size: 1.18rem;
}

.saving-retirement-funding-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.retirement-income-funding-breakdown {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.retirement-income-funding-summary .saving-retirement-savings-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.retirement-income-funding-summary .saving-retirement-funding-hero,
.retirement-income-funding-summary .saving-retirement-funding-breakdown {
  display: contents;
}

.retirement-income-funding-summary .saving-retirement-funding-primary,
.retirement-income-funding-summary .saving-retirement-funding-gap,
.retirement-income-funding-summary .saving-retirement-funding-breakdown > div {
  min-height: 118px;
  padding: 14px;
}

.retirement-income-funding-summary .saving-retirement-tax-mix {
  grid-column: 1 / -1;
}

.saving-retirement-funding-breakdown > div {
  min-height: 78px;
  padding: 11px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 246, 241, 0.54)),
    #fff;
}

.unified-funding-card {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.unified-funding-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.42fr);
  gap: 16px;
  align-items: start;
}

.unified-funding-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.unified-goal-funding-list {
  min-width: 0;
}

.unified-goal-source-row .saving-retirement-account-summary {
  cursor: default;
}

.unified-goal-source-row.savings-source {
  border-color: rgba(199, 154, 54, 0.18);
  background:
    linear-gradient(90deg, rgba(199, 154, 54, 0.07), rgba(255, 255, 255, 0) 36%),
    #fffdfa;
}

.unified-goal-source-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.unified-goal-source-actions .secondary-button {
  min-height: 32px;
  padding: 0 11px;
  white-space: nowrap;
}

.unified-funding-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.unified-funding-add-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.9)),
    #fff;
}

.unified-funding-add-card > span {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
}

.unified-funding-add-card > small,
.unified-goal-empty-state {
  color: #66717b;
  font-size: 0.7rem;
  line-height: 1.35;
}

.unified-funding-add-card .emergency-assignment-form {
  padding: 0;
  border: 0;
  background: transparent;
}

.unified-funding-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.9)),
    #fff;
}

.unified-funding-section-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

.unified-funding-section-head > div {
  min-width: 0;
}

.unified-funding-section-head span,
.unified-funding-summary-grid span {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
}

.unified-funding-section-head small,
.unified-funding-summary-grid small {
  display: block;
  margin-top: 4px;
  color: #66717b;
  font-size: 0.7rem;
  line-height: 1.35;
}

.unified-funding-section-head strong {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.unified-funding-summary-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(251, 250, 247, 0.86)),
    #fff;
}

.unified-funding-summary-grid {
  display: grid;
  gap: 10px;
}

.unified-funding-summary-grid > div {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 246, 241, 0.54)),
    #fff;
}

.unified-funding-primary,
.unified-funding-gap.complete {
  border-color: rgba(20, 121, 91, 0.18) !important;
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.1), rgba(255, 255, 255, 0.88)),
    #f7fcfa !important;
}

.unified-funding-gap.warning {
  border-color: rgba(194, 92, 72, 0.2) !important;
  background:
    linear-gradient(135deg, rgba(255, 241, 238, 0.98), rgba(255, 255, 255, 0.9)),
    #fff7f4 !important;
}

.unified-funding-summary-grid strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
}

.other-goal-v4-card {
  border-color: rgba(20, 121, 91, 0.16);
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.045), rgba(255, 255, 255, 0.96) 42%, rgba(250, 248, 243, 0.66)),
    #fff;
}

.budget-retirement-savings-entry-card {
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 0;
  background: transparent;
}

.other-goal-v4-heading {
  align-items: stretch;
}

.other-goal-v4-heading > div:first-child {
  display: grid;
  align-content: center;
  min-width: 0;
}

.other-goal-v4-heading-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  flex: 0 1 560px;
  min-width: 420px;
}

.other-goal-v4-heading-metrics > div {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 82px;
  padding: 11px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.other-goal-v4-heading-metrics > div.complete {
  border-color: rgba(20, 121, 91, 0.22);
  background: rgba(239, 250, 246, 0.92);
}

.other-goal-v4-heading-metrics > div.warning {
  border-color: rgba(194, 92, 72, 0.2);
  background: rgba(255, 247, 244, 0.94);
}

.other-goal-v4-heading-metrics span,
.other-goal-v4-plan-note span,
.other-goal-v4-progress-top span {
  color: #66717b;
  font-size: 0.68rem;
}

.other-goal-v4-heading-metrics strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.other-goal-v4-heading-metrics small,
.other-goal-v4-progress-top small {
  color: #66717b;
  font-size: 0.68rem;
  line-height: 1.25;
}

.other-goal-v4-progress {
  display: grid;
  gap: 6px;
}

.other-goal-v4-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.other-goal-v4-progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9e3d8;
}

.other-goal-v4-progress-bar span {
  display: block;
  width: 0;
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #14795b;
}

.other-goal-v4-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.42fr);
}

.other-goal-v4-source-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.86)),
    #fff;
}

.other-goal-v4-list-note {
  padding: 10px 12px;
  border: 1px dashed rgba(20, 121, 91, 0.24);
  border-radius: 8px;
  color: #53616d;
  font-size: 0.74rem;
  line-height: 1.35;
  background: rgba(247, 252, 250, 0.84);
}

.other-goal-v4-summary-panel {
  align-content: start;
}

.other-goal-v4-plan-note {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.07), rgba(255, 255, 255, 0.92)),
    #f8fcfa;
}

.other-goal-v4-plan-note p {
  margin: 0;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.45;
}

.other-goal-v4-add-grid .unified-funding-add-card {
  background: rgba(255, 255, 255, 0.92);
}

.saving-retirement-option-grid-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.saving-retirement-option-card.enabled {
  border-color: rgba(15, 127, 159, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(232, 247, 251, 0.42)),
    #fff;
}

.saving-retirement-option-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.saving-retirement-switch {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #d8dce1;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
}

.saving-retirement-switch input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.saving-retirement-chart-card.minimized {
  min-height: 104px;
}

.saving-retirement-chart-card .saving-retirement-card-heading span {
  text-transform: none;
}

.saving-retirement-tradeoff-panel {
  display: grid;
  gap: 10px;
}

.saving-retirement-tradeoff-topline {
  display: flex;
  gap: 12px;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: wrap;
}

.saving-retirement-tradeoff-story {
  flex: 1 1 420px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #dfe8e5;
  border-left: 4px solid #1f8a5b;
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.45;
}

.saving-retirement-chart-wrap {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.saving-retirement-chart {
  display: block;
  width: 100%;
  min-height: 300px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fff;
}

.saving-retirement-chart .plot-area {
  fill: #fbfcfd;
  stroke: #eef1f3;
}

.saving-retirement-chart .axis,
.saving-retirement-chart .chart-grid line {
  stroke: #d8dce1;
  stroke-width: 1;
}

.saving-retirement-chart .chart-grid line {
  stroke: #e4e8ec;
  stroke-dasharray: 5 7;
}

.saving-retirement-chart .chart-grid line.baseline,
.saving-retirement-chart .axis {
  stroke: #cdd4da;
  stroke-dasharray: none;
}

.saving-retirement-chart .scenario-line {
  fill: none;
  stroke: var(--scenario-color, #0f7f9f);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.84;
}

.saving-retirement-chart .scenario-line.active {
  stroke-width: 4;
  opacity: 0.92;
}

.saving-retirement-chart .scenario-target-marker line {
  stroke: var(--scenario-color, #0f7f9f);
  stroke-width: 1.25;
  stroke-dasharray: 4 5;
  stroke-opacity: 0.55;
  pointer-events: none;
}

.saving-retirement-chart .scenario-target-marker path {
  fill: #fff;
  stroke: var(--scenario-color, #0f7f9f);
  stroke-width: 1.8;
  filter: drop-shadow(0 2px 4px rgba(26, 22, 18, 0.14));
  pointer-events: none;
}

.saving-retirement-chart .scenario-target-marker.covered path {
  fill: rgba(237, 248, 244, 0.96);
}

.saving-retirement-chart .scenario-target-marker.gap path {
  fill: rgba(255, 248, 240, 0.96);
}

.saving-retirement-chart .scenario-target-marker.active path {
  stroke-width: 2.3;
}

.child-saving-life-goal-chart-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.child-saving-life-goal-chart-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.9)),
    #fff;
}

.child-saving-life-goal-chart-summary > div.complete {
  border-color: rgba(20, 121, 91, 0.2);
  background: #edf8f4;
}

.child-saving-life-goal-chart-summary > div.warning {
  border-color: rgba(194, 92, 72, 0.2);
  background: #fff4f0;
}

.child-saving-life-goal-chart-summary span {
  color: #4f555c;
  font-size: 0.72rem;
}

.child-saving-life-goal-chart-summary strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.child-saving-life-goal-chart-summary small {
  color: #5d6570;
  font-size: 0.7rem;
  line-height: 1.3;
}

.child-saving-life-goal-target line {
  stroke: #c79a36;
  stroke-width: 1.6;
  stroke-dasharray: 6 7;
  stroke-opacity: 0.72;
}

.child-saving-life-goal-target circle {
  fill: #c79a36;
  stroke: #fff;
  stroke-width: 2;
}

.child-saving-life-goal-target text {
  fill: #7c5a17;
  font-size: 9.2px;
  font-weight: 700;
}

.saving-retirement-chart-legend .child-saving-target-key {
  background: #c79a36;
}

.saving-retirement-chart .chart-focus-guide {
  stroke: #7c8793;
  stroke-width: 1.2;
  stroke-dasharray: 5 6;
}

.saving-retirement-chart .scenario-retirement-marker line {
  stroke: var(--scenario-color, #0f7f9f);
  stroke-width: 1.1;
  stroke-dasharray: 3 6;
  opacity: 0.34;
}

.saving-retirement-chart .scenario-retirement-marker circle {
  fill: var(--scenario-color, #0f7f9f);
  stroke: #fff;
  stroke-width: 1.6;
}

.saving-retirement-chart .scenario-retirement-marker.active line {
  stroke-width: 1.5;
  opacity: 0.5;
}

.saving-retirement-chart .scenario-retirement-marker-label {
  fill: #3f4752;
  font-size: 9.5px;
  font-weight: 700;
}

.saving-retirement-chart .scenario-end-dot,
.saving-retirement-chart .scenario-focus-dot {
  fill: var(--scenario-color, #0f7f9f);
  stroke: #fff;
  stroke-width: 2;
}

.saving-retirement-chart .scenario-focus-dot {
  filter: drop-shadow(0 3px 4px rgba(26, 22, 18, 0.14));
}

.saving-retirement-chart .chart-focus-guide,
.saving-retirement-chart .scenario-focus-dots,
.saving-retirement-chart .scenario-focus-labels {
  transition: opacity 140ms ease;
}

.saving-retirement-chart.planning-chart-hover-active .chart-focus-guide,
.saving-retirement-chart.planning-chart-hover-active .scenario-focus-dots,
.saving-retirement-chart.planning-chart-hover-active .scenario-focus-labels {
  opacity: 0;
  pointer-events: none;
}

.saving-retirement-chart .scenario-end-label {
  filter: drop-shadow(0 2px 3px rgba(26, 22, 18, 0.08));
  pointer-events: none;
}

.saving-retirement-chart .scenario-focus-label {
  filter: drop-shadow(0 2px 4px rgba(26, 22, 18, 0.1));
  pointer-events: none;
}

.saving-retirement-chart .scenario-end-label-leader {
  stroke: var(--scenario-color, #0f7f9f);
  stroke-linecap: round;
  stroke-width: 1.35;
  stroke-opacity: 0.62;
  pointer-events: none;
}

.saving-retirement-chart .scenario-focus-label-leader {
  stroke: var(--scenario-color, #0f7f9f);
  stroke-linecap: round;
  stroke-width: 1.25;
  stroke-opacity: 0.5;
  pointer-events: none;
}

.saving-retirement-chart .scenario-end-label rect {
  fill: rgba(255, 255, 255, 0.93);
  stroke: var(--scenario-color, #0f7f9f);
  stroke-width: 1.15;
  stroke-opacity: 0.46;
}

.saving-retirement-chart .scenario-focus-label rect {
  fill: rgba(255, 255, 255, 0.95);
  stroke: var(--scenario-color, #0f7f9f);
  stroke-width: 1.1;
  stroke-opacity: 0.52;
}

.saving-retirement-chart .scenario-end-label-key {
  fill: var(--scenario-color, #0f7f9f);
}

.saving-retirement-chart .scenario-focus-label-key {
  fill: var(--scenario-color, #0f7f9f);
}

.saving-retirement-chart .scenario-end-label text {
  fill: #3f4752;
  font-size: 8.4px;
  font-weight: 650;
}

.saving-retirement-chart .scenario-focus-label text {
  fill: #3f4752;
  font-size: 8.4px;
  font-weight: 650;
}

.saving-retirement-chart text {
  fill: #5d6570;
  font-size: 11.5px;
}

.planning-chart-hover-capture {
  fill: transparent;
  pointer-events: all;
  cursor: crosshair;
}

.planning-chart-hover-guide {
  stroke: #2f3f4f;
  stroke-width: 1.15;
  stroke-dasharray: 5 6;
  stroke-opacity: 0.58;
  pointer-events: none;
}

.planning-chart-hover-dot {
  fill: var(--scenario-color, #69b99d);
  stroke: #fff;
  stroke-width: 2.2;
  filter: drop-shadow(0 3px 5px rgba(26, 22, 18, 0.16));
  pointer-events: none;
}

.planning-chart-hover-dot.active {
  stroke-width: 2.8;
}

.planning-chart-hover-label,
.planning-chart-hover-label-leader {
  pointer-events: none;
}

.planning-chart-hover-label {
  filter: drop-shadow(0 4px 8px rgba(26, 22, 18, 0.12));
}

.planning-chart-hover-label-leader {
  stroke: var(--scenario-color, #69b99d);
  stroke-linecap: round;
  stroke-width: 1.25;
  stroke-opacity: 0.45;
}

.planning-chart-hover-label rect {
  fill: rgba(255, 255, 255, 0.96);
  stroke: var(--scenario-color, #69b99d);
  stroke-opacity: 0.46;
  stroke-width: 1.15;
}

.planning-chart-hover-label.active rect {
  fill: #f6fcfa;
  stroke-opacity: 0.68;
}

.planning-chart-hover-label circle {
  fill: var(--scenario-color, #69b99d);
}

.planning-chart-hover-label text {
  fill: #3f4752;
  font-size: 8.6px;
  font-weight: 650;
}

.child-saving-life-goal-hover-label text {
  font-size: 7.8px;
}

.saving-retirement-chart-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  color: #4f555c;
  font-size: 0.76rem;
}

.saving-retirement-chart-legend span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.saving-retirement-chart-legend i {
  display: inline-block;
  flex: 0 0 16px;
  width: 16px;
  height: 9px;
  border-radius: 999px;
}

.saving-retirement-chart-legend i.target-key {
  flex-basis: 10px;
  width: 10px;
  height: 10px;
  border: 2px solid #4f8c8f;
  border-radius: 3px;
  background: #fff;
  transform: rotate(45deg);
}

.saving-retirement-chart-legend b {
  min-width: 0;
  font-weight: 400;
}

.saving-retirement-chart-legend .bar-key {
  background: #0f7f9f;
}

.saving-retirement-chart-insight {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(150px, 0.8fr) minmax(280px, 2fr);
  gap: 10px;
  align-items: stretch;
}

.saving-retirement-chart-insight > div,
.saving-retirement-chart-insight > p {
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 249, 0.92)),
    #fff;
}

.saving-retirement-chart-insight > div {
  display: grid;
  gap: 3px;
}

.saving-retirement-chart-insight span {
  color: #5d6570;
  font-size: 0.68rem;
}

.saving-retirement-chart-insight strong {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 700;
}

.saving-retirement-chart-insight small,
.saving-retirement-chart-insight p {
  color: #4f555c;
  font-size: 0.72rem;
  line-height: 1.35;
}

.saving-retirement-chart-insight p {
  display: flex;
  align-items: center;
  border-left: 3px solid rgba(15, 127, 159, 0.45);
}

.saving-retirement-scenario-matrix {
  display: grid;
  overflow: hidden;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fff;
}

.saving-retirement-scenario-matrix-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.45fr) minmax(92px, 0.72fr) minmax(92px, 0.72fr) minmax(92px, 0.72fr) minmax(84px, 0.6fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 9px 12px;
  border-top: 1px solid #ece7df;
}

.saving-retirement-scenario-matrix-row:first-child {
  border-top: 0;
}

.saving-retirement-scenario-matrix-row.heading {
  padding-top: 8px;
  padding-bottom: 8px;
  background: #fbfaf8;
  color: #5d6570;
  font-size: 0.67rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.saving-retirement-scenario-matrix-row.active {
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.86), rgba(255, 255, 255, 0.96)),
    #fff;
}

.saving-retirement-scenario-matrix-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.saving-retirement-scenario-matrix-row span {
  overflow: hidden;
  color: #68717b;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saving-retirement-scenario-matrix-row strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saving-retirement-scenario-matrix-row .scenario-name {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}

.saving-retirement-scenario-matrix-row .scenario-name i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--scenario-color, #0f7f9f);
}

.saving-retirement-scenario-matrix-row .scenario-name span {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 650;
}

.saving-retirement-scenario-matrix-row .scenario-name small {
  color: #68717b;
  font-size: 0.68rem;
  white-space: nowrap;
}

.saving-retirement-scenario-matrix-row .covered strong {
  color: #14795b;
}

.saving-retirement-scenario-matrix-row .gap strong {
  color: #a9503f;
}

@media (max-width: 760px) {
  .saving-retirement-chart-insight {
    grid-template-columns: 1fr;
  }

  .saving-retirement-scenario-matrix {
    overflow-x: auto;
  }

  .saving-retirement-scenario-matrix-row {
    min-width: 620px;
  }
}

.saving-retirement-compare-control {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.saving-retirement-tradeoff-topline .saving-retirement-compare-control {
  flex: 0 1 auto;
  min-width: min(100%, 360px);
  padding: 8px 10px;
  border: 1px solid #e2ded8;
  border-radius: 999px;
  background: #fff;
}

.saving-retirement-tradeoff-topline .saving-retirement-compare-control.scenario-tabs {
  flex: 1 1 460px;
  max-width: 100%;
  padding: 8px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 249, 0.92)),
    #fff;
}

.saving-retirement-compare-control > div:first-child {
  display: grid;
  gap: 2px;
}

.saving-retirement-compare-control span {
  color: #4f555c;
  font-size: 0.74rem;
}

.saving-retirement-compare-control strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.saving-retirement-compare-buttons {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  padding: 3px;
  border: 1px solid #dde3e7;
  border-radius: 999px;
  background: #fff;
}

.saving-retirement-compare-buttons.scenario-tab-buttons {
  display: flex;
  flex: 1 1 auto;
  justify-content: flex-end;
  max-width: 100%;
  overflow-x: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.saving-retirement-compare-buttons button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4f555c;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.saving-retirement-compare-buttons.scenario-tab-buttons button {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-width: 128px;
  max-width: 230px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #dfe4e7;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.9)),
    #fff;
  box-shadow: 0 1px 0 rgba(26, 22, 18, 0.03);
}

.saving-retirement-compare-buttons.scenario-tab-buttons button i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.saving-retirement-compare-buttons.scenario-tab-buttons button span {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saving-retirement-compare-buttons.scenario-tab-buttons button small {
  color: #68717b;
  font-size: 0.68rem;
  white-space: nowrap;
}

.saving-retirement-compare-buttons button.active {
  background: #203238;
  color: #fff;
}

.saving-retirement-compare-buttons.scenario-tab-buttons button.active {
  border-color: rgba(20, 121, 91, 0.26);
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.12), rgba(255, 255, 255, 0.94)),
    #f7fcfa;
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--green), 0 1px 0 rgba(26, 22, 18, 0.03);
}

.saving-retirement-compare-buttons.scenario-tab-buttons button.active span {
  color: var(--ink);
  font-weight: 650;
}

.saving-retirement-compare-buttons.scenario-tab-buttons button.active small {
  color: #14795b;
}

.planning-tool-dashboard {
  display: grid;
  gap: 14px;
}

.modern-planning-tool {
  gap: 16px;
}

.planning-tool-hero {
  --tool-accent: var(--green);
  --tool-soft: rgba(237, 248, 244, 0.92);
  --tool-border: rgba(20, 121, 91, 0.18);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 16px;
  align-items: center;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--tool-border);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--tool-soft), rgba(255, 252, 246, 0.9)),
    #fff;
}

.planning-tool-hero.education {
  --tool-accent: #b78222;
  --tool-soft: rgba(255, 248, 231, 0.88);
  --tool-border: rgba(230, 171, 46, 0.24);
}

.planning-tool-hero.child-saving {
  --tool-accent: #0f7f9f;
  --tool-soft: rgba(232, 247, 251, 0.9);
  --tool-border: rgba(15, 127, 159, 0.2);
}

.planning-tool-hero.flexible {
  --tool-accent: #0f7f9f;
  --tool-soft: rgba(232, 247, 251, 0.86);
  --tool-border: rgba(15, 127, 159, 0.18);
}

.planning-tool-hero.payoff {
  --tool-accent: #dd4b2f;
  --tool-soft: rgba(255, 243, 239, 0.88);
  --tool-border: rgba(221, 75, 47, 0.18);
}

.planning-tool-hero.retirement-income {
  --tool-accent: var(--green);
  --tool-soft: rgba(237, 248, 244, 0.9);
  --tool-border: rgba(20, 121, 91, 0.18);
}

.planning-tool-hero.complete {
  --tool-accent: var(--green);
  --tool-soft: rgba(221, 243, 236, 0.95);
  --tool-border: rgba(20, 121, 91, 0.24);
}

.planning-tool-hero.off-track {
  --tool-accent: #c85d4d;
  --tool-soft: rgba(255, 241, 238, 0.96);
  --tool-border: rgba(194, 92, 72, 0.26);
}

.planning-tool-copy {
  min-width: 0;
}

.planning-tool-copy span,
.planning-tool-section-heading span,
.planning-tool-stats span {
  display: block;
  color: #4f555c;
  font-size: 0.72rem;
  text-transform: none;
}

.planning-tool-copy h3 {
  margin: 6px 0;
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.15;
}

.planning-tool-copy p {
  margin: 0;
  color: #424a54;
  font-size: 0.82rem;
  line-height: 1.45;
}

.retirement-income-hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(35, 32, 29, 0.08);
}

.retirement-income-hero-metrics > div {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding-right: 10px;
  border-right: 1px solid rgba(35, 32, 29, 0.08);
}

.retirement-income-hero-metrics > div.complete {
  color: #0f7a5a;
}

.retirement-income-hero-metrics > div.warning {
  color: #b45143;
}

.retirement-income-hero-metrics > div:last-child {
  border-right: 0;
}

.retirement-income-hero-metrics span {
  color: #4f555c;
  font-size: 0.7rem;
}

.retirement-income-hero-metrics strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
}

.retirement-income-hero-metrics > div.complete strong {
  color: #0f7a5a;
}

.retirement-income-hero-metrics > div.warning strong {
  color: #a84d3f;
}

.retirement-income-hero-metrics small {
  color: #5d6570;
  font-size: 0.68rem;
  line-height: 1.3;
}

.planning-tool-gauge {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(var(--tool-accent) calc(var(--tool-progress) * 1%), #e7e2db 0);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tool-accent) 14%, transparent);
}

.planning-tool-gauge strong,
.planning-tool-gauge small {
  grid-area: 1 / 1;
  text-align: center;
}

.planning-tool-gauge strong {
  margin-top: -12px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
}

.planning-tool-gauge small {
  align-self: center;
  margin-top: 28px;
  max-width: 78px;
  color: #5d6570;
  font-size: 0.66rem;
  line-height: 1.15;
}

.planning-tool-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 10px;
}

.planning-tool-stats > div {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 98px;
  padding: 12px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.9)),
    #fff;
}

.planning-tool-stats > div.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background: #edf8f4;
}

.planning-tool-stats > div.warning {
  border-color: rgba(221, 75, 47, 0.18);
  background: #fff3ef;
}

.planning-tool-stats strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
}

.planning-tool-stats small {
  color: #5d6570;
  font-size: 0.72rem;
  line-height: 1.35;
}

.planning-tool-meter {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fbfaf7;
}

.planning-tool-meter > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #4f555c;
  font-size: 0.76rem;
}

.planning-tool-meter .planner-meter span {
  background: linear-gradient(90deg, #f0b84d, var(--green));
}

.planning-tool-control-panel {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.modern-planning-tool > .planning-tool-control-panel,
.modern-planning-tool > .emergency-control-panel,
.modern-planning-tool > .retirement-control-panel,
.modern-planning-tool > .planning-tool-step-card {
  order: -10;
}

.modern-planning-tool > .emergency-scenario-tab-strip {
  order: -11;
}

.modern-planning-tool > .planning-scenario-tab-strip {
  order: -11;
}

.modern-planning-tool > .emergency-reserve-hero {
  order: -10;
}

.modern-planning-tool > .emergency-scenario-comparison-card {
  order: -9;
}

.modern-planning-tool > .emergency-control-panel {
  order: -8;
}

.modern-planning-tool > .emergency-inline-funding-panel {
  order: -7;
}

.modern-planning-tool > .planning-scenario-comparison-card {
  order: -8;
}

.modern-planning-tool > .planning-tool-control-panel,
.modern-planning-tool > .emergency-control-panel,
.modern-planning-tool > .retirement-control-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 22, 18, 0.05);
}

.emergency-inline-funding-panel {
  display: grid;
  min-width: 0;
}

.planning-tool-step-card {
  display: grid;
  gap: 16px;
}

.planning-tool-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
}

.planning-tool-section-heading small {
  color: #5d6570;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: right;
}

.planning-tool-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.planning-tool-control-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.planning-tool-control-grid label,
.planning-tool-control-grid .planning-tool-control-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(253, 252, 248, 0.96)),
    #fff;
  color: #4f555c;
  font-size: 0.74rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 1px 2px rgba(26, 22, 18, 0.04);
}

.planning-tool-control-grid input,
.planning-tool-control-grid select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  box-sizing: border-box;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 400;
}

.planning-tool-control-grid input[readonly] {
  background: #f7f5f1;
}

.planning-tool-control-grid label small {
  color: #6a717b;
  font-size: 0.7rem;
  line-height: 1.3;
}

.planning-tool-control-grid .planning-tool-control-card > span {
  color: #4f555c;
  font-size: 0.74rem;
}

.planning-tool-control-grid .planning-tool-control-card > small {
  color: #6a717b;
  font-size: 0.7rem;
  line-height: 1.3;
}

.planning-tool-control-grid .split-input {
  grid-template-columns: minmax(0, 1fr) 78px;
}

.planning-tool-control-grid .input-with-suffix {
  border-radius: 6px;
}

.planning-tool-control-grid .input-with-suffix input {
  min-height: 34px;
  border: 0;
}

.payoff-step-groups {
  display: grid;
  gap: 10px;
}

.payoff-step-group {
  display: grid;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(251, 250, 247, 0.94)),
    #fff;
}

.payoff-step-group.accelerated {
  border-color: rgba(20, 121, 91, 0.16);
  background:
    linear-gradient(135deg, rgba(239, 248, 245, 0.78), rgba(255, 255, 255, 0.98)),
    #fff;
}

.payoff-step-group-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  border-bottom: 1px solid rgba(35, 32, 29, 0.07);
  padding-bottom: 6px;
}

.payoff-step-group-heading strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 640;
}

.payoff-step-group-heading small {
  color: #5d6570;
  font-size: 0.7rem;
  line-height: 1.35;
  text-align: right;
}

.planning-tool-control-grid.compact-payoff-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.planning-tool-control-grid.compact-payoff-grid label,
.planning-tool-control-grid.compact-payoff-grid .planning-tool-control-card {
  gap: 4px;
  padding: 8px 9px;
  font-size: 0.7rem;
}

.planning-tool-control-grid.compact-payoff-grid input,
.planning-tool-control-grid.compact-payoff-grid select {
  min-height: 32px;
  padding: 0 9px;
}

.planning-tool-control-grid.compact-payoff-grid label small,
.planning-tool-control-grid.compact-payoff-grid .planning-tool-control-card > small {
  font-size: 0.66rem;
  line-height: 1.25;
}

.payoff-step-group .planning-scenario-name-field {
  grid-column: auto;
}

.payoff-acceleration-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payoff-term-control-card {
  align-content: start;
}

.payoff-term-control-card .payoff-term-toggle {
  gap: 6px;
  margin: 0;
}

.payoff-term-control-card .payoff-term-toggle button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.7rem;
}

.other-debt-payoff-layout {
  display: grid;
  gap: 12px;
}

.other-debt-payoff-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(250, 253, 251, 0.94)),
    #fff;
}

.other-debt-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(35, 32, 29, 0.07);
}

.other-debt-card-heading span,
.other-debt-snapshot-stat span,
.other-debt-payment-total span,
.other-debt-result-strip span {
  display: block;
  color: #5d6570;
  font-size: 0.72rem;
  line-height: 1.35;
}

.other-debt-card-heading strong,
.other-debt-snapshot-stat strong,
.other-debt-payment-total strong,
.other-debt-result-strip strong {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.25;
}

.other-debt-card-heading small {
  max-width: 430px;
  color: #5d6570;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: right;
}

.other-debt-snapshot-grid,
.other-debt-target-grid,
.other-debt-result-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.other-debt-payoff-card label,
.other-debt-snapshot-stat,
.other-debt-payment-total,
.other-debt-result-strip > div,
.other-debt-empty-state {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
  color: #4f555c;
  font-size: 0.72rem;
  line-height: 1.35;
}

.other-debt-payoff-card label input,
.other-debt-payoff-card label select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 0.86rem;
  font-weight: 400;
}

.other-debt-payoff-card label input[readonly] {
  background: #faf9f6;
}

.other-debt-payoff-card label small,
.other-debt-snapshot-stat small,
.other-debt-payment-total small,
.other-debt-result-strip small,
.other-debt-empty-state small {
  color: #5d6570;
  font-size: 0.68rem;
  line-height: 1.3;
}

.other-debt-account-list {
  display: grid;
  gap: 8px;
}

.other-debt-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(135px, auto);
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.other-debt-account-row strong,
.other-debt-account-row span {
  display: block;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 500;
}

.other-debt-account-row span {
  text-align: right;
}

.other-debt-account-row small,
.other-debt-more-count {
  display: block;
  color: #5d6570;
  font-size: 0.68rem;
  line-height: 1.3;
}

.other-debt-account-row > div:last-child small {
  text-align: right;
}

.other-debt-target-grid .planning-scenario-name-field {
  grid-column: auto;
}

.other-debt-payment-equation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(160px, 0.7fr);
  gap: 8px;
  align-items: stretch;
}

.other-debt-payment-equation > span {
  align-self: center;
  color: #8a929a;
  font-size: 1rem;
}

.other-debt-payment-total,
.other-debt-result-strip > div.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background: #edf8f4;
}

.other-debt-payment-total.warning,
.other-debt-result-strip > div.warning {
  border-color: rgba(221, 75, 47, 0.2);
  background: #fff3ef;
}

.other-debt-empty-state {
  border-style: dashed;
  background: rgba(251, 250, 247, 0.72);
}

.planning-tool-output-card {
  border-color: rgba(20, 121, 91, 0.18) !important;
  background: #edf8f4 !important;
}

.child-account-fit-card {
  display: grid;
  gap: 12px;
}

.child-saving-tool .planning-tool-hero {
  min-height: 124px;
}

.child-saving-control-grid {
  align-items: stretch;
}

.child-saving-step-heading {
  display: grid;
  gap: 3px;
  align-items: start;
  justify-content: start;
}

.child-saving-step-heading small {
  max-width: 620px;
  text-align: left;
}

.child-saving-purpose-selector,
.child-saving-purpose-detail-card {
  grid-column: 1 / -1;
}

.child-saving-purpose-selector {
  gap: 12px !important;
}

.child-saving-purpose-heading,
.child-saving-purpose-detail-heading {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.child-saving-purpose-heading span,
.child-saving-purpose-detail-heading span {
  color: #4f555c;
  font-size: 0.74rem;
}

.child-saving-purpose-heading small,
.child-saving-purpose-detail-heading small {
  max-width: 520px;
  color: #68717b;
  font-size: 0.7rem;
  line-height: 1.35;
  text-align: right;
}

.child-saving-purpose-disclaimer {
  margin: 0;
  border: 1px solid rgba(15, 127, 159, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(239, 250, 251, 0.68), rgba(255, 255, 255, 0.96)),
    #fff;
  color: #4f5964;
  padding: 10px 12px;
  font-size: 0.76rem;
  line-height: 1.45;
}

.child-saving-purpose-detail-heading > div {
  display: grid;
  gap: 4px;
}

.child-saving-purpose-detail-heading .child-saving-path-preface {
  align-self: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px;
  justify-items: start;
  padding: 2px 0;
}

.child-saving-purpose-detail-heading .child-saving-path-preface span {
  color: #56616b;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
}

.child-saving-purpose-detail-heading .child-saving-path-preface small {
  max-width: 720px;
  color: #5f6975;
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: left;
}

.child-saving-purpose-detail-heading strong {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 520;
  line-height: 1.25;
}

.child-saving-purpose-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.child-saving-purpose-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 94px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(253, 252, 248, 0.95)),
    #fff;
  color: var(--ink);
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.child-saving-purpose-card:hover,
.child-saving-purpose-card:focus-visible {
  border-color: rgba(20, 121, 91, 0.28);
  box-shadow: 0 12px 26px rgba(26, 22, 18, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.child-saving-purpose-card.active {
  border-color: rgba(20, 121, 91, 0.48);
  background:
    linear-gradient(135deg, rgba(226, 246, 239, 0.96), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: inset 4px 0 0 var(--green), 0 12px 28px rgba(20, 121, 91, 0.08);
}

.child-saving-purpose-card.selected:not(.active) {
  border-color: rgba(15, 127, 159, 0.3);
  background:
    linear-gradient(135deg, rgba(235, 249, 252, 0.86), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: inset 4px 0 0 #0f7f9f, 0 12px 28px rgba(15, 127, 159, 0.08);
}

.child-saving-purpose-card.open {
  border-color: rgba(20, 121, 91, 0.62);
  box-shadow: inset 4px 0 0 var(--green), 0 16px 34px rgba(20, 121, 91, 0.12);
}

.child-saving-purpose-card.selected.open:not(.active) {
  border-color: rgba(15, 127, 159, 0.42);
  box-shadow: inset 4px 0 0 #0f7f9f, 0 16px 34px rgba(15, 127, 159, 0.1);
}

.child-saving-purpose-card.active em,
.child-saving-purpose-card.active i {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.child-saving-purpose-card.open .child-saving-purpose-icon {
  border-color: rgba(20, 121, 91, 0.28);
  background: #edf8f4;
  color: var(--green);
}

.child-saving-purpose-card.selected.open:not(.active) .child-saving-purpose-icon {
  border-color: rgba(15, 127, 159, 0.24);
  background: #eaf7fb;
  color: #0d657d;
}

.child-saving-purpose-icon {
  display: grid;
  align-items: center;
  justify-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(15, 127, 159, 0.18);
  border-radius: 8px;
  background: #eaf7fb;
  color: #0d657d;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
}

.child-saving-purpose-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.child-saving-purpose-card strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 650;
}

.child-saving-purpose-card small {
  color: #5d6570;
  font-size: 0.72rem;
  line-height: 1.38;
}

.child-saving-purpose-action {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.child-saving-purpose-card em,
.child-saving-purpose-card i {
  justify-self: end;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: rgba(237, 248, 244, 0.72);
  color: var(--green);
  padding: 6px 10px;
  font-size: 0.68rem;
  font-style: normal;
  white-space: nowrap;
}

.child-saving-purpose-card i {
  border-color: rgba(35, 32, 29, 0.12);
  background: #f7f5f1;
  color: #68717b;
  font-size: 0.65rem;
}

.child-saving-closed-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px dashed rgba(20, 121, 91, 0.24);
  border-radius: 8px;
  background: rgba(250, 249, 246, 0.62);
  padding: 10px 12px;
}

.child-saving-closed-summary.open {
  border-style: solid;
  border-color: rgba(20, 121, 91, 0.26);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.82), rgba(255, 255, 255, 0.96)),
    #fff;
}

.child-saving-closed-summary span {
  color: var(--ink);
  font-size: 0.82rem;
}

.child-saving-closed-summary small {
  color: #68717b;
  font-size: 0.68rem;
}

.child-saving-detail-heading-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-direction: column;
  flex: 0 0 clamp(360px, 28vw, 420px);
  width: clamp(360px, 28vw, 420px);
}

.child-saving-path-active-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1px 8px;
  align-items: center;
  width: 100%;
  min-height: 0;
  padding: 8px 13px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.child-saving-detail-heading-actions .secondary-button {
  width: 100%;
  min-height: 38px;
}

.child-saving-path-active-toggle input {
  grid-row: 1 / span 2;
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.child-saving-path-active-toggle span {
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 600;
}

.child-saving-path-active-toggle small {
  display: block;
  grid-column: 2;
  color: #68717b;
  font-size: 0.61rem;
  line-height: 1.18;
  text-align: left;
}

.child-saving-path-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.child-saving-path-snapshot > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.92)),
    #fff;
  padding: 10px 12px;
}

.child-saving-path-snapshot > div > span {
  color: #68717b;
  font-size: 0.68rem;
}

.child-saving-path-snapshot strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 560;
}

.child-saving-path-snapshot small {
  color: #68717b;
  font-size: 0.66rem;
  line-height: 1.25;
}

.child-saving-path-snapshot .child-saving-path-status-card {
  border-color: rgba(15, 127, 159, 0.18);
  background:
    linear-gradient(135deg, rgba(235, 249, 252, 0.82), rgba(255, 255, 255, 0.98)),
    #fff;
}

.child-saving-path-snapshot.active .child-saving-path-status-card,
.child-saving-path-snapshot .complete {
  border-color: rgba(20, 121, 91, 0.2);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.86), rgba(255, 255, 255, 0.98)),
    #fff;
}

.child-saving-path-snapshot.active .child-saving-path-status-card strong,
.child-saving-path-snapshot .complete strong {
  color: var(--green);
}

.child-saving-path-snapshot .warning {
  border-color: rgba(199, 154, 54, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 248, 231, 0.78), rgba(255, 255, 255, 0.98)),
    #fff;
}

.child-saving-retirement-milestones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.child-saving-retirement-milestones > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(56, 64, 72, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(250, 248, 244, 0.72)),
    #fff;
  padding: 10px 12px;
}

.child-saving-retirement-milestones span {
  color: #68717b;
  font-size: 0.68rem;
}

.child-saving-retirement-milestones strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 620;
}

.child-saving-retirement-milestones small {
  color: #5d6570;
  font-size: 0.66rem;
  line-height: 1.3;
}

.child-saving-purpose-detail-card {
  border-color: rgba(20, 121, 91, 0.16) !important;
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.74), rgba(255, 255, 255, 0.98)),
    #fff !important;
}

.child-saving-age-gauge {
  --tool-progress: 100;
}

.child-saving-combo-card,
.child-saving-account-summary {
  align-content: start;
}

.child-saving-detail-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.child-saving-detail-subcard {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.92)),
    #fff;
  padding: 10px 12px;
}

.child-saving-detail-subcard > span {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 560;
}

.child-saving-retirement-contribution-card,
.child-saving-retirement-growth-card {
  grid-column: 1 / -1;
}

.child-saving-retirement-note {
  margin: 0;
  border-left: 3px solid rgba(118, 100, 207, 0.34);
  color: #5d6570;
  font-size: 0.7rem;
  line-height: 1.34;
  padding-left: 10px;
}

.child-saving-mini-grid {
  display: grid;
  gap: 8px;
}

.child-saving-mini-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.child-saving-mini-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.child-saving-mini-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.child-saving-mini-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.child-saving-mini-field > span,
.child-saving-account-summary > div > span {
  color: #4f555c;
  font-size: 0.7rem;
}

.child-saving-mini-field small,
.child-saving-account-summary small {
  color: #68717b;
  font-size: 0.68rem;
  line-height: 1.28;
}

.child-saving-account-summary {
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.52fr);
  grid-column: 1 / -1;
  gap: 12px;
  border-color: rgba(15, 127, 159, 0.18) !important;
  background:
    linear-gradient(135deg, rgba(235, 249, 252, 0.82), rgba(255, 255, 255, 0.98)),
    #fff !important;
}

.child-saving-account-summary strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 560;
}

.child-saving-account-actions {
  display: grid;
  gap: 8px;
  align-content: start;
}

.child-saving-account-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.child-saving-account-pills span {
  border: 1px solid #e2ded8;
  border-radius: 999px;
  background: #fff;
  color: #59626d;
  padding: 4px 8px;
  font-size: 0.68rem;
  line-height: 1;
}

.child-saving-account-pills span.active {
  border-color: rgba(15, 127, 159, 0.26);
  background: #eaf7fb;
  color: #0d657d;
}

.child-saving-funding-card {
  border-color: rgba(15, 127, 159, 0.16);
  background:
    linear-gradient(135deg, rgba(235, 249, 252, 0.5), rgba(255, 255, 255, 0.96)),
    #fff;
}

.child-saving-funding-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.48fr);
  gap: 16px;
  align-items: start;
}

.child-saving-funding-source-row.included {
  border-color: rgba(15, 127, 159, 0.18);
  background:
    linear-gradient(90deg, rgba(15, 127, 159, 0.055), rgba(255, 255, 255, 0) 38%),
    #fbfefe;
}

.child-saving-account-controls {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.child-saving-funding-add-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.child-saving-funding-add-grid .saving-retirement-add-account {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.9)),
    #fff;
}

.child-saving-funding-summary .saving-retirement-funding-hero {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.child-saving-funding-breakdown {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.child-saving-funding-summary .saving-retirement-tax-mix .tax-bucket-panel .tax-bucket-layout {
  grid-template-columns: 112px minmax(0, 1fr);
}

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

.child-account-card {
  display: grid;
  gap: 8px;
  min-height: 142px;
  padding: 12px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.94)),
    #fff;
}

.child-account-card.recommended {
  border-color: rgba(15, 127, 159, 0.22);
  background:
    linear-gradient(135deg, rgba(232, 247, 251, 0.88), rgba(255, 255, 255, 0.96)),
    #fff;
}

.child-account-card span {
  color: #5d6570;
  font-size: 0.7rem;
}

.child-account-card strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.child-account-card p,
.child-account-card small {
  margin: 0;
  color: #4f555c;
  font-size: 0.74rem;
  line-height: 1.4;
}

.child-account-card small {
  color: #6a717b;
}

.education-step-list .planner-step {
  grid-template-columns: 24px minmax(0, 1fr) minmax(130px, 0.52fr);
}

.fixed-output-step strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 400;
  text-align: right;
}

.goal-progress-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.payoff-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 14px;
  align-items: start;
}

.planner-progress-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 22, 18, 0.05);
}

.planning-target-cards {
  align-items: stretch;
}

.goal-story-cards {
  grid-template-columns: minmax(0, 1fr);
}

.planning-path-card {
  position: relative;
  overflow: hidden;
  gap: 16px;
  padding: 20px;
  border-color: rgba(35, 32, 29, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(248, 251, 249, 0.92)),
    #fff;
  box-shadow: 0 18px 42px rgba(26, 22, 18, 0.07);
}

.planning-path-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--green), #f0b84d);
  content: "";
}

.planning-path-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.planning-path-header h3 {
  margin: 6px 0 6px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 600;
}

.planning-path-header p,
.planning-path-header p {
  margin: 0;
  max-width: 850px;
  color: #424a54;
  font-size: 0.84rem;
  line-height: 1.5;
}

.planning-path-status {
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  min-height: 34px;
  border: 1px solid rgba(21, 150, 109, 0.2);
  border-radius: 999px;
  background: #edf8f4;
  color: #087a58;
  font-size: 0.86rem;
  font-weight: 600;
}

.planning-path-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.planning-path-option {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.38fr);
  gap: 12px;
  align-items: center;
  overflow: hidden;
  padding: 16px;
  border: 1px solid #dedbd4;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.92)),
    #fff;
}

.planning-path-option::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  content: "";
}

.planning-path-option.cash-flow-option {
  border-color: rgba(21, 150, 109, 0.22);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.58), rgba(255, 255, 255, 0.98)),
    #fff;
}

.planning-path-option.cash-flow-option::before {
  background: var(--green);
}

.planning-path-option.balance-option {
  border-color: rgba(230, 171, 46, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 248, 231, 0.66), rgba(255, 255, 255, 0.98)),
    #fff;
}

.planning-path-option.balance-option::before {
  background: #f0b84d;
}

.planning-path-option span,
.planning-path-option small {
  display: block;
}

.planning-path-option > div:first-child > span {
  color: #404852;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.planning-path-option strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 600;
}

.planning-path-card small,
.planning-path-option small {
  justify-self: auto;
  color: #5d6570;
  font-size: 0.74rem;
  line-height: 1.35;
}

.planning-path-option > div:first-child small {
  margin-top: 5px;
}

.planning-path-target {
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  text-align: right;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.planning-path-target span,
.planning-path-target input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: right;
}

.planning-path-target input {
  min-height: 22px;
}

.planning-path-target .planning-path-left {
  color: #69717c;
  font-size: 0.72rem;
}

.planning-path-option .planner-meter {
  height: 10px;
  background: rgba(35, 32, 29, 0.09);
}

.planning-path-option .planner-meter,
.planning-path-footer {
  grid-column: 1 / -1;
}

.planning-path-footer {
  justify-self: end !important;
  padding: 3px 8px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.planning-pulse-card {
  position: relative;
  overflow: hidden;
  gap: 14px;
  min-height: 164px;
  padding: 18px 18px 16px 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 246, 0.9)),
    #fff;
}

.planning-pulse-card::before {
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  content: "";
}

.cash-flow-card::before {
  background: #15966d;
}

.balance-goal-card::before {
  background: #f0b84d;
}

.planning-pulse-top,
.planning-pulse-main {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
}

.planning-pulse-kicker {
  color: #404852;
  font-size: 0.74rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.planning-pulse-chip {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 28px;
  border: 1px solid rgba(21, 150, 109, 0.16);
  border-radius: 999px;
  background: rgba(21, 150, 109, 0.08);
  color: #087a58;
  font-size: 0.78rem;
}

.planning-pulse-main {
  align-items: stretch;
}

.planning-pulse-main > div:first-child {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
}

.planning-pulse-main strong {
  color: var(--ink);
  font-size: 1.32rem;
  font-weight: 400;
  line-height: 1.15;
}

.planning-pulse-card small {
  justify-self: auto;
  color: #5d6570;
  line-height: 1.35;
}

.planning-pulse-target {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid #e3e0d9;
  border-radius: 8px;
  background: #fff;
  text-align: right;
}

.planning-pulse-target span {
  color: var(--ink);
  font-size: 1rem;
}

.planning-pulse-target input {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: right;
}

.planning-pulse-card .progress-card-note {
  justify-self: start;
  margin-top: -2px;
}

.planning-pulse-footer {
  justify-self: end !important;
}

.payoff-snapshot-card {
  align-content: start;
  min-height: 136px;
  background: #fff;
}

.payoff-snapshot-card.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background: #edf8f4;
}

.payoff-snapshot-card.warning {
  border-color: rgba(221, 75, 47, 0.2);
  background: #fff3ef;
}

.payoff-snapshot-card strong {
  display: block;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 400;
}

.planner-progress-card > span,
.goal-tool-header span,
.analysis-card > span {
  color: #404852;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.planner-progress-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.64fr);
  gap: 10px;
  align-items: center;
}

.planner-progress-values > span {
  font-size: 0.98rem;
}

.fixed-goal-value {
  display: grid;
  place-items: center end;
  min-height: 34px;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #f6f7f9;
  color: var(--ink);
  padding: 0 10px;
  text-align: right;
}

.planner-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e8ec;
}

.planner-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.planner-meter.cash-flow span {
  background: var(--green);
}

.planner-progress-card small {
  justify-self: end;
  color: #4f555c;
  font-size: 0.74rem;
}

.planner-progress-card .progress-card-note {
  justify-self: start;
  min-height: 16px;
}

.retirement-redirect-note {
  justify-self: start !important;
  padding: 8px 10px;
  border: 1px solid rgba(20, 121, 91, 0.14);
  border-radius: 8px;
  background: #edf8f4;
  color: var(--green) !important;
  line-height: 1.35;
}

.goal-tool-card {
  padding: 16px;
}

.goal-tool-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.planner-settings-form,
.planner-assignment-form {
  display: grid;
  gap: 10px;
}

.planner-settings-form {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.goal-form-note {
  align-self: end;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
  color: #4f555c;
  font-size: 0.78rem;
}

.planner-assignment-forms {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.planner-assignment-form {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.85fr) minmax(0, 0.8fr) auto;
  align-items: end;
}

.planner-account-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.planner-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  min-height: 50px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f1f3f5;
}

.planner-account-row:last-child {
  border-bottom: 0;
}

.planner-account-row.savings-row {
  background: #fff;
}

.planner-account-row span,
.planner-account-row small {
  display: block;
}

.planner-account-row small {
  margin-top: 3px;
  color: #4f555c;
  font-size: 0.72rem;
}

.emergency-funding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.emergency-assignment-card {
  position: relative;
  display: grid;
  gap: 14px;
  overflow: hidden;
  border-color: rgba(35, 32, 29, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(251, 250, 247, 0.9)),
    #fff;
  box-shadow: 0 14px 34px rgba(26, 22, 18, 0.055);
}

.emergency-assignment-card.balance-card {
  border-color: rgba(20, 121, 91, 0.16);
}

.emergency-assignment-card.savings-card {
  border-color: rgba(230, 171, 46, 0.2);
}

.emergency-assignment-card.retirement-balance-card {
  border-top-color: var(--line);
}

.emergency-assignment-card.retirement-savings-card {
  border-top-color: var(--line);
}

.emergency-assignment-card.education-balance-card {
  border-top-color: var(--line);
  background: #fff;
}

.emergency-assignment-card.education-savings-card {
  border-top-color: var(--line);
  background: #fff;
}

.emergency-assignment-card.other-balance-card {
  border-top-color: var(--line);
  background: #fff;
}

.emergency-assignment-card.other-savings-card {
  border-top-color: var(--line);
  background: #fff;
}

.emergency-assignment-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  padding: 13px 14px;
  border: 1px solid rgba(35, 32, 29, 0.07);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.72), rgba(255, 255, 255, 0.96)),
    #fff;
}

.emergency-assignment-header > div:first-child,
.retirement-savings-header > div:first-child {
  min-width: 0;
}

.emergency-savings-wide-card .retirement-savings-header {
  padding: 13px 14px;
  border: 1px solid rgba(230, 171, 46, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 231, 0.78), rgba(255, 255, 255, 0.96)),
    #fff;
}

.emergency-assignment-header span,
.emergency-assignment-total span {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 600;
}

.emergency-assignment-header p,
.emergency-assignment-total small {
  margin: 4px 0 0;
  color: #4f555c;
  font-size: 0.74rem;
  line-height: 1.35;
}

.emergency-assignment-total {
  flex: 0 1 150px;
  min-width: 112px;
  padding: 9px 10px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  text-align: right;
}

.emergency-assignment-list {
  display: grid;
  gap: 8px;
}

.emergency-assignment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 11px 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.9)),
    #fff;
}

.emergency-assignment-row.savings-row {
  border-color: rgba(230, 171, 46, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 248, 231, 0.42), rgba(255, 255, 255, 0.96)),
    #fff;
}

.emergency-assignment-row span,
.emergency-assignment-row small {
  display: block;
}

.emergency-assignment-row small {
  margin-top: 3px;
  color: #606872;
  font-size: 0.72rem;
}

.emergency-assignment-row > span {
  min-width: 94px;
  padding: 7px 9px;
  border: 1px solid rgba(20, 121, 91, 0.14);
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.emergency-assignment-row.savings-row > span {
  border-color: rgba(230, 171, 46, 0.2);
  background: #fff8e7;
  color: #7a5414;
}

.emergency-assignment-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fbfaf7;
}

.emergency-assignment-form label {
  display: grid;
  gap: 6px;
  color: #4f555c;
  font-size: 0.74rem;
}

.emergency-assignment-form input,
.emergency-assignment-form select {
  min-width: 0;
  min-height: 38px;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.emergency-assignment-form .secondary-button {
  min-height: 38px;
}

.retirement-add-balance-button {
  justify-self: start;
  margin-top: 2px;
}

.retirement-add-balance-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.goal-assignment-edit-form {
  margin-top: 8px;
  border-top: 0;
  padding: 10px;
  border: 1px solid #e4e0db;
  border-radius: 8px;
  background: #fff;
}

.assignment-edit-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.retirement-funding-layout {
  display: grid;
  gap: 14px;
}

.retirement-wide-card,
.retirement-savings-card {
  min-width: 0;
}

.retirement-savings-card {
  display: grid;
  gap: 16px;
  overflow: hidden;
  border-color: rgba(230, 171, 46, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(251, 250, 247, 0.9)),
    #fff;
  box-shadow: 0 14px 34px rgba(26, 22, 18, 0.055);
}

.unified-funding-card.retirement-savings-card,
.unified-funding-card.retirement-income-funding-card {
  border-color: var(--line);
  background: #fff;
}

.retirement-savings-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.retirement-savings-header span,
.retirement-savings-total span {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
}

.retirement-savings-header p,
.retirement-savings-total small {
  margin: 4px 0 0;
  color: #4f555c;
  font-size: 0.74rem;
  line-height: 1.35;
}

.retirement-savings-total {
  flex: 0 1 170px;
  min-width: 150px;
  padding: 9px 10px;
  border: 1px solid rgba(230, 171, 46, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  text-align: right;
}

.retirement-savings-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}

.emergency-savings-wide-card {
  border-top-color: var(--line);
}

.emergency-savings-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.retirement-contribution-buckets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.retirement-savings-stats > div,
.retirement-contribution-buckets > div {
  padding: 11px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(251, 250, 247, 0.88)),
    #fff;
}

.retirement-savings-stats > div.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background: #edf8f4;
}

.retirement-savings-stats > div.warning {
  border-color: rgba(221, 75, 47, 0.2);
  background: #fff3ef;
}

.retirement-savings-stats span,
.retirement-contribution-buckets span {
  display: block;
  color: #4f555c;
  font-size: 0.72rem;
}

.retirement-savings-stats strong,
.retirement-contribution-buckets strong {
  display: block;
  margin-top: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 400;
}

.retirement-contribution-list {
  display: grid;
  gap: 8px;
}

.retirement-contribution-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(120px, 0.7fr) minmax(110px, 0.65fr) minmax(100px, 0.55fr) minmax(110px, 0.6fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #e4e0db;
  border-radius: 8px;
  background: #fff;
}

.retirement-contribution-row select,
.retirement-contribution-row input,
.retirement-contribution-form select,
.retirement-contribution-form input {
  min-width: 0;
  min-height: 36px;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.retirement-contribution-row > span,
.retirement-contribution-row > strong {
  color: #4f555c;
  font-size: 0.78rem;
  font-weight: 400;
}

.retirement-contribution-row > strong {
  color: var(--ink);
  text-align: right;
}

.retirement-contribution-buckets > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.retirement-contribution-buckets span {
  font-size: 0.78rem;
}

.retirement-contribution-buckets strong {
  text-align: right;
  white-space: nowrap;
}

.retirement-contribution-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
  align-items: end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.retirement-contribution-form label {
  display: grid;
  gap: 6px;
  color: #4f555c;
  font-size: 0.74rem;
}

.retirement-withdrawal-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  background: #fff;
}

.retirement-withdrawal-card span,
.retirement-withdrawal-card strong {
  display: block;
}

.retirement-withdrawal-card span {
  color: #404852;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.retirement-withdrawal-card strong {
  margin-top: 6px;
  color: var(--ink);
  font-size: 1.35rem;
}

.retirement-withdrawal-card p {
  max-width: 330px;
  margin: 0;
  color: #4f555c;
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: right;
}

.retirement-income-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.income-snapshot-card,
.income-funding-card,
.retirement-income-plan-card,
.income-bucket-card,
.ltc-needs-card,
.withdrawal-strategy-card {
  border-color: rgba(35, 32, 29, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(251, 250, 247, 0.9)),
    #fff;
  box-shadow: 0 14px 34px rgba(26, 22, 18, 0.055);
}

.income-snapshot-card {
  align-content: start;
  min-height: 136px;
}

.income-snapshot-card.complete,
.income-funding-card.complete,
.income-plan-stats > div.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background: #edf8f4;
}

.income-snapshot-card.warning,
.income-funding-card.warning,
.income-plan-stats > div.warning {
  border-color: rgba(221, 75, 47, 0.2);
  background: #fff3ef;
}

.income-snapshot-card strong,
.income-funding-line strong,
.income-plan-stats strong,
.income-bucket-grid strong {
  display: block;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 400;
}

.income-snapshot-card small {
  justify-self: start;
  line-height: 1.35;
}

.income-funding-card {
  min-height: 136px;
}

.income-funding-line {
  display: grid;
  gap: 4px;
}

.income-funding-line small {
  justify-self: start;
}

.retirement-income-plan-card {
  display: grid;
  gap: 16px;
}

.retirement-income-chart-card {
  display: grid;
  gap: 14px;
}

.retirement-income-chart-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.retirement-income-chart-summary > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(253, 252, 248, 0.96)),
    #fff;
}

.retirement-income-chart-summary > div.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background: #edf8f4;
}

.retirement-income-chart-summary > div.warning {
  border-color: rgba(194, 92, 72, 0.2);
  background: #fff1ee;
}

.retirement-income-chart-summary span {
  color: #5d6570;
  font-size: 0.72rem;
}

.retirement-income-chart-summary strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
}

.retirement-income-chart-summary small {
  color: #5d6570;
  font-size: 0.72rem;
  line-height: 1.35;
}

.retirement-income-chart-wrap {
  display: grid;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fff;
}

.retirement-income-chart-actions {
  justify-content: flex-end;
}

.retirement-income-runway-story {
  margin: 0;
}

.retirement-income-scenario-switch {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(250, 252, 253, 0.94)),
    #fff;
}

.retirement-income-scenario-switch-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-end;
}

.retirement-income-scenario-switch-heading > div {
  display: grid;
  gap: 3px;
}

.retirement-income-scenario-switch-heading span,
.retirement-income-scenario-switch-heading small {
  color: #5d6570;
  font-size: 0.72rem;
  line-height: 1.35;
}

.retirement-income-scenario-switch-heading strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.retirement-income-scenario-switch-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.retirement-income-scenario-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  min-width: 0;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
  color: #4f555c;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.retirement-income-scenario-toggle:hover {
  border-color: #cfd8dc;
  transform: translateY(-1px);
}

.retirement-income-scenario-toggle.active {
  border-color: rgba(20, 121, 91, 0.2);
  background: #edf8f4;
  color: var(--ink);
}

.retirement-income-scenario-toggle i {
  grid-row: span 2;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.retirement-income-scenario-toggle span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retirement-income-scenario-toggle small {
  min-width: 0;
  overflow: hidden;
  color: #6a717b;
  font-size: 0.68rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retirement-income-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.retirement-income-chart .plot-area {
  fill: #fbfcfd;
  stroke: #dfe5e8;
  stroke-width: 1;
}

.retirement-income-chart .chart-grid line {
  stroke: #dfe5e8;
  stroke-dasharray: 5 7;
  stroke-width: 1;
}

.retirement-income-chart .chart-grid line.baseline,
.retirement-income-chart .axis {
  stroke: #cfd6dc;
  stroke-dasharray: none;
  stroke-width: 1.1;
}

.retirement-income-scenario-line {
  fill: none;
  stroke: var(--scenario-color, #69b99d);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.2;
  opacity: 0.78;
}

.retirement-income-scenario-line.active {
  stroke-width: 4.2;
  opacity: 0.95;
}

.retirement-income-ltc-window {
  fill: rgba(229, 154, 82, 0.105);
}

.retirement-income-ltc-window-label {
  pointer-events: none;
}

.retirement-income-ltc-window-label rect {
  fill: rgba(255, 255, 255, 0.78);
  stroke: rgba(217, 154, 95, 0.22);
  stroke-width: 0.8;
}

.retirement-income-ltc-window-label text {
  fill: #6a717b;
  font-size: 7.2px;
  font-weight: 650;
  letter-spacing: 0;
}

.retirement-income-legacy-line {
  stroke: #9180dc;
  stroke-dasharray: 6 6;
  stroke-width: 2;
}

.retirement-income-large-purchase-marker line {
  stroke: #d99a5f;
  stroke-dasharray: 4 6;
  stroke-width: 1.4;
  opacity: 0.75;
}

.retirement-income-large-purchase-marker circle {
  fill: #d99a5f;
  stroke: #fff;
  stroke-width: 2;
}

.retirement-income-start-dot,
.retirement-income-end-dot {
  fill: var(--scenario-color, #69b99d);
  stroke: #fff;
  stroke-width: 2.5;
}

.retirement-income-end-dot {
  opacity: 0.9;
}

.retirement-income-end-dot.active {
  filter: drop-shadow(0 3px 5px rgba(26, 22, 18, 0.15));
  opacity: 1;
}

.retirement-income-chart text {
  fill: #5d6570;
  font-size: 11.5px;
}

.retirement-income-withdrawal-plan {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(239, 249, 245, 0.88), rgba(255, 255, 255, 0.96)),
    #fff;
}

.retirement-income-withdrawal-plan.warning {
  border-color: rgba(194, 92, 72, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 242, 238, 0.84), rgba(255, 255, 255, 0.96)),
    #fff;
}

.retirement-income-withdrawal-plan-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 10px;
}

.retirement-income-withdrawal-plan-heading > div,
.retirement-income-withdrawal-section {
  min-width: 0;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.retirement-income-withdrawal-plan-heading > div {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.retirement-income-withdrawal-plan span,
.retirement-income-withdrawal-section-heading span {
  color: #4f555c;
  font-size: 0.72rem;
}

.retirement-income-withdrawal-plan strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 500;
}

.retirement-income-withdrawal-plan small,
.retirement-income-withdrawal-empty,
.retirement-income-withdrawal-shortfall {
  color: #4f555c;
  font-size: 0.72rem;
  line-height: 1.35;
}

.retirement-income-withdrawal-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
}

.retirement-income-withdrawal-section {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
}

.retirement-income-withdrawal-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.retirement-income-withdrawal-section-heading span {
  color: var(--ink);
  font-size: 0.82rem;
}

.retirement-income-withdrawal-bucket-list,
.retirement-income-withdrawal-account-list {
  display: grid;
  gap: 7px;
}

.retirement-income-withdrawal-bucket-row,
.retirement-income-withdrawal-account-row {
  display: grid;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(35, 32, 29, 0.07);
  border-radius: 7px;
  background: #fff;
}

.retirement-income-withdrawal-bucket-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.retirement-income-withdrawal-account-row {
  grid-template-columns: minmax(0, 1fr) minmax(110px, auto);
}

.retirement-income-withdrawal-bucket-row > span {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--ink);
  font-size: 0.8rem;
}

.retirement-income-withdrawal-bucket-row i {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.retirement-income-withdrawal-account-row span {
  display: block;
  color: var(--ink);
  font-size: 0.82rem;
}

.retirement-income-withdrawal-account-row > div:last-child,
.retirement-income-withdrawal-bucket-row strong,
.retirement-income-withdrawal-bucket-row small {
  text-align: right;
}

.retirement-income-withdrawal-empty,
.retirement-income-withdrawal-shortfall {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.retirement-income-withdrawal-shortfall {
  border-color: rgba(194, 92, 72, 0.18);
  background: #fff3ef;
  color: #9c4a38;
}

.retirement-income-chart-legend {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: #5d6570;
  font-size: 0.75rem;
}

.retirement-income-chart-legend span,
.retirement-income-chart-legend-item {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.retirement-income-chart-legend-item {
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #e2ded8;
  border-radius: 8px;
  background: #fff;
  color: #4f555c;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
  transform 0.15s ease;
}

.retirement-income-chart-legend-item .retirement-income-legend-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.retirement-income-chart-legend-item .retirement-income-legend-name {
  display: block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retirement-income-chart-legend-item small {
  color: #6a717b;
  font-size: 0.66rem;
  line-height: 1;
  white-space: nowrap;
}

.retirement-income-chart-legend-item:hover {
  border-color: #cfd8dc;
  transform: translateY(-1px);
}

.retirement-income-chart-legend-item.active {
  border-color: rgba(20, 121, 91, 0.18);
  background: #edf8f4;
  color: var(--ink);
}

.retirement-income-chart-legend i {
  display: inline-block;
  flex: 0 0 16px;
  width: 16px;
  height: 8px;
  border-radius: 999px;
  background: #69b99d;
}

.retirement-income-chart-legend-item > span {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retirement-income-chart-legend-item strong {
  color: var(--ink);
  font-weight: 600;
}

.retirement-income-chart-legend i.legacy {
  background: #9180dc;
}

.retirement-income-chart-legend i.purchase {
  background: #d99a5f;
}

.payoff-plan-card,
.payoff-account-card,
.payoff-strategy-card {
  display: grid;
  gap: 14px;
  border-color: rgba(35, 32, 29, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(251, 250, 247, 0.9)),
    #fff;
  box-shadow: 0 14px 34px rgba(26, 22, 18, 0.055);
}

.payoff-plan-card {
  border-top-color: var(--line);
}

.payoff-possibility-card {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  border-color: rgba(221, 75, 47, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 243, 239, 0.56), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: 0 14px 34px rgba(26, 22, 18, 0.055);
}

.payoff-possibility-top,
.payoff-possibility-grid {
  display: grid;
  gap: 10px;
}

.payoff-possibility-top {
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  align-items: stretch;
}

.payoff-possibility-top > div,
.payoff-possibility-grid > label,
.payoff-possibility-grid > div {
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.payoff-possibility-top span,
.payoff-possibility-grid span {
  display: block;
  color: #4f555c;
  font-size: 0.72rem;
}

.payoff-possibility-top strong,
.payoff-possibility-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}

.payoff-possibility-top small,
.payoff-possibility-grid small {
  display: block;
  margin-top: 5px;
  color: #4f555c;
  font-size: 0.72rem;
  line-height: 1.35;
}

.payoff-term-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.payoff-term-toggle button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-size: 0.8rem;
}

.payoff-term-toggle button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.payoff-chart-card {
  display: grid;
  gap: 14px;
  border-color: rgba(20, 121, 91, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(250, 253, 251, 0.96)),
    #fff;
  box-shadow: 0 14px 34px rgba(26, 22, 18, 0.055);
}

.payoff-chart-card .saving-retirement-card-heading {
  align-items: flex-start;
}

.payoff-chart-story-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 10px;
  align-items: stretch;
}

.payoff-chart-active-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.92), rgba(255, 255, 255, 0.96)),
    #fff;
}

.payoff-chart-active-summary span,
.payoff-chart-active-summary small {
  color: #5c6570;
  font-size: 0.72rem;
  line-height: 1.35;
}

.payoff-chart-active-summary strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.payoff-chart-wrap {
  overflow-x: auto;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(251, 253, 253, 0.98)),
    #fff;
  padding: 10px;
}

.payoff-timeline-chart {
  display: block;
  width: 100%;
  min-width: 780px;
  height: auto;
}

.payoff-timeline-chart .planning-chart-hover-capture {
  cursor: ew-resize;
  touch-action: none;
}

.payoff-timeline-chart .chart-grid line {
  stroke: #dfe6ea;
  stroke-dasharray: 7 9;
  stroke-width: 1.2;
}

.payoff-timeline-chart .axis {
  stroke: #cbd4db;
  stroke-width: 1.5;
}

.payoff-timeline-chart text {
  fill: #5f6a77;
  font-size: 14px;
  font-weight: 400;
}

.payoff-chart-series path {
  fill: none;
  stroke: var(--scenario-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.payoff-chart-series.baseline path {
  stroke-width: 4;
  stroke-dasharray: 8 8;
  opacity: 0.72;
}

.payoff-chart-series circle {
  fill: var(--scenario-color);
  stroke: #fff;
  stroke-width: 4;
}

.payoff-chart-series:not(.active):not(.baseline) {
  opacity: 0.76;
}

.payoff-chart-hover-label rect {
  fill: rgba(255, 255, 255, 0.97);
  stroke-width: 1.25;
}

.payoff-chart-hover-label.active rect {
  fill: rgba(246, 252, 250, 0.98);
}

.payoff-chart-hover-label text {
  fill: #303842;
  font-size: 8.4px;
  font-weight: 650;
}

.payoff-chart-hover-guide {
  stroke-opacity: 0.5;
}

.payoff-scenario-switch {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.payoff-scenario-switch-top {
  margin-top: -2px;
}

.payoff-scenario-toggle {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-width: 0;
  min-height: 76px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(251, 250, 247, 0.92)),
    #fff;
  color: var(--ink);
  padding: 12px 14px;
  text-align: left;
}

.payoff-scenario-toggle i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.payoff-scenario-toggle span {
  font-weight: 500;
}

.payoff-scenario-toggle small {
  color: #5f6771;
  font-size: 0.72rem;
  line-height: 1.35;
}

.payoff-scenario-toggle.active {
  border-color: rgba(20, 121, 91, 0.22);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.95), rgba(255, 255, 255, 0.96)),
    #fff;
  box-shadow: inset 4px 0 0 var(--scenario-color);
}

.payoff-scenario-toggle.baseline {
  cursor: default;
  opacity: 1;
}

.payoff-scenario-matrix {
  overflow-x: auto;
}

.payoff-scenario-matrix-row {
  grid-template-columns: minmax(190px, 1.25fr) minmax(118px, 0.82fr) minmax(128px, 0.9fr) minmax(132px, 0.9fr) minmax(132px, 0.9fr);
  min-width: 760px;
}

.payoff-scenario-matrix-row > div {
  align-content: center;
  min-height: 42px;
}

.payoff-scenario-matrix-row small {
  overflow: hidden;
  color: #68717b;
  font-size: 0.68rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payoff-possibility-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payoff-possibility-grid input {
  width: 100%;
  min-height: 38px;
  margin-top: 8px;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.payoff-account-card {
  border-top-color: var(--line);
}

.payoff-strategy-card {
  border-top-color: var(--line);
}

.income-plan-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.income-plan-header span:not(.income-status-pill) {
  display: block;
  color: #404852;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.income-plan-header h3 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 1.35rem;
}

.income-plan-header p {
  max-width: 640px;
  margin: 8px 0 0;
  color: #4f555c;
  font-size: 0.82rem;
  line-height: 1.45;
}

.income-status-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.76rem;
  background: #f3f1ef;
}

.income-status-pill.complete {
  background: #dff3ec;
}

.income-status-pill.warning {
  background: #ffe2d8;
}

.income-plan-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.payoff-plan-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.income-plan-stats > div,
.payoff-plan-stats > div,
.payoff-mini-grid > div {
  padding: 11px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
}

.income-plan-stats span,
.payoff-plan-stats span,
.payoff-mini-grid span,
.income-bucket-grid span {
  display: block;
  color: #4f555c;
  font-size: 0.72rem;
}

.income-plan-stats strong,
.payoff-plan-stats strong,
.payoff-account-row strong,
.payoff-mini-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 400;
}

.payoff-plan-stats > div.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background: #edf8f4;
}

.payoff-plan-stats > div.warning {
  border-color: rgba(221, 75, 47, 0.2);
  background: #fff3ef;
}

.payoff-account-list {
  display: grid;
  gap: 8px;
}

.payoff-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
}

.payoff-account-row span {
  display: block;
  color: var(--ink);
  font-size: 0.84rem;
}

.payoff-account-row small {
  display: block;
  margin-top: 3px;
  color: #4f555c;
  font-size: 0.72rem;
}

.payoff-account-row strong {
  text-align: right;
}

.payoff-strategy-card p {
  margin: 0;
  color: #4f555c;
  font-size: 0.82rem;
  line-height: 1.45;
}

.payoff-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.income-lifecycle {
  display: grid;
  gap: 8px;
}

.income-lifecycle-labels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  color: #4f555c;
  font-size: 0.74rem;
}

.income-lifecycle-labels span:nth-child(2) {
  text-align: center;
}

.income-lifecycle-labels span:last-child {
  text-align: right;
}

.income-lifecycle-bar {
  display: flex;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e8ec;
}

.income-lifecycle-bar i,
.income-lifecycle-bar b {
  display: block;
  height: 100%;
}

.income-lifecycle-bar i {
  background: #d6dadf;
}

.income-lifecycle-bar b {
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.income-bucket-card {
  display: grid;
  gap: 14px;
}

.ltc-needs-card {
  display: grid;
  gap: 14px;
}

.ltc-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ltc-toggle {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  padding: 5px 10px;
  font-size: 0.72rem;
}

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

.ltc-philosophy {
  margin: 0;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 8px;
  background: #edf8f4;
  color: #2d333a;
  padding: 11px 12px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.ltc-status-note {
  margin: 0;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 8px;
  background: #edf8f4;
  color: #245b49;
  padding: 10px 12px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.ltc-status-note.warning {
  border-color: rgba(221, 75, 47, 0.18);
  background: #fff3ef;
  color: #8c271c;
}

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

.ltc-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 160px;
  gap: 10px;
}

.ltc-shock-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  gap: 10px;
}

.ltc-summary-grid > div,
.ltc-start-field,
.ltc-stage-row,
.ltc-shock-detail > div {
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
}

.ltc-summary-grid > div,
.ltc-shock-detail > div {
  padding: 10px;
}

.ltc-summary-grid span,
.ltc-start-field span,
.ltc-stage-row label,
.ltc-shock-detail span {
  color: #4f555c;
  font-size: 0.72rem;
}

.ltc-summary-grid strong,
.ltc-start-field strong,
.ltc-stage-row strong,
.ltc-shock-detail strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 400;
}

.ltc-summary-grid small,
.ltc-stage-row small,
.ltc-shock-detail small {
  display: block;
  margin-top: 3px;
  color: #4f555c;
  font-size: 0.72rem;
  line-height: 1.35;
}

.ltc-start-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.ltc-control-grid .ltc-start-field {
  grid-template-columns: 1fr;
  align-content: start;
}

.ltc-start-field input,
.ltc-start-field select,
.ltc-stage-row input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 400;
}

.ltc-stage-list {
  display: grid;
  gap: 8px;
}

.ltc-stage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 76px 94px 110px;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.ltc-stage-row > div > span {
  display: block;
  color: var(--ink);
  font-size: 0.84rem;
}

.ltc-stage-row label {
  display: grid;
  gap: 5px;
}

.ltc-stage-row strong {
  text-align: right;
}

.withdrawal-strategy-card {
  display: grid;
  gap: 14px;
}

.strategy-selector {
  display: grid;
  gap: 6px;
  min-width: 250px;
}

.goal-tool-header .strategy-selector span {
  color: #4f555c;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
}

.strategy-selector select {
  min-height: 38px;
  border: 1px solid rgba(35, 32, 29, 0.14);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0 34px 0 10px;
}

.withdrawal-strategy-summary {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 10px;
}

.withdrawal-strategy-summary > div,
.withdrawal-bucket-row,
.withdrawal-account-row {
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
}

.withdrawal-strategy-summary > div {
  padding: 10px;
}

.withdrawal-strategy-summary span,
.withdrawal-account-heading span,
.withdrawal-bucket-row span {
  color: #4f555c;
  font-size: 0.72rem;
}

.withdrawal-strategy-summary strong,
.withdrawal-bucket-row strong,
.withdrawal-bucket-row em,
.withdrawal-account-row strong {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  font-style: normal;
  font-weight: 400;
}

.withdrawal-strategy-summary strong {
  margin-top: 5px;
  line-height: 1.35;
}

.withdrawal-strategy-summary small {
  display: block;
  margin-top: 5px;
  color: #4f555c;
  font-size: 0.72rem;
  line-height: 1.35;
}

.withdrawal-bucket-list,
.withdrawal-account-list {
  display: grid;
  gap: 8px;
}

.withdrawal-bucket-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 120px 42px;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.withdrawal-bucket-row span {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 0.82rem;
}

.withdrawal-bucket-row i {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.withdrawal-bucket-row small,
.withdrawal-account-heading small,
.withdrawal-account-row small,
.withdrawal-shortfall {
  color: #4f555c;
  font-size: 0.74rem;
  line-height: 1.35;
}

.withdrawal-bucket-row strong,
.withdrawal-bucket-row em,
.withdrawal-account-row strong {
  text-align: right;
}

.withdrawal-account-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-top: 2px;
}

.withdrawal-account-heading span {
  color: var(--ink);
  font-size: 0.82rem;
}

.withdrawal-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.withdrawal-account-row span {
  display: block;
  color: var(--ink);
  font-size: 0.84rem;
}

.withdrawal-account-row small {
  display: block;
  margin-top: 3px;
}

.withdrawal-shortfall {
  margin: 2px 0 0;
  border: 1px solid rgba(221, 75, 47, 0.18);
  border-radius: 8px;
  background: #fff3ef;
  padding: 9px 10px;
}

.income-bucket-strip {
  display: flex;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e8ec;
}

.income-bucket-strip i {
  display: block;
  min-width: 4px;
  height: 100%;
}

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

.income-bucket-grid > div {
  padding: 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
}

.income-bucket-grid span {
  display: flex;
  gap: 8px;
  align-items: center;
}

.income-bucket-grid i {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.income-bucket-grid strong {
  margin-top: 5px;
  font-size: 0.92rem;
}

.retirement-tax-bucket-card {
  display: grid;
  gap: 18px;
  background: #fff;
}

.retirement-tax-bucket-card .goal-tool-header small {
  color: #4f555c;
  font-size: 0.76rem;
}

.tax-bucket-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tax-bucket-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background: #fff;
}

.tax-bucket-panel-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.tax-bucket-panel-heading span {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 400;
}

.tax-bucket-panel-heading small {
  color: #69717c;
  font-size: 0.74rem;
  text-align: right;
}

.tax-bucket-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.tax-bucket-panel .tax-bucket-layout {
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
}

.tax-bucket-pie {
  width: 170px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #fff 60%, transparent 61%),
    conic-gradient(var(--bucket-gradient));
  box-shadow: inset 0 0 0 1px rgba(35, 32, 29, 0.06);
}

.tax-bucket-panel .tax-bucket-pie {
  width: 132px;
}

.tax-bucket-legend {
  display: grid;
  gap: 8px;
}

.tax-bucket-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 110px;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.tax-bucket-row span {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  color: var(--ink);
  font-size: 0.84rem;
}

.tax-bucket-row i {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.tax-bucket-row strong,
.tax-bucket-row small {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 400;
  text-align: right;
}

.goal-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.analysis-card {
  display: grid;
  gap: 18px;
  min-height: 190px;
}

.donut-row {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.planner-donut {
  width: 126px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #fff 60%, transparent 61%),
    conic-gradient(var(--green) 0 100%);
}

.planner-donut.tax-donut {
  background:
    radial-gradient(closest-side, #fff 60%, transparent 61%),
    conic-gradient(#ffb35c 0 100%);
}

.donut-row span,
.donut-row small {
  display: block;
}

.donut-row small {
  margin-top: 5px;
  color: #4f555c;
}

.goal-assignment-layout {
  display: grid;
  gap: 12px;
}

.goal-assignment-form {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 0.8fr) auto;
  gap: 10px;
  align-items: end;
}

.goal-edit-form,
.goal-savings-assignment-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.goal-assignment-form label,
.goal-edit-form label,
.goal-savings-assignment-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.goal-assignment-form select,
.goal-assignment-form input,
.goal-edit-form select,
.goal-edit-form input,
.goal-savings-assignment-form select,
.goal-savings-assignment-form input {
  min-height: 38px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  font-weight: 400;
}

.planner-settings-form {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.planner-assignment-form,
.goal-savings-assignment-form.planner-assignment-form {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.85fr) minmax(0, 0.8fr) auto;
}

.assignment-list {
  display: grid;
  gap: 8px;
}

.assignment-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.assignment-row strong {
  font-weight: 400;
}

.goal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: #3d4248;
  font-size: 0.86rem;
}

.budget-row {
  grid-template-columns: 1fr 80px;
  align-items: center;
}

.budget-row .bar-track {
  grid-column: 1 / -1;
  margin-top: 0;
}

.month-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.month-strip button,
.time-grid button,
.schedule-static-control {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.schedule-static-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: var(--muted);
}

.schedule-static-action {
  color: var(--ink);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-day {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
}

.calendar-day.active {
  border-color: var(--ember);
  background: var(--ember-soft);
  color: var(--ink);
  font-weight: 900;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

textarea {
  width: 100%;
  min-height: 190px;
  padding: 14px;
  resize: vertical;
}

.profile-form {
  display: grid;
  gap: 16px;
}

.profile-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.profile-security-section {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff 0%, #fbfaf7 100%);
  padding: 16px;
}

.profile-security-section h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 500;
}

.profile-security-section .panel-copy {
  margin: 0;
}

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

.profile-security-item {
  display: grid;
  gap: 5px;
  min-height: 96px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.profile-security-signin-email {
  grid-column: 1 / -1;
  min-height: auto;
}

.profile-security-item span {
  color: var(--muted);
  font-size: 0.76rem;
}

.profile-security-item strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.25;
}

.profile-security-item small {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.profile-security-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-section-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.profile-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-photo-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(20, 121, 91, 0.12);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.profile-photo-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: rgba(237, 248, 244, 0.82);
  color: var(--green);
  font-size: 0.92rem;
  font-weight: 500;
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform-origin: center;
}

.profile-photo-card span {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
}

.profile-photo-card small {
  display: block;
  margin-top: 3px;
}

.profile-photo-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.profile-photo-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
}

.photo-focus-controls {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 4px;
}

.photo-focus-controls[hidden] {
  display: none;
}

.photo-focus-controls span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.photo-focus-controls div {
  display: grid;
  gap: 2px;
}

.photo-focus-controls small {
  margin: 0;
}

.photo-focus-controls label {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.photo-focus-controls input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.spouse-relationship-toggle {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 4px;
}

.spouse-relationship-toggle button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
}

.spouse-relationship-toggle button.active {
  background: var(--charcoal);
  color: #fff;
}

.profile-delete-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(184, 38, 43, 0.18);
  border-radius: var(--radius);
  background: #fff;
  color: var(--red);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
}

.profile-delete-button:hover,
.profile-delete-button.pending {
  border-color: rgba(184, 38, 43, 0.36);
  background: #fff1ef;
}

.profile-delete-confirm {
  color: var(--red);
  font-size: 0.78rem;
}

.profile-grid,
.kid-grid,
.address-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.profile-grid label,
.kid-grid label,
.address-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}

.profile-field-note {
  margin-top: -2px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.profile-label-line {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-label-stack {
  display: grid;
  gap: 2px;
}

.profile-label-line .profile-field-note {
  margin-top: 0;
  font-size: 0.72rem;
}

.profile-field-note-spacer {
  order: -1;
  visibility: hidden;
}

.profile-contact-email-field {
  grid-column: auto;
}

.profile-grid input,
.kid-grid input,
.address-grid input {
  min-height: 42px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 400;
}

.address-timezone-card {
  align-self: end;
  display: grid;
  min-height: 42px;
  box-sizing: border-box;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background: #edf8f4;
}

.address-timezone-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.address-timezone-card strong {
  color: var(--green);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.15;
}

.address-timezone-card small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.dob-age-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 94px;
  gap: 8px;
}

.age-output {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background: #edf8f4;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 400;
}

#profile .eyebrow,
#profile small,
#profile label,
#profile input {
  font-weight: 400;
}

.kids-list {
  display: grid;
  gap: 12px;
}

.kid-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
}

.kid-card.delete-pending {
  border-color: rgba(184, 38, 43, 0.24);
  background: #fffafa;
}

.kid-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kid-card-header span {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
}

.add-row-button {
  min-height: 44px;
  border: 1px dashed rgba(200, 41, 30, 0.42);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ember);
  font-weight: 400;
  text-align: left;
  padding: 0 14px;
}

.profile-section-actions {
  display: flex;
  justify-content: flex-end;
}

.risk-tolerance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(221, 75, 47, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, #fff8f4 100%);
}

.risk-tolerance-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.risk-tolerance-row span,
.risk-tolerance-row small {
  display: block;
}

.risk-tolerance-row span {
  color: var(--ink);
  font-size: 0.9rem;
}

.risk-tolerance-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.risk-task-status {
  color: var(--green) !important;
}

.risk-tolerance-actions .risk-task-sent {
  border-color: rgba(20, 121, 91, 0.22);
  background: #edf8f4;
  color: var(--green);
  cursor: default;
  opacity: 1;
}

.advisor-access-section {
  border-color: rgba(247, 201, 72, 0.55);
  background:
    linear-gradient(135deg, rgba(247, 201, 72, 0.2), rgba(255, 255, 255, 0.92) 58%),
    #fffdf4;
  box-shadow: 0 12px 34px rgba(122, 83, 8, 0.08);
}

.advisor-access-section .eyebrow {
  color: #7b5a06;
}

.advisor-access-section .panel-copy {
  max-width: 460px;
  margin-top: 4px;
  color: #6f5b22;
}

.advisor-only-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(247, 201, 72, 0.62);
  border-radius: 999px;
  background: rgba(255, 248, 220, 0.9);
  color: #6e5209;
  font-size: 0.76rem;
}

.access-list {
  display: grid;
  gap: 10px;
}

.access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.7fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
}

.advisor-access-row {
  border-color: rgba(247, 201, 72, 0.42);
  background: rgba(255, 255, 255, 0.86);
}

.access-row span,
.access-row small {
  display: block;
}

.access-row span {
  font-size: 0.9rem;
}

.access-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.access-invite-status {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 7px;
  padding: 3px 8px;
  border: 1px solid rgba(191, 183, 170, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #6f6a61;
}

.access-invite-status.sent {
  border-color: rgba(34, 139, 105, 0.24);
  background: rgba(231, 247, 241, 0.78);
  color: var(--green);
}

.access-invite-status.pending {
  border-color: rgba(247, 201, 72, 0.44);
  background: rgba(255, 248, 220, 0.78);
  color: #80620f;
}

.access-invite-status.failed {
  border-color: rgba(219, 83, 68, 0.28);
  background: rgba(255, 241, 239, 0.82);
  color: #b42318;
}

.access-manage-menu {
  position: relative;
  justify-self: end;
}

.access-manage-menu[open] {
  z-index: 70;
}

.access-manage-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(122, 83, 8, 0.24);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 0.86rem;
  list-style: none;
  cursor: pointer;
}

.access-manage-menu summary::-webkit-details-marker {
  display: none;
}

.access-menu-panel {
  position: absolute;
  top: auto;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 80;
  display: grid;
  gap: 2px;
  min-width: 224px;
  max-height: min(320px, calc(100vh - 160px));
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  transform-origin: bottom right;
}

.access-menu-panel button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 0.84rem;
  text-align: left;
  padding: 0 9px;
}

.access-menu-panel button:hover {
  background: #fff8dc;
}

.access-menu-divider {
  display: block;
  height: 1px;
  margin: 3px 0;
  background: var(--line);
}

.access-menu-panel button.danger {
  color: #b42318;
}

.access-menu-panel button.danger:hover {
  background: #fff1ef;
}

.access-menu-panel button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.access-menu-panel button:disabled:hover {
  background: #fff;
}

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

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.profile-card-save-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 999px;
  background: #fbfaf7;
  color: var(--muted);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.profile-card-save-status.dirty {
  border-color: rgba(247, 201, 72, 0.34);
  background: #fffaf0;
  color: #8a5a00;
}

.profile-card-save-status.saving {
  border-color: rgba(161, 90, 0, 0.22);
  background: #fff7e6;
  color: #a15a00;
}

.profile-card-save-status.saved {
  border-color: rgba(20, 121, 91, 0.2);
  background: #edf8f4;
  color: var(--green);
}

.profile-section > .profile-card-save-status {
  justify-self: end;
  margin-top: -6px;
}

.profile-photo-card > .profile-card-save-status {
  grid-column: 2 / -1;
  justify-self: start;
  min-height: 0;
  margin-top: -10px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--green);
  font-size: 0.76rem;
  line-height: 1.3;
}

.profile-photo-card > .profile-card-save-status.dirty,
.profile-photo-card > .profile-card-save-status.saving,
.profile-photo-card > .profile-card-save-status.saved {
  border: 0;
  background: transparent;
}

.profile-photo-card > .profile-card-save-status.dirty {
  color: #8a5a00;
}

.profile-photo-card > .profile-card-save-status.saving {
  color: #a15a00;
}

.risk-tolerance-row .profile-card-save-status {
  grid-column: 1 / -1;
  justify-self: start;
}

.note-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.timeline-item {
  grid-template-columns: 110px 1fr;
}

.chat-window {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: #f5f1ea;
}

.overview-chat-window {
  flex: 1;
  min-height: 260px;
  max-height: 420px;
  margin-top: 10px;
  background:
    linear-gradient(135deg, rgba(35, 32, 29, 0.035), rgba(255, 255, 255, 0.96) 60%),
    #fbfaf7;
}

.overview-assistant-panel {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  background: #fff;
}

.overview-chat-history-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(26, 22, 18, 0.05);
}

.overview-chat-history-button:hover {
  border-color: rgba(35, 32, 29, 0.22);
  background: #fbfaf7;
}

.overview-chat-history-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.overview-chat-history-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
}

.overview-chat-history-panel div {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid rgba(35, 32, 29, 0.06);
  border-radius: var(--radius);
  background: #fff;
}

.overview-chat-history-panel span {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 500;
}

.overview-chat-history-panel small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.vault-layout-single {
  grid-template-columns: minmax(0, 1fr);
}

.vault-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.vault-summary-card {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 15px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(26, 22, 18, 0.04);
}

.vault-summary-primary {
  background: linear-gradient(135deg, #fff7ed 0%, #fff 68%);
}

.vault-summary-latest {
  grid-column: span 2;
  background: linear-gradient(135deg, #f6faf8 0%, #fff 68%);
}

.vault-summary-card span {
  color: #4f555c;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.vault-summary-card strong {
  align-self: end;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 400;
}

.vault-summary-card small {
  color: var(--muted);
  font-size: 0.78rem;
}

.vault-summary-latest strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-browser-panel {
  padding: 0;
  overflow: hidden;
}

.vault-browser-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #fbfaf7 100%);
}

.vault-browser-heading h2,
.vault-document-heading h2 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 400;
}

.folder-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 14px 18px 0;
}

.folder-create-row input {
  min-height: 42px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
}

.vault-folder-grid {
  display: grid;
  gap: 6px;
}

.vault-main-files-button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 54px;
  margin-bottom: 4px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  box-shadow: 0 8px 18px rgba(26, 22, 18, 0.03);
}

.vault-main-files-button:hover,
.vault-main-files-button.active,
.vault-main-files-button.drag-over {
  border-color: rgba(20, 121, 91, 0.28);
  background: #edf8f4;
}

.vault-main-files-button span,
.vault-main-files-button small {
  display: block;
}

.vault-main-files-button span {
  font-size: 0.9rem;
}

.vault-main-files-button small {
  color: var(--muted);
  font-size: 0.74rem;
}

.vault-root-drop {
  display: grid;
  gap: 3px;
  min-height: 52px;
  margin-bottom: 4px;
  border: 1px dashed rgba(35, 32, 29, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  padding: 9px 10px;
}

.vault-root-drop span,
.vault-root-drop small {
  display: block;
}

.vault-root-drop span {
  font-size: 0.84rem;
}

.vault-root-drop small {
  color: #4f555c;
  font-size: 0.72rem;
  line-height: 1.35;
}

.vault-root-drop.drag-over {
  border-color: rgba(20, 121, 91, 0.46);
  background: #edf8f4;
}

.vault-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 0;
  min-height: 560px;
}

.vault-folder-panel {
  padding: 14px;
  border-right: 1px solid var(--line);
  background: #f7f4ee;
}

.vault-document-panel {
  min-width: 0;
  padding: 18px;
  background: #fff;
}

.vault-document-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

#vault-folder-meta {
  min-height: 24px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 999px;
  background: #f7f4ee;
  color: #4f555c;
  padding: 4px 9px;
  font-size: 0.74rem;
}

.vault-folder-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px 0 var(--indent, 12px);
  text-align: left;
  box-shadow: 0 8px 18px rgba(26, 22, 18, 0.03);
  cursor: grab;
}

.vault-folder-row:hover,
.vault-folder-row.active,
.vault-folder-row.drag-over {
  border-color: rgba(247, 201, 72, 0.42);
  background: #fffaf0;
}

.vault-folder-row.delete-pending {
  border-color: rgba(184, 38, 43, 0.22);
  background: #fffafa;
}

.vault-folder-row.active {
  border-color: rgba(35, 32, 29, 0.16);
  background: #fff;
  box-shadow: 0 10px 22px rgba(26, 22, 18, 0.05);
}

.vault-folder-row.dragging {
  opacity: 0.48;
}

.vault-folder-row.child-folder {
  background: #fefdfb;
}

.vault-folder-row span,
.vault-folder-row small {
  display: block;
}

.vault-folder-row span {
  color: var(--ink);
}

.vault-folder-select {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
}

.vault-folder-row .folder-toggle-icon {
  display: inline-grid;
  place-items: center;
  place-content: center;
  align-self: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 6px;
  background: #fff;
  color: #4f555c;
  font-size: 0.78rem;
  line-height: 1;
  padding: 0;
  text-align: center;
}

.folder-toggle-icon.empty {
  border-color: transparent;
  background: transparent;
  color: transparent;
}

.vault-folder-name {
  display: flex;
  gap: 0;
  align-items: center;
  min-width: 0;
}

.folder-marker {
  flex: 0 0 0;
  width: 0;
  height: 0;
}

.vault-folder-row small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.vault-folder-count {
  text-align: right;
}

.vault-folder-delete {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(184, 38, 43, 0.14);
  border-radius: 999px;
  background: #fff;
  color: var(--red);
  font-size: 0.78rem;
  line-height: 1;
}

.vault-folder-delete:hover,
.vault-folder-delete.pending {
  border-color: rgba(184, 38, 43, 0.34);
  background: #fff1ef;
}

.vault-folder-delete-confirm {
  grid-column: 1 / -1;
  color: var(--red);
  font-size: 0.75rem;
}

.document-table {
  display: grid;
  gap: 8px;
}

.document-table .doc-row {
  grid-template-columns: minmax(0, 1fr) 120px auto;
  gap: 12px;
  min-height: 62px;
  border-color: rgba(35, 32, 29, 0.08);
  box-shadow: 0 8px 18px rgba(26, 22, 18, 0.03);
}

.document-table .doc-row.delete-pending {
  border-color: rgba(184, 38, 43, 0.2);
  background: #fffaf8;
}

.doc-file-cell {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.doc-file-cell strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-type-badge {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  min-height: 34px;
  border-radius: 7px;
  background: #23201d;
  color: #fff;
  font-size: 0.66rem;
  font-style: normal;
}

.doc-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.vault-document-delete {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(184, 38, 43, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--red);
  font-size: 0.78rem;
  line-height: 1;
}

.vault-document-delete:hover,
.vault-document-delete.pending {
  border-color: rgba(184, 38, 43, 0.34);
  background: #fff1ef;
}

.doc-delete-confirm {
  flex-basis: 100%;
  color: var(--red);
  font-size: 0.72rem;
  text-align: right;
}

.doc-row[draggable="true"] {
  cursor: grab;
}

.doc-row[draggable="true"]:active {
  cursor: grabbing;
}

.chat-message {
  max-width: 78%;
  padding: 12px;
  border-radius: var(--radius);
  background: #fff;
}

.chat-message p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.chat-message.user {
  justify-self: end;
  background: var(--charcoal);
  color: #fff;
}

.chat-message.user p {
  color: rgba(255, 255, 255, 0.74);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 14px;
}

.chat-form input {
  min-width: 0;
  height: 44px;
  padding: 0 14px;
}

.control-list label {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 38px;
}

.control-list input {
  accent-color: var(--ember);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(21, 21, 21, 0.42);
}

.feedback-modal {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 26px 80px rgba(12, 10, 8, 0.24);
  padding: 20px;
}

.terms-acceptance-modal {
  width: min(640px, 100%);
}

.terms-acceptance-body {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
  color: var(--muted);
  line-height: 1.45;
}

.terms-acceptance-body p {
  margin: 0;
}

.terms-acceptance-body a {
  justify-self: start;
  color: var(--green);
  font-weight: 560;
  text-decoration: none;
}

.terms-acceptance-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  background: #f7fcfa;
  color: var(--ink);
}

.terms-acceptance-check input {
  margin-top: 2px;
  accent-color: var(--green);
}

.terms-acceptance-status {
  margin: -2px 0 0;
  color: var(--green);
  font-size: 0.88rem;
}

.terms-acceptance-status.has-error {
  color: var(--red);
}

.household-lifecycle-modal-backdrop {
  z-index: 120;
}

.household-lifecycle-modal {
  width: min(620px, 100%);
  display: grid;
  gap: 14px;
}

.household-lifecycle-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.household-lifecycle-header h2 {
  margin: 4px 0 6px;
  font-size: 1.15rem;
  font-weight: 760;
}

.household-lifecycle-header p {
  margin: 0;
  color: #61656c;
  font-size: 0.9rem;
  line-height: 1.45;
}

.household-lifecycle-subject {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(244, 251, 248, 0.98), rgba(255, 255, 255, 0.94)),
    #fff;
}

.household-lifecycle-subject span,
.household-lifecycle-confirm-code span,
.household-lifecycle-confirm-code small {
  display: block;
  color: #6b7078;
  font-size: 0.78rem;
  line-height: 1.35;
}

.household-lifecycle-subject strong {
  display: block;
  margin-top: 3px;
  font-size: 0.98rem;
  font-weight: 620;
}

.household-lifecycle-warning {
  padding: 12px 14px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background: rgba(244, 251, 248, 0.9);
  color: #295f4f;
  font-size: 0.88rem;
  line-height: 1.45;
}

.household-lifecycle-warning.danger {
  border-color: rgba(184, 38, 43, 0.22);
  background: linear-gradient(135deg, rgba(255, 246, 244, 0.98), rgba(255, 255, 255, 0.94));
  color: #8d2019;
}

.household-lifecycle-confirm-code {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid rgba(184, 38, 43, 0.18);
  border-radius: var(--radius);
  background: #fff;
}

.household-lifecycle-confirm-code strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 620;
}

.household-lifecycle-confirm-code input {
  min-height: 42px;
  width: 100%;
  border: 1px solid rgba(35, 32, 29, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  padding: 0 12px;
}

.household-lifecycle-confirm-code input:focus {
  border-color: rgba(184, 38, 43, 0.46);
  box-shadow: 0 0 0 3px rgba(184, 38, 43, 0.08);
  outline: none;
}

.household-lifecycle-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(184, 38, 43, 0.22);
  border-radius: 8px;
  background: #fff4f1;
  color: #9f2419;
  font-size: 0.86rem;
  line-height: 1.4;
}

.household-lifecycle-actions {
  justify-content: flex-end;
  gap: 10px;
}

.household-lifecycle-confirm-button.danger {
  border-color: #b42318;
  background: #b42318;
  color: #fff;
}

.household-lifecycle-confirm-button.danger:not(:disabled):hover {
  background: #8f1c14;
}

.goal-picker-modal {
  width: min(960px, 100%);
  max-height: min(780px, calc(100vh - 40px));
  overflow: auto;
}

.goal-picker-modal .panel-header {
  align-items: flex-start;
}

.goal-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.goal-picker-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 116px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 246, 241, 0.7)),
    #fff;
  color: var(--ink);
  padding: 14px;
  text-align: left;
  box-shadow: 0 10px 26px rgba(26, 22, 18, 0.05);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease,
    background 0.16s ease;
}

.goal-picker-card:hover,
.goal-picker-card:focus-visible {
  border-color: rgba(20, 121, 91, 0.28);
  background:
    linear-gradient(135deg, rgba(244, 251, 248, 0.96), rgba(255, 255, 255, 0.92)),
    #fff;
  box-shadow: 0 16px 38px rgba(26, 22, 18, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.goal-picker-card strong {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
}

.goal-picker-card small {
  display: block;
  margin-top: 6px;
  color: #535960;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.45;
}

.goal-picker-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 8px;
  background: #f4fbf8;
  color: var(--green);
}

.goal-picker-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.goal-picker-icon.income,
.goal-picker-icon.education {
  border-color: rgba(25, 118, 167, 0.16);
  background: #f0f8fc;
  color: #1976a7;
}

.goal-picker-icon.child {
  border-color: rgba(15, 127, 159, 0.16);
  background: #eef9fb;
  color: #0f7f9f;
}

.goal-picker-icon.home,
.goal-picker-icon.auto {
  border-color: rgba(183, 121, 27, 0.18);
  background: #fff8eb;
  color: #9a681b;
}

.goal-picker-icon.debt {
  border-color: rgba(191, 63, 47, 0.16);
  background: #fff4f1;
  color: #bf3f2f;
}

.goal-picker-icon.other {
  border-color: rgba(103, 88, 184, 0.16);
  background: #f6f3ff;
  color: #6758b8;
}

.inactivity-logout-card {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 26px 80px rgba(12, 10, 8, 0.24);
  padding: 24px;
}

.inactivity-logout-card h2 {
  margin: 8px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  font-weight: 400;
  line-height: 1.05;
}

.inactivity-logout-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.inactivity-logout-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.inactivity-logout-actions button {
  min-height: 42px;
}

.feedback-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.feedback-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  color: var(--ink);
  font-weight: 500;
}

#feedback-modal .feedback-form label,
#feedback-modal .feedback-form input,
#feedback-modal .feedback-form select,
#feedback-modal .feedback-form textarea,
#feedback-modal .feedback-form input::placeholder,
#feedback-modal .feedback-form textarea::placeholder {
  font-weight: 400;
}

#feedback-modal .note-actions .primary-button,
#feedback-modal .note-actions .secondary-button {
  font-weight: 500;
}

.feedback-form input:not([type="radio"]):not([type="checkbox"]) {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 0 12px;
  font: inherit;
}

.password-reset-form input[name="resetEmail"] {
  font-weight: 400;
}

.feedback-form small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.4;
}

.form-error {
  margin: 0;
  color: #c62828;
  font-size: 0.86rem;
  line-height: 1.45;
}

.payoff-term-modal {
  width: min(520px, 100%);
}

.payoff-term-modal .panel-header h2 {
  font-size: 1.08rem;
  font-weight: 500;
}

.payoff-term-modal .panel-copy,
.payoff-term-modal .eyebrow {
  font-weight: 400;
}

.payoff-term-form label {
  color: #4f555c;
  font-size: 0.84rem;
  font-weight: 400;
}

.payoff-term-form input {
  font-size: 1rem;
  font-weight: 400;
}

.payoff-term-form small {
  font-weight: 400;
}

.client-invite-modal {
  width: min(720px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 16px;
}

.client-invite-modal .panel-header {
  align-items: start;
  margin-bottom: 10px;
}

.client-invite-modal .panel-header h2 {
  font-size: 1.05rem;
}

.client-invite-modal .panel-copy {
  max-width: 560px;
  margin-top: 3px;
  font-size: 0.92rem;
  line-height: 1.35;
}

.client-invite-modal .note-actions {
  position: sticky;
  bottom: -16px;
  z-index: 2;
  margin: 2px -16px -16px;
  padding: 10px 16px 8px;
  border-top: 1px solid rgba(224, 218, 208, 0.8);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), #fff 34%);
}

.client-referral-modal,
.advisor-referral-modal,
.flames-guidance-modal,
.promotion-share-modal,
.roadmap-modal,
.security-action-modal,
.mfa-setup-modal {
  width: min(680px, 100%);
}

.flames-guidance-modal {
  width: min(1080px, 100%);
}

.flames-guidance-body {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.flames-guidance-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.08), rgba(255, 255, 255, 0.98) 62%),
    #fff;
}

.flames-guidance-hero h3,
.flames-guidance-hero p {
  margin: 0;
}

.flames-guidance-hero h3 {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 600;
}

.flames-guidance-hero p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.flames-guidance-proof-grid {
  display: grid;
  gap: 8px;
}

.flames-guidance-proof-grid span {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 0.88rem;
}

.flames-guidance-proof-grid span::before,
.flames-membership-card li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 999px;
  background: var(--green);
  flex: 0 0 auto;
}

.flames-membership-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.flames-membership-card {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 246, 240, 0.72)),
    #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.flames-membership-card:hover,
.flames-membership-card:focus-visible {
  border-color: rgba(20, 121, 91, 0.34);
  box-shadow: 0 18px 34px rgba(31, 25, 19, 0.08);
}

.flames-membership-card:focus-visible {
  outline: 3px solid rgba(20, 121, 91, 0.14);
  outline-offset: 2px;
}

.flames-membership-card.is-selected {
  border-color: var(--green-line);
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.1), rgba(255, 255, 255, 0.96) 72%),
    #fff;
  box-shadow: inset 4px 0 0 var(--green), 0 18px 34px rgba(20, 121, 91, 0.08);
}

.flames-membership-card span {
  color: #9d8368;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.flames-membership-card strong {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 600;
}

.flames-membership-card em {
  color: var(--ink);
  font-size: 1.02rem;
  font-style: normal;
}

.flames-membership-card small {
  color: var(--muted);
  line-height: 1.35;
}

.flames-membership-card ul {
  display: grid;
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.flames-membership-card li {
  display: flex;
  align-items: flex-start;
  color: #3f443f;
  font-size: 0.86rem;
  line-height: 1.35;
}

.flames-membership-card li::before {
  margin-top: 5px;
}

.flames-membership-detail {
  padding: 16px;
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(239, 250, 247, 0.95), rgba(255, 255, 255, 0.98)),
    #fff;
}

.flames-membership-detail span,
.flames-membership-detail strong,
.flames-membership-detail p {
  display: block;
  margin: 0;
}

.flames-membership-detail span {
  color: var(--muted);
  font-size: 0.78rem;
}

.flames-membership-detail strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 600;
}

.flames-membership-detail p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.flames-guidance-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.flames-guidance-schedule-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 920px) {
  .flames-guidance-hero,
  .flames-membership-grid {
    grid-template-columns: 1fr;
  }

  .flames-guidance-actions {
    flex-direction: column-reverse;
  }

  .flames-guidance-actions .primary-button,
  .flames-guidance-actions .secondary-button {
    width: 100%;
  }
}

.promotion-share-modal {
  width: min(720px, 100%);
}

.promotion-share-body {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.promotion-share-resource {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 112, 31, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 112, 31, 0.08), rgba(255, 255, 255, 0.96) 72%),
    #fff;
  padding: 14px;
}

.promotion-share-resource h3,
.promotion-share-resource p {
  margin: 0;
}

.promotion-share-resource h3 {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 500;
}

.promotion-share-resource p:not(.eyebrow) {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.promotion-share-message-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 400;
}

.promotion-share-message-field textarea {
  width: 100%;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
  color: var(--ink);
  padding: 14px;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.55;
  resize: vertical;
}

.promotion-share-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.mfa-setup-backdrop {
  z-index: 80;
}

.mfa-setup-body {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.mfa-qr-card {
  display: grid;
  place-items: center;
  justify-self: start;
  width: 196px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}

.mfa-qr-card img {
  display: block;
  width: 100%;
  height: 100%;
}

.mfa-secret-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
}

.mfa-secret-card span,
.mfa-phone-field,
.mfa-code-field,
.mfa-remember-device {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 400;
}

.mfa-secret-card code {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.92rem;
}

.mfa-code-field {
  display: grid;
  gap: 8px;
}

.mfa-phone-field {
  display: grid;
  gap: 8px;
}

.mfa-phone-field input {
  min-height: 46px;
  width: min(320px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  padding: 0 12px;
}

.mfa-code-field input {
  min-height: 46px;
  width: min(220px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  padding: 0 12px;
}

.mfa-field-help {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.mfa-sms-destination {
  display: grid;
  gap: 5px;
  justify-self: start;
  padding: 12px 14px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background: #edf8f4;
}

.mfa-sms-destination span {
  color: var(--muted);
  font-size: 0.76rem;
}

.mfa-sms-destination strong {
  color: var(--green);
  font-weight: 500;
}

.mfa-remember-device {
  display: flex;
  gap: 9px;
  align-items: center;
}

.mfa-remember-device input {
  accent-color: var(--green);
}

.mfa-setup-status {
  margin: 12px 0 0;
  color: var(--green);
  font-size: 0.88rem;
  line-height: 1.45;
}

.mfa-setup-status.error {
  color: var(--red);
}

.mfa-setup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.folder-delete-modal {
  width: min(640px, 100%);
}

.photo-adjust-modal {
  width: min(720px, 100%);
}

.photo-adjust-body {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 18px;
}

.photo-adjust-frame {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: min(380px, 76vw);
  aspect-ratio: 1;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: #f7f5ef;
  box-shadow: 0 22px 60px rgba(26, 22, 18, 0.16);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.photo-adjust-frame.dragging {
  cursor: grabbing;
}

.photo-adjust-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transform-origin: center;
  will-change: transform;
  user-select: none;
}

.photo-adjust-actions {
  grid-template-columns: repeat(3, minmax(0, auto));
}

.security-action-body {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.security-action-form {
  display: grid;
  gap: 12px;
}

.security-action-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 400;
}

.security-action-form input {
  min-height: 44px;
  min-width: 0;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 400;
}

.security-action-error {
  color: var(--red);
  font-size: 0.84rem;
  line-height: 1.4;
}

.security-action-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.folder-delete-body {
  display: grid;
  gap: 14px;
}

.folder-delete-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.folder-delete-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.folder-delete-options .danger-button {
  border-color: rgba(184, 38, 43, 0.24);
  background: #fff1ef;
  color: var(--red);
}

.security-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
  padding: 12px;
}

.security-action-row strong,
.security-action-row span {
  display: block;
}

.security-action-row strong {
  color: var(--ink);
  font-weight: 500;
}

.security-action-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.client-referral-form label,
.advisor-referral-form label {
  font-weight: 400;
}

.roadmap-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.roadmap-list article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fffaf0 0%, #fff 76%);
}

.roadmap-list span {
  color: #986d0e;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.roadmap-list strong {
  color: var(--ink);
  font-weight: 500;
}

.roadmap-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.client-invite-form label {
  font-weight: 400;
}

.client-invite-form {
  gap: 10px;
}

.client-invite-mode-grid,
.client-invite-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.client-invite-grid[hidden] {
  display: none;
}

.client-invite-mode-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
  min-height: 72px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 400;
}

.client-invite-mode-card:has(input:checked) {
  border-color: rgba(200, 41, 30, 0.26);
  background: linear-gradient(135deg, #fff8ed, #fff);
}

.client-invite-mode-card strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-weight: 500;
}

.client-invite-status-card {
  margin: 0;
  padding: 9px 12px 12px;
  border: 1px solid rgba(13, 133, 107, 0.18);
  border-radius: var(--radius);
  background: #fff;
}

.client-invite-status-card legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.client-invite-status-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.client-invite-status-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}

.client-invite-status-option:has(input:checked) {
  border-color: rgba(13, 133, 107, 0.26);
  background: linear-gradient(135deg, rgba(237, 250, 246, 0.94), #fff);
}

.client-invite-status-option strong {
  display: block;
  margin-bottom: 1px;
  color: var(--ink);
  font-weight: 500;
}

.client-invite-status-option small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.client-invite-advisor-card {
  margin: 0;
  padding: 9px 12px 12px;
  border: 1px solid rgba(13, 133, 107, 0.18);
  border-radius: var(--radius);
  background: #fff;
}

.client-invite-advisor-card[hidden] {
  display: none;
}

.client-invite-advisor-card legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.client-invite-advisor-card label {
  display: grid;
  gap: 5px;
}

.client-invite-advisor-card select {
  width: 100%;
}

.client-invite-advisor-card small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.client-invite-routing-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(13, 133, 107, 0.2);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(239, 250, 247, 0.94), #fff);
}

.client-invite-routing-card.is-warning {
  border-color: rgba(190, 91, 25, 0.3);
  background: linear-gradient(135deg, rgba(255, 248, 237, 0.96), #fff);
}

.client-invite-routing-card span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.client-invite-routing-card strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
}

.client-invite-routing-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.28;
}

.client-invite-mode-card small,
.client-invite-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.client-invite-prefill-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(13, 133, 107, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(235, 250, 246, 0.96), #fff);
}

.client-invite-prefill-preview[hidden] {
  display: none;
}

.client-invite-prefill-preview span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.client-invite-prefill-preview strong {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 500;
}

.client-invite-prefill-preview small {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border: 1px solid rgba(13, 133, 107, 0.2);
  border-radius: 999px;
  background: #fff;
  color: #68707a;
  font-size: 0.78rem;
}

.client-invite-prefill-preview b {
  color: #08745f;
  font-weight: 500;
}

.advisor-public-signup-card {
  display: grid;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(13, 133, 107, 0.2);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(239, 250, 247, 0.92), #fff);
}

.advisor-public-signup-card[hidden] {
  display: none;
}

.advisor-public-signup-card span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.advisor-public-signup-card strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
}

.advisor-public-signup-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.advisor-public-signup-card .advisor-public-signup-routing {
  color: #08745f;
  font-weight: 500;
}

.advisor-public-signup-card.is-warning .advisor-public-signup-routing {
  color: #9a4a13;
}

.advisor-public-signup-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.advisor-public-signup-copy input {
  min-width: 0;
  color: #51606c;
  background: rgba(255, 255, 255, 0.82);
}

.client-invite-preview-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  margin-right: auto;
  color: #0d856b;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.client-invite-preview-link:hover,
.client-invite-preview-link:focus-visible {
  color: #086953;
  text-decoration: underline;
}

.client-invite-email {
  grid-column: 1 / -1;
}

.risk-modal {
  width: min(680px, 100%);
}

.risk-form {
  max-height: min(72vh, 720px);
  overflow: auto;
  padding-right: 4px;
}

.risk-form-intro {
  margin: 0;
  color: #4f555c;
  font-size: 0.88rem;
  line-height: 1.5;
}

.risk-question {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
}

.risk-question > span {
  color: var(--ink);
  font-size: 0.9rem;
}

.risk-question label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #4f555c;
  font-size: 0.84rem;
  font-weight: 400;
}

.risk-question input {
  accent-color: var(--ember);
}

.risk-history-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.risk-history-list article {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #faf8f5;
}

.risk-history-list strong,
.risk-history-list span,
.risk-history-list small {
  font-size: 0.82rem;
}

.risk-history-list span,
.risk-history-list small {
  color: var(--muted);
}

.risk-advisor-notes {
  font-weight: 400;
}

.risk-advisor-notes select,
.risk-advisor-notes textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.risk-advisor-notes select {
  min-height: 42px;
  padding: 0 12px;
}

.risk-advisor-notes textarea {
  min-height: 88px;
  padding: 12px;
  resize: vertical;
}

.platform-console {
  display: grid;
  gap: 16px;
}

.platform-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.platform-metric-card {
  min-height: 132px;
}

.platform-billing-mix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.platform-billing-mix div {
  display: grid;
  align-content: center;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.platform-billing-mix strong {
  margin: 0 0 5px;
  font-size: 1.18rem;
  font-weight: 500;
}

.platform-billing-mix span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

.data-dashboard {
  display: grid;
  gap: 16px;
}

.data-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.data-metric-card {
  min-height: 126px;
  background: #fff;
}

.data-metric-card.green {
  border-color: rgba(20, 121, 91, 0.22);
  box-shadow: 0 18px 44px rgba(20, 121, 91, 0.08);
}

.data-metric-card.gold {
  border-color: rgba(247, 201, 72, 0.36);
  box-shadow: 0 18px 44px rgba(247, 201, 72, 0.08);
}

.data-metric-card.red {
  border-color: rgba(184, 38, 43, 0.22);
  box-shadow: 0 18px 44px rgba(184, 38, 43, 0.08);
}

.data-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.data-card {
  display: grid;
  gap: 16px;
  background: #fff;
}

.data-quality-list,
.data-event-list,
.data-source-grid,
.data-boundary-grid {
  display: grid;
  gap: 10px;
}

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

.data-quality-row,
.data-source-card,
.data-event-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.data-quality-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
}

.data-quality-row h3,
.data-source-card h3,
.data-event-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
}

.data-quality-row p,
.data-source-card p,
.data-event-card p,
.data-governance-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.data-pill,
.data-source-card span,
.data-event-card > span,
.data-event-card time {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 28px;
  border-radius: 999px;
  background: #f4f1ec;
  color: var(--ink);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 400;
  white-space: nowrap;
}

.data-source-card {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.data-event-card {
  display: grid;
  grid-template-columns: minmax(120px, 0.28fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.data-governance-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
  gap: 16px;
  align-items: center;
  background: #fff;
}

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

.data-boundary-grid span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
  color: var(--ink);
  padding: 12px;
  font-size: 0.88rem;
}

.firm-intelligence-dashboard .data-metric-card {
  min-height: 138px;
}

.firm-intelligence-dashboard .data-metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.firm-data-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.firm-data-mini-select {
  width: auto;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 34px 0 12px;
  background-color: #fff;
  color: var(--ink);
  font-size: 0.82rem;
}

.firm-data-overview-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.firm-intelligence-dashboard .firm-data-secondary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.firm-data-compact-card {
  align-content: start;
  min-height: 138px;
}

.firm-data-compact-card small {
  margin-top: 2px;
  color: var(--muted);
}

.firm-data-structure,
.firm-data-rank-list,
.firm-data-task-grid {
  display: grid;
  gap: 10px;
}

.firm-data-bar-row {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.firm-data-bar-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.firm-data-bar-row strong,
.firm-data-task-grid h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
}

.firm-data-bar-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.firm-data-bar-track {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee8df;
}

.firm-data-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(20, 121, 91, 0.74), rgba(20, 121, 91, 0.42));
}

.firm-data-bar-row.single .firm-data-bar-track span {
  background: linear-gradient(90deg, rgba(247, 201, 72, 0.72), rgba(247, 201, 72, 0.38));
}

.firm-data-streak-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  align-content: center;
  border: 1px solid rgba(184, 38, 43, 0.2);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 245, 242, 0.9), #fff);
  padding: 18px;
}

.firm-data-streak-card span,
.firm-data-rank-row p {
  color: var(--muted);
  font-size: 0.84rem;
}

.firm-data-streak-card strong {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 500;
}

.firm-data-streak-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.firm-data-rank-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.firm-data-rank-row > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f4f1ec;
  color: var(--ink);
  font-size: 0.82rem;
}

.firm-data-rank-row h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.firm-data-rank-row p {
  margin: 3px 0 0;
}

.firm-data-rank-row strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
}

.firm-data-task-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.data-empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 16px;
}

.platform-data-table {
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
}

.platform-data-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) repeat(5, minmax(110px, 0.45fr));
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  color: var(--ink);
  font-size: 0.88rem;
}

.platform-data-row.header {
  position: sticky;
  top: 0;
  z-index: 1;
  border-style: dashed;
  background: #fbfaf7;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.platform-data-row strong,
.platform-data-row small {
  display: block;
}

.platform-data-row strong {
  font-weight: 500;
}

.platform-data-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.platform-owner-data-dashboard {
  gap: 18px;
}

.platform-owner-metric-grid .data-metric-card strong {
  font-size: 1.42rem;
  line-height: 1.2;
}

.platform-data-section-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.platform-data-section-grid > .data-card {
  align-content: start;
  min-height: 100%;
}

.platform-summary-card,
.platform-promotions-card {
  grid-column: span 2;
}

.platform-breakdown-list {
  display: grid;
  gap: 10px;
}

.platform-breakdown-row {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.platform-breakdown-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.platform-breakdown-row span,
.platform-insight-grid span,
.platform-category-pill span {
  color: var(--muted);
  font-size: 0.82rem;
}

.platform-breakdown-row strong,
.platform-insight-grid strong,
.platform-category-pill strong {
  color: var(--ink);
  font-weight: 500;
}

.platform-breakdown-row small {
  color: var(--muted);
  font-size: 0.78rem;
}

.platform-breakdown-track {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #ede7df;
}

.platform-breakdown-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(20, 121, 91, 0.82), rgba(247, 201, 72, 0.64));
}

.platform-billing-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.platform-billing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.platform-billing-row.active {
  border-color: rgba(20, 121, 91, 0.24);
  background: #f6fbf8;
}

.platform-billing-row span {
  display: block;
  color: var(--ink);
  font-weight: 500;
}

.platform-billing-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.platform-billing-row strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #f3efe8;
  color: var(--ink);
  font-weight: 600;
}

.platform-billing-row.active strong {
  background: #dff3ec;
  color: #10664f;
}

.platform-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.platform-insight-grid article,
.platform-category-pill {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.platform-insight-grid strong {
  font-size: 1.28rem;
}

.platform-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.platform-category-pill {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.platform-owner-table {
  max-height: 540px;
}

.platform-data-row.platform-business-row {
  grid-template-columns:
    minmax(230px, 1.35fr)
    minmax(90px, 0.55fr)
    minmax(145px, 0.8fr)
    minmax(110px, 0.62fr)
    minmax(105px, 0.62fr)
    minmax(105px, 0.62fr)
    minmax(70px, 0.42fr)
    minmax(90px, 0.5fr)
    minmax(90px, 0.5fr);
}

.platform-data-row.platform-business-row span {
  min-width: 0;
}

.platform-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: start;
}

.platform-add-firm-panel,
.platform-directory-panel,
.platform-firm-detail-panel {
  display: grid;
  gap: 16px;
}

.platform-directory-panel {
  grid-column: 1 / -1;
}

.platform-directory-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.platform-firm-detail-panel {
  grid-column: 2;
  grid-row: 1;
}

.platform-firm-modal-backdrop {
  z-index: 70;
  align-items: start;
  overflow: auto;
}

.platform-firm-modal {
  display: grid;
  gap: 14px;
  width: min(1040px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.platform-firm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.platform-firm-modal-header strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
}

.platform-firm-modal .platform-add-firm-panel,
.platform-firm-modal .platform-firm-detail-panel {
  grid-column: auto;
  grid-row: auto;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.platform-add-firm-form,
.platform-checklist {
  display: grid;
  gap: 12px;
}

.platform-roadmap-panel {
  display: grid;
  gap: 18px;
}

.platform-customization-panel {
  display: grid;
  gap: 18px;
}

.platform-customization-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.platform-customization-firm-picker {
  display: grid;
  gap: 6px;
  min-width: min(320px, 100%);
  color: #5d6570;
  font-size: 0.72rem;
  font-weight: 600;
}

.platform-customization-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.platform-customization-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: var(--radius);
  background: #fff;
}

.platform-customization-card.enabled {
  border-color: rgba(20, 121, 91, 0.26);
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.045), #fff 68%),
    #fff;
}

.platform-customization-card h3 {
  margin: 2px 0 6px;
  color: var(--ink);
  font-size: 1rem;
}

.platform-customization-card p {
  margin: 0;
  color: #5d6570;
  font-size: 0.75rem;
  line-height: 1.38;
}

.platform-customization-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(35, 32, 29, 0.12);
  border-radius: 999px;
  background: #fbfaf7;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.platform-roadmap-add-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(20, 121, 91, 0.06), #fff 72%);
}

.platform-roadmap-description-field {
  grid-column: 1 / -1;
}

.platform-roadmap-add-form textarea,
.platform-roadmap-editor-card textarea {
  min-height: 86px;
  padding-block: 10px;
  resize: vertical;
}

.platform-roadmap-editor-list {
  display: grid;
  gap: 12px;
}

.platform-roadmap-editor-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 14px 36px rgba(26, 22, 18, 0.04);
}

.platform-roadmap-editor-card.hidden-item {
  background: #fbfaf7;
  opacity: 0.82;
}

.platform-roadmap-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.platform-roadmap-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-roadmap-card-actions .secondary-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.platform-roadmap-card-actions .secondary-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.platform-roadmap-card-head h3 {
  margin: 4px 0 0;
  font-size: 1rem;
  font-weight: 500;
}

.platform-roadmap-card-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px);
  gap: 12px;
}

.platform-roadmap-visible-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 400;
}

.platform-roadmap-visible-toggle input {
  width: 16px !important;
  min-height: 16px !important;
  accent-color: var(--green);
}

.platform-add-firm-form label,
.platform-detail-grid label,
.platform-roadmap-add-form label,
.platform-roadmap-card-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.platform-add-firm-form input,
.platform-add-firm-form select,
.platform-detail-grid input,
.platform-detail-grid select,
.platform-directory-toolbar input,
.platform-directory-toolbar select,
.platform-roadmap-add-form input,
.platform-roadmap-add-form select,
.platform-roadmap-add-form textarea,
.platform-roadmap-card-grid input,
.platform-roadmap-card-grid select,
.platform-roadmap-card-grid textarea {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-weight: 400;
}

.platform-addon-toggle {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink) !important;
}

.platform-addon-toggle input {
  width: 16px !important;
  min-height: 16px !important;
  margin-top: 2px;
  accent-color: var(--green);
}

.platform-addon-toggle span {
  display: grid;
  gap: 3px;
  font-size: 0.9rem;
  line-height: 1.25;
}

.platform-addon-toggle small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.platform-addon-toggle-detail {
  min-height: 76px;
}

.platform-form-grid,
.platform-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.platform-readonly-field {
  display: grid;
  gap: 5px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 0.82rem;
}

.platform-readonly-field strong {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
}

.platform-readonly-field small {
  color: var(--muted);
  font-size: 0.76rem;
}

.platform-invite-preview,
.platform-invite-notice {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(241, 165, 31, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(247, 201, 72, 0.12), rgba(255, 255, 255, 0.96) 70%),
    #fff;
  padding: 12px;
}

.platform-invite-preview span {
  color: var(--ink);
  font-size: 0.82rem;
}

.platform-invite-preview p,
.platform-invite-notice {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.platform-invite-notice {
  border-color: rgba(20, 121, 91, 0.22);
  background: #edf8f4;
  color: var(--green);
}

.platform-invite-link-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(20, 121, 91, 0.2);
  border-radius: var(--radius);
  background: #f5fbf8;
  padding: 12px;
}

.platform-invite-link-card span {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.platform-invite-link-card input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 0.82rem;
}

.platform-invite-link-card div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-invite-link-card small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.platform-client-recovery-panel {
  display: grid;
  gap: 14px;
}

.platform-client-reassignment-panel {
  display: grid;
  gap: 14px;
}

.platform-client-duplicate-panel {
  display: grid;
  gap: 14px;
}

.platform-client-reassignment-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) repeat(3, minmax(150px, 0.7fr));
  gap: 12px;
  align-items: stretch;
}

.platform-client-reassignment-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  align-content: start;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
}

.platform-client-reassignment-lookup {
  grid-column: span 2;
}

.platform-client-reassignment-field span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.platform-client-reassignment-field strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.platform-client-reassignment-field select,
.platform-client-reassignment-field input[type="search"] {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-weight: 400;
}

.platform-client-reassignment-field select:disabled {
  color: var(--muted);
  background: #f6f3ee;
}

.platform-client-lookup-hint {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.platform-client-lookup-results {
  display: grid;
  gap: 6px;
  max-height: 250px;
  overflow: auto;
}

.platform-client-lookup-result {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfaf8;
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.platform-client-lookup-result:hover,
.platform-client-lookup-result:focus-visible {
  border-color: rgba(255, 106, 35, 0.55);
  outline: none;
}

.platform-client-lookup-result strong {
  font-size: 0.88rem;
  font-weight: 700;
}

.platform-client-lookup-result span {
  color: var(--ink);
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
}

.platform-client-lookup-result small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.platform-client-lookup-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.platform-client-lookup-selected small {
  color: var(--green);
  font-size: 0.78rem;
}

.platform-client-lookup-selected button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 5px 10px;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.platform-client-reassignment-actions {
  display: flex;
  justify-content: flex-end;
  grid-column: 1 / -1;
}

.platform-client-reassignment-current {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.platform-client-duplicate-groups {
  display: grid;
  gap: 12px;
}

.platform-client-duplicate-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.platform-client-duplicate-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.platform-client-duplicate-card-header h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
}

.platform-client-duplicate-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.platform-client-duplicate-tags span {
  border: 1px solid rgba(15, 132, 94, 0.18);
  border-radius: 999px;
  background: rgba(15, 132, 94, 0.08);
  color: var(--green);
  padding: 5px 8px;
  font-size: 0.74rem;
}

.platform-client-duplicate-rows {
  display: grid;
  gap: 8px;
}

.platform-client-duplicate-row {
  display: grid;
  grid-template-columns: minmax(80px, 0.45fr) minmax(130px, 0.7fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(170px, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfaf8;
  padding: 10px;
}

.platform-client-duplicate-row strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
}

.platform-client-duplicate-row span {
  color: var(--ink);
  font-size: 0.9rem;
}

.platform-client-duplicate-row small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.platform-client-duplicate-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.platform-client-duplicate-actions label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.platform-client-duplicate-actions label span {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.platform-client-duplicate-actions select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-weight: 400;
}

.platform-client-recovery-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.platform-client-recovery-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.platform-client-recovery-summary article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
  padding: 12px;
}

.platform-client-recovery-summary span {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.platform-client-recovery-summary strong {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 500;
}

.platform-client-recovery-list {
  display: grid;
  gap: 10px;
}

.platform-client-recovery-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.28fr);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(226, 85, 69, 0.22);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.platform-client-recovery-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.platform-client-recovery-main h3,
.platform-client-recovery-main p {
  margin: 0;
}

.platform-client-recovery-main h3 {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 500;
}

.platform-client-recovery-main p {
  color: var(--muted);
}

.platform-client-recovery-controls {
  display: grid;
  gap: 10px;
}

.platform-client-recovery-controls label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.platform-client-recovery-controls select {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-weight: 400;
}

.platform-danger-zone {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  border: 1px solid rgba(184, 38, 43, 0.24);
  border-radius: var(--radius);
  background: #fff8f7;
  padding: 16px;
}

.platform-danger-zone h3 {
  margin: 3px 0 6px;
  font-size: 1rem;
  font-weight: 500;
}

.pending-firm-danger-zone {
  border-color: rgba(164, 107, 18, 0.28);
  background: #fff9ef;
}

.platform-danger-zone p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.platform-delete-firm-form {
  display: grid;
  gap: 12px;
}

.platform-delete-firm-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.platform-delete-firm-form input[type="text"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(184, 38, 43, 0.28);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

.platform-delete-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 10px !important;
  color: var(--ink) !important;
}

.platform-delete-check input {
  width: 16px;
  min-height: 16px;
  margin-top: 2px;
  accent-color: var(--red);
}

.platform-delete-warning {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(184, 38, 43, 0.18);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.platform-delete-warning strong {
  color: var(--red);
  font-weight: 700;
}

.platform-delete-warning span {
  color: var(--muted);
  font-size: 0.8rem;
}

.platform-archive-status-card,
.platform-permanent-delete-lock,
.platform-firm-audit-trail {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.platform-archive-status-card span,
.platform-permanent-delete-lock span,
.platform-firm-audit-trail > span {
  color: #a46b12;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.platform-archive-status-card strong {
  color: var(--ink);
  font-weight: 500;
}

.platform-archive-status-card small,
.platform-permanent-delete-lock p,
.platform-firm-audit-trail small,
.platform-firm-audit-trail p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.platform-archive-status-card .secondary-button {
  width: fit-content;
  font-weight: 500;
}

.platform-firm-audit-trail article {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.platform-firm-audit-trail article:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.platform-firm-audit-trail strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
}

.platform-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.platform-danger-zone .danger-button {
  min-height: 40px;
  border: 1px solid rgba(184, 38, 43, 0.32);
  border-radius: 999px;
  background: #fff;
  color: var(--red);
  font-weight: 500;
  padding: 0 18px;
}

.platform-danger-zone .danger-button:not(:disabled):hover {
  background: #ffecec;
}

.platform-danger-zone .danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.platform-directory-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px;
}

.platform-firm-cleanup-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
  border-color: rgba(255, 123, 34, 0.24);
}

.platform-firm-cleanup-panel .platform-directory-toolbar {
  grid-template-columns: minmax(0, 1fr);
}

.platform-firm-cleanup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.platform-firm-cleanup-grid label,
.platform-firm-cleanup-confirm label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.platform-firm-cleanup-grid select,
.platform-firm-cleanup-confirm input,
.platform-firm-cleanup-panel input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  padding: 0 12px;
}

.platform-firm-cleanup-inspect {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf8;
  padding: 14px;
}

.platform-firm-cleanup-inspect > span,
.platform-firm-cleanup-record em {
  color: #a46b12;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.platform-firm-cleanup-inspect strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
}

.platform-firm-cleanup-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.platform-firm-cleanup-stats span {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.platform-firm-cleanup-stats strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.platform-firm-cleanup-stats small,
.platform-firm-cleanup-id,
.platform-firm-cleanup-confirm small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.platform-firm-cleanup-id {
  overflow-wrap: anywhere;
}

.platform-firm-cleanup-confirm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid rgba(255, 123, 34, 0.2);
  border-radius: var(--radius);
  background: #fffaf4;
  padding: 14px;
}

.platform-firm-cleanup-record-list {
  display: grid;
  gap: 10px;
  max-height: 460px;
  overflow: auto;
  padding-right: 4px;
}

.platform-firm-cleanup-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px 16px;
}

.platform-firm-cleanup-record.flagged {
  border-color: rgba(255, 123, 34, 0.32);
  background: #fffaf4;
}

.platform-firm-cleanup-record h3,
.platform-firm-cleanup-record p {
  margin: 0;
}

.platform-firm-cleanup-record h3 {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
}

.platform-firm-cleanup-record p {
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.platform-firm-cleanup-record-stats,
.platform-firm-cleanup-record-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.platform-firm-cleanup-record-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8f5ef;
  color: var(--muted);
  font-size: 0.74rem;
  padding: 0 8px;
  white-space: nowrap;
}

.platform-firm-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.platform-firm-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.platform-firm-row:hover,
.platform-firm-row.active {
  border-color: rgba(241, 165, 31, 0.45);
  box-shadow: 0 10px 28px rgba(26, 22, 18, 0.08);
  transform: translateY(-1px);
}

.platform-firm-row span,
.platform-firm-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.platform-firm-summary {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  max-width: 620px;
}

.platform-firm-summary small {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8f5ef;
  white-space: nowrap;
}

.platform-firm-row strong {
  color: var(--ink);
  font-weight: 500;
}

.platform-firm-row small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-status-pill {
  display: inline-flex;
  width: max-content;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f1ef;
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
}

.platform-billing-pill {
  display: inline-flex;
  width: max-content;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f1ef;
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  white-space: nowrap;
}

.platform-billing-pill[class*="free-trial"] {
  background: #fff8dc;
  color: #7b5a06;
}

.platform-billing-pill[class*="unlimited-access-free"] {
  background: #edf8f4;
  color: var(--green);
}

.platform-billing-pill[class*="paid-access-monthly"],
.platform-billing-pill[class*="paid-access-yearly"] {
  background: #eef2ff;
  color: #274690;
}

.platform-billing-pill.inactive {
  background: #fff1f1;
  color: #b42318;
}

.platform-status-pill.active {
  background: #e8f7f1;
  color: var(--green);
}

.platform-status-pill.free-trial {
  background: #fff8dc;
  color: #7b5a06;
}

.platform-status-pill.inactive {
  background: #fff0ec;
  color: var(--ember);
}

.platform-status-pill.implementation {
  background: #fff8dc;
  color: #7b5a06;
}

.platform-status-pill.trial {
  background: #edf2ff;
  color: #274690;
}

.platform-status-pill.paused {
  background: #fff0ec;
  color: var(--ember);
}

.platform-support-access-card,
.software-owner-access-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(241, 165, 31, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(247, 201, 72, 0.14), rgba(255, 255, 255, 0.96) 72%),
    #fff;
}

.platform-support-access-card h3,
.software-owner-access-panel h2 {
  margin: 2px 0 4px;
  font-size: 1rem;
  font-weight: 500;
}

.platform-support-access-card p,
.software-owner-access-panel p {
  margin: 0;
  max-width: 620px;
}

.platform-support-access-actions {
  display: grid;
  gap: 8px;
  min-width: min(420px, 42vw);
}

.platform-support-access-actions input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 0.85rem;
}

.software-owner-access-panel {
  border-color: rgba(21, 21, 21, 0.14);
  background:
    linear-gradient(135deg, rgba(21, 21, 21, 0.08), rgba(255, 255, 255, 0.98) 70%),
    #fff;
}

.platform-setup-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
}

.platform-checklist {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.platform-checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 400;
}

.platform-checklist label.complete {
  border-color: rgba(20, 121, 91, 0.28);
  background: #edf8f4;
}

.platform-checklist input {
  accent-color: var(--green);
}

.platform-open-onboarding-button {
  justify-self: start;
}

.platform-owner-onboarding-panel {
  display: grid;
  gap: 18px;
  overflow: hidden;
  border-color: rgba(20, 121, 91, 0.18);
  background:
    radial-gradient(circle at top left, rgba(247, 201, 72, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(20, 121, 91, 0.1), rgba(255, 255, 255, 0.96) 42%),
    #fff;
}

.platform-owner-onboarding-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.platform-owner-onboarding-hero h2 {
  margin: 4px 0 8px;
  font-size: clamp(1.55rem, 2vw, 2.2rem);
  letter-spacing: 0;
}

.platform-owner-onboarding-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.platform-owner-onboarding-body {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.platform-owner-steps,
.platform-owner-onboarding-form,
.platform-onboarding-section {
  display: grid;
  gap: 12px;
}

.platform-owner-steps {
  position: sticky;
  top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.platform-owner-steps-header {
  display: grid;
  gap: 3px;
  padding: 4px 4px 10px;
  border-bottom: 1px solid var(--line);
}

.platform-owner-steps-header strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
}

.platform-owner-steps-header small {
  color: var(--muted);
  font-size: 0.76rem;
}

.platform-owner-steps span {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  color: var(--muted);
  font-size: 0.86rem;
}

.platform-owner-steps i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-style: normal;
  font-size: 0.78rem;
}

.platform-owner-steps span.complete {
  color: var(--ink);
}

.platform-owner-steps span.complete i {
  border-color: rgba(20, 121, 91, 0.24);
  background: #edf8f4;
  color: var(--green);
}

.platform-onboarding-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  padding: 16px;
}

.platform-onboarding-section h3 {
  margin: 3px 0 4px;
  font-size: 1rem;
  font-weight: 400;
}

.platform-onboarding-section p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.platform-owner-grid {
  display: grid;
  gap: 12px;
}

.platform-owner-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.platform-owner-onboarding-form label,
.firm-branding-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.platform-owner-onboarding-form input,
.platform-owner-onboarding-form select,
.firm-branding-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-weight: 400;
}

.platform-portal-url-field {
  grid-column: 1 / -1;
}

.platform-domain-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.platform-domain-builder input {
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.platform-domain-builder input:focus {
  box-shadow: none;
}

.platform-domain-builder b {
  align-self: stretch;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0 16px;
  white-space: nowrap;
}

.platform-portal-url-field small strong {
  color: var(--ink);
}

.platform-logo-upload-grid {
  display: grid;
  gap: 12px;
}

.platform-logo-upload-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 2px;
}

.platform-logo-preview,
.firm-brand-preview-logo {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, #1f1c19, #3a3025),
    #23201d;
  color: #fff;
  font-size: 1.3rem;
  letter-spacing: 0;
  box-shadow: 0 18px 40px rgba(26, 22, 18, 0.14);
}

.login-logo-surface {
  border: 1px solid rgba(35, 32, 29, 0.08);
  background:
    linear-gradient(135deg, #ffffff, #f7f5f0),
    #fff;
  color: var(--ink);
}

.dashboard-logo-surface {
  background:
    linear-gradient(135deg, #1f1c19, #3a3025),
    #23201d;
  color: #fff;
}

.platform-logo-preview img,
.firm-brand-preview-logo img {
  width: 100%;
  max-width: 78px;
  max-height: 72px;
  object-fit: contain;
}

.platform-logo-upload-card small,
.firm-branding-form small {
  color: var(--muted);
  font-size: 0.76rem;
}

.firm-brand-upload-control {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.firm-brand-upload-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.firm-brand-label-line {
  min-width: 0;
}

.firm-brand-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 5px 6px 5px 12px;
}

.firm-brand-file-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.firm-brand-file-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.84rem;
  padding: 0 12px;
  white-space: nowrap;
}

.firm-brand-file-input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  min-height: 1px !important;
  border: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0;
  pointer-events: none;
  clip: rect(0 0 0 0);
}

.firm-brand-file-warning {
  display: block;
  width: fit-content;
  border: 1px solid rgba(176, 105, 0, 0.22);
  border-radius: 999px;
  background: #fff8e5;
  color: #7a4a00 !important;
  padding: 5px 9px;
  line-height: 1.35;
}

.optional-label {
  display: inline-flex;
  width: max-content;
  min-height: 20px;
  align-items: center;
  margin-left: 6px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 999px;
  background: #f7f5f0;
  color: #6a6258;
  padding: 0 7px;
  font-size: 0.68rem;
  font-weight: 600;
}

.firm-brand-label-line {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.platform-client-path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.platform-client-path-grid label {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  cursor: pointer;
}

.platform-client-path-grid label.selected {
  border-color: rgba(20, 121, 91, 0.28);
  background: #edf8f4;
}

.platform-client-path-grid input {
  width: auto;
  min-height: auto;
  accent-color: var(--green);
}

.platform-client-path-grid span,
.platform-client-path-grid small {
  display: block;
}

.platform-client-path-grid span {
  color: var(--ink);
  font-size: 0.86rem;
}

.platform-client-path-grid small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.platform-team-detail-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background: #fbfdfc;
  padding: 14px;
}

.platform-team-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.platform-team-choice-grid label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  cursor: pointer;
}

.platform-team-choice-grid label.selected {
  border-color: rgba(20, 121, 91, 0.28);
  background: #edf8f4;
}

.platform-team-choice-grid input {
  width: auto;
  min-height: auto;
  margin-top: 2px;
  accent-color: var(--green);
}

.platform-team-choice-grid span,
.platform-team-choice-grid small {
  display: block;
}

.platform-team-choice-grid span {
  color: var(--ink);
  font-size: 0.86rem;
}

.platform-team-choice-grid small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.platform-team-draft-list {
  display: grid;
  gap: 10px;
}

.platform-team-draft-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.platform-team-draft-row strong {
  align-self: center;
  font-weight: 500;
}

.platform-team-later-note {
  display: grid;
  gap: 3px;
  border: 1px dashed rgba(154, 106, 0, 0.28);
  border-radius: var(--radius);
  background: #fffdf7;
  padding: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.platform-team-later-note strong {
  color: var(--ink);
  font-weight: 500;
}

.platform-crm-source-field {
  margin-top: 2px;
}

.platform-crm-source-card {
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background: #fbfdfc;
  padding: 12px;
}

.platform-owner-onboarding-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.firm-branding-panel {
  display: grid;
  gap: 14px;
}

.firm-branding-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.firm-branding-summary span {
  display: grid;
  gap: 3px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.76rem;
  padding: 10px 12px;
}

.firm-branding-summary strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.firm-branding-form {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.firm-brand-preview {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 122px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.firm-brand-preview-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.firm-brand-preview-item {
  display: grid;
  gap: 9px;
  min-width: 0;
  align-content: start;
}

.firm-brand-preview-item .firm-brand-preview-logo {
  width: 100%;
  max-width: 132px;
  justify-self: start;
}

.firm-brand-preview strong,
.firm-brand-preview small {
  display: block;
}

.firm-brand-preview strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}

.firm-brand-preview small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.firm-brand-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.firm-brand-logo-field {
  grid-column: 1 / -2;
}

.firm-brand-building-toggle {
  grid-column: 1 / -2;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 10px !important;
  min-height: 52px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background: #edf8f4;
  padding: 10px 12px;
}

.firm-brand-building-toggle input {
  width: 17px;
  min-height: 17px;
  margin-top: 2px;
  accent-color: var(--green);
}

.firm-brand-building-toggle span,
.firm-brand-building-toggle small {
  display: block;
}

.firm-brand-building-toggle span {
  color: var(--ink);
  font-size: 0.86rem;
}

.firm-brand-building-toggle small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.brand-building-panel {
  display: grid;
  gap: 16px;
  background:
    radial-gradient(circle at top right, rgba(247, 201, 72, 0.13), transparent 34%),
    #fff;
}

.brand-building-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.brand-building-summary-grid article {
  display: grid;
  gap: 5px;
  min-height: 98px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
  padding: 12px;
}

.brand-building-summary-grid span,
.brand-building-summary-grid small {
  color: var(--muted);
  font-size: 0.78rem;
}

.brand-building-summary-grid strong {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 500;
}

.brand-summary-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.brand-summary-card-top span {
  max-width: 260px;
  line-height: 1.35;
}

.brand-analytics-period-select {
  width: auto;
  min-width: 108px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 28px 0 12px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 400;
}

.brand-building-layout {
  display: grid;
  grid-template-columns: minmax(290px, 0.36fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.brand-promotion-form,
.brand-promotion-list,
.brand-promotion-row,
.brand-promotion-edit-grid {
  display: grid;
  gap: 12px;
}

.brand-promotion-form {
  position: sticky;
  top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(247, 201, 72, 0.12), rgba(255, 255, 255, 0.96) 68%),
    #fff;
  padding: 14px;
}

.brand-promotion-form label,
.brand-promotion-row label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.brand-promotion-form input,
.brand-promotion-form select,
.brand-promotion-form textarea,
.brand-promotion-row input,
.brand-promotion-row select,
.brand-promotion-row textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-weight: 400;
}

.brand-promotion-form textarea,
.brand-promotion-row textarea {
  min-height: 94px;
  padding-top: 10px;
  resize: vertical;
}

.brand-promotion-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
}

.brand-promotion-toggle {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
}

.brand-promotion-toggle input,
.brand-promotion-row-header input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--green);
}

.brand-promotion-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.brand-promotion-row.live {
  border-color: rgba(20, 121, 91, 0.22);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.84), rgba(255, 255, 255, 0.96) 60%),
    #fff;
}

.brand-promotion-row-header {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.brand-promotion-row-header .brand-promo-type {
  margin-right: auto;
}

.brand-promotion-live-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(199, 84, 71, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(253, 241, 238, 0.96), rgba(255, 255, 255, 0.96)),
    #fff;
  color: #9f3d31;
  padding: 9px 18px;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.brand-promotion-live-toggle:hover {
  transform: translateY(-1px);
}

.brand-promotion-live-toggle strong {
  color: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.brand-promotion-live-toggle span {
  color: inherit;
  font-size: 0.78rem;
  opacity: 0.86;
  white-space: nowrap;
}

.brand-promotion-live-toggle.is-live {
  border-color: rgba(20, 121, 91, 0.34);
  background:
    linear-gradient(135deg, rgba(221, 246, 238, 0.98), rgba(237, 248, 244, 0.92)),
    #edf8f4;
  color: #08745f;
}

.brand-promotion-field-header {
  display: flex;
  min-height: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-promotion-inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  white-space: nowrap;
}

.brand-promotion-inline-toggle input {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  min-height: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0;
  accent-color: var(--green);
}

.brand-promotion-audience-panel {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.78), rgba(255, 255, 255, 0.96) 70%),
    #fff;
  padding: 12px;
}

.brand-promotion-owner-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.38fr);
  gap: 12px;
  align-items: end;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 12px;
}

.brand-promotion-owner-panel.missing-owner {
  border-color: rgba(199, 84, 71, 0.28);
  background:
    linear-gradient(135deg, rgba(253, 241, 238, 0.9), rgba(255, 255, 255, 0.86)),
    #fff;
}

.brand-promotion-owner-panel > div {
  display: grid;
  gap: 3px;
}

.brand-promotion-owner-panel span,
.brand-promotion-owner-panel small {
  color: var(--muted);
  font-size: 0.78rem;
}

.brand-promotion-owner-panel strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.brand-promotion-audience-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.brand-promotion-audience-panel-header div {
  display: grid;
  gap: 4px;
}

.brand-promotion-audience-panel-header strong {
  font-size: 0.95rem;
}

.brand-promotion-audience-panel-header span {
  color: var(--muted);
  font-size: 0.82rem;
}

.brand-promotion-audience-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.brand-promotion-hhid-hover {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--green);
  outline: none;
}

.brand-promotion-hhid-trigger {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(20, 121, 91, 0.2);
  border-radius: 999px;
  background: rgba(237, 248, 244, 0.82);
  color: var(--green) !important;
  font-size: 0.74rem !important;
  font-weight: 600;
  line-height: 1;
  padding: 0 8px;
}

.brand-promotion-hhid-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 40;
  display: none;
  width: min(320px, 80vw);
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 38px rgba(32, 27, 22, 0.16);
  color: var(--ink);
  padding: 10px;
}

.brand-promotion-hhid-hover:hover .brand-promotion-hhid-popover,
.brand-promotion-hhid-hover:focus-within .brand-promotion-hhid-popover {
  display: grid;
  gap: 8px;
}

.brand-promotion-hhid-popover strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.brand-promotion-hhid-list {
  display: grid;
  gap: 6px;
}

.brand-promotion-hhid-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(226, 221, 212, 0.85);
  border-radius: 7px;
  background: rgba(249, 248, 244, 0.72);
  padding: 7px 8px;
}

.brand-promotion-hhid-row code {
  color: var(--ink);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.brand-promotion-hhid-row small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-promotion-publisher-scope {
  display: grid;
  grid-template-columns: minmax(170px, 0.52fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.brand-promotion-publisher-scope > div:first-child {
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
  padding: 10px 12px;
}

.brand-promotion-publisher-scope > div:first-child strong {
  font-size: 0.9rem;
}

.brand-promotion-publisher-scope > div:first-child span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.brand-promotion-publisher-scope-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.brand-promotion-publisher-scope-option {
  display: flex !important;
  align-items: flex-start;
  gap: 9px !important;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink) !important;
  padding: 10px;
  cursor: pointer;
}

.brand-promotion-publisher-scope-option.selected {
  border-color: rgba(20, 121, 91, 0.28);
  background: rgba(237, 248, 244, 0.94);
}

.brand-promotion-publisher-scope-option input {
  width: 16px !important;
  min-height: 16px !important;
  margin-top: 2px;
  accent-color: var(--green);
}

.brand-promotion-publisher-scope-option span {
  display: grid;
  gap: 4px;
}

.brand-promotion-publisher-scope-option strong {
  font-size: 0.88rem;
  font-weight: 600;
}

.brand-promotion-publisher-scope-option small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.brand-promotion-audience-options,
.brand-promotion-tag-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.brand-promotion-audience-option,
.brand-promotion-tag-option {
  display: flex !important;
  align-items: flex-start;
  gap: 9px !important;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink) !important;
  padding: 10px;
  cursor: pointer;
}

.brand-promotion-tag-option {
  min-height: 48px;
  align-items: center;
}

.brand-promotion-audience-option.selected,
.brand-promotion-tag-option.selected {
  border-color: rgba(20, 121, 91, 0.26);
  background: rgba(237, 248, 244, 0.92);
}

.brand-promotion-audience-option input,
.brand-promotion-tag-option input {
  width: 16px !important;
  min-height: 16px !important;
  margin-top: 2px;
  accent-color: var(--green);
}

.brand-promotion-audience-option span {
  display: grid;
  gap: 4px;
}

.brand-promotion-audience-option strong,
.brand-promotion-tag-option span {
  font-size: 0.88rem;
  font-weight: 600;
}

.brand-promotion-audience-option small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.brand-promotion-tag-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  padding: 12px;
  font-size: 0.84rem;
}

.brand-promotion-edit-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(120px, 0.4fr) minmax(120px, 0.4fr) minmax(0, 1fr);
}

.brand-promotion-description-field {
  grid-column: 1 / -1;
}

.brand-promotion-analytics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.brand-analytics-card {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.brand-analytics-card strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.brand-analytics-card em {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(100% + 8px);
  z-index: 8;
  display: block;
  max-height: 140px;
  overflow: auto;
  border: 1px solid rgba(35, 32, 29, 0.12);
  border-radius: var(--radius);
  background: #23201d;
  color: #fff;
  padding: 9px 10px;
  font-size: 0.76rem;
  font-style: normal;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  box-shadow: 0 16px 36px rgba(26, 22, 18, 0.18);
}

.brand-analytics-card:hover em,
.brand-analytics-card:focus-visible em {
  opacity: 1;
  transform: translateY(0);
}

.brand-promotion-delete {
  width: 34px;
  height: 34px;
  color: var(--red);
}

.brand-building-disabled {
  display: grid;
  gap: 8px;
  border: 1px dashed rgba(35, 32, 29, 0.18);
  border-radius: var(--radius);
  background: #fbfaf7;
  padding: 18px;
}

.brand-building-disabled span {
  color: var(--ink);
  font-size: 1rem;
}

.brand-building-disabled p {
  max-width: 72ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.platform-status-pill.warning {
  border-color: rgba(241, 165, 31, 0.28);
  background: #fff8e5;
  color: #9a6612;
}

.visitor-tracking-panel {
  background:
    radial-gradient(circle at top right, rgba(20, 121, 91, 0.1), transparent 34%),
    linear-gradient(135deg, rgba(238, 249, 255, 0.74), rgba(255, 255, 255, 0.96) 42%, rgba(255, 250, 240, 0.86)),
    #fff;
}

.visitor-panel-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.visitor-section-toggle {
  min-height: 36px;
  padding: 0 14px;
  white-space: nowrap;
}

.visitor-collapsed-summary {
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  padding: 14px 16px;
  font-size: 0.86rem;
}

.flames-reactivation-tracker {
  background:
    radial-gradient(circle at top right, rgba(20, 121, 91, 0.1), transparent 34%),
    linear-gradient(135deg, rgba(237, 248, 244, 0.72), rgba(255, 255, 255, 0.98) 42%, rgba(255, 248, 229, 0.78)),
    #fff;
}

.flames-reactivation-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.flames-reactivation-summary-grid article {
  display: grid;
  gap: 5px;
  min-height: 104px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.flames-reactivation-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 8px;
}

.flames-reactivation-filter-bar button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(35, 32, 29, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #4f5964;
  padding: 0 10px;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.flames-reactivation-filter-bar button:hover,
.flames-reactivation-filter-bar button.active {
  border-color: rgba(20, 121, 91, 0.26);
  background: #edf8f4;
  color: var(--green);
}

.flames-reactivation-filter-bar button strong {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: rgba(35, 32, 29, 0.06);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
}

.flames-reactivation-filter-bar button.active strong {
  background: #fff;
  color: var(--green);
}

.flames-reactivation-filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8rem;
}

.flames-reactivation-filter-summary strong {
  color: var(--ink);
  font-weight: 600;
}

.flames-reactivation-table {
  display: grid;
  gap: 8px;
}

.flames-reactivation-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(180px, 1.15fr) minmax(130px, 0.8fr) minmax(180px, 1.05fr) minmax(230px, 1.35fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  padding: 12px;
}

.flames-reactivation-row.header {
  min-height: auto;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  padding: 2px 12px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.flames-reactivation-row.has-signal {
  border-color: rgba(20, 121, 91, 0.2);
  background: linear-gradient(135deg, rgba(237, 248, 244, 0.82), rgba(255, 255, 255, 0.96));
}

.flames-reactivation-row.has-discovery {
  border-color: rgba(47, 117, 160, 0.24);
}

.flames-reactivation-row.has-explore {
  border-color: rgba(20, 121, 91, 0.28);
}

.flames-reactivation-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.flames-reactivation-row strong,
.flames-reactivation-row small {
  overflow-wrap: anywhere;
}

.flames-reactivation-row strong {
  color: var(--ink);
  font-weight: 500;
}

.flames-reactivation-row small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.flames-reactivation-signal {
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  padding: 5px 9px;
  font-size: 0.76rem;
  line-height: 1.2;
}

.visitor-tracking-hero,
.visitor-tracking-section {
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(251, 250, 247, 0.92)),
    #fff;
  box-shadow: 0 12px 32px rgba(26, 22, 18, 0.045);
}

.visitor-tracking-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
}

.visitor-tracking-hero > div:first-child {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 150px;
}

.visitor-tracking-hero span,
.visitor-section-heading span,
.visitor-health-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.visitor-tracking-hero strong {
  max-width: 760px;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 500;
}

.visitor-tracking-hero p,
.visitor-section-heading p,
.visitor-crm-action-card p,
.visitor-intent-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.visitor-tracking-hero-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.visitor-tracking-hero-steps article {
  display: grid;
  gap: 7px;
  min-height: 140px;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(237, 248, 244, 0.84), rgba(255, 255, 255, 0.94));
  padding: 12px;
}

.visitor-tracking-hero-steps small {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 0.72rem;
}

.visitor-tracking-hero-steps strong {
  font-size: 0.98rem;
}

.visitor-tracking-hero-steps span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.visitor-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.visitor-summary-grid article {
  display: grid;
  gap: 5px;
  min-height: 104px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.visitor-summary-grid span,
.visitor-summary-grid small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.visitor-summary-grid strong {
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 500;
}

.visitor-summary-blue {
  background: linear-gradient(135deg, rgba(234, 247, 255, 0.9), #fff) !important;
}

.visitor-summary-green {
  background: linear-gradient(135deg, rgba(237, 248, 244, 0.92), #fff) !important;
}

.visitor-summary-gold {
  background: linear-gradient(135deg, rgba(255, 248, 229, 0.94), #fff) !important;
}

.visitor-tracking-section {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.visitor-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.visitor-section-heading > div {
  display: grid;
  gap: 4px;
}

.visitor-section-heading strong {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 500;
}

.visitor-section-heading > small {
  max-width: 360px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: right;
}

.visitor-tracking-setup-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.visitor-tracking-field {
  display: grid;
  gap: 7px;
  min-height: 116px;
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  padding: 11px;
  color: var(--muted);
  font-size: 0.8rem;
}

.visitor-tracking-field span {
  color: #47525d;
  font-size: 0.78rem;
}

.visitor-tracking-field input,
.visitor-tracking-field select,
.visitor-tracking-field textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d7e0e3;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 0.9rem;
}

.visitor-tracking-field textarea {
  min-height: 92px;
  padding-top: 10px;
  resize: vertical;
}

.visitor-tracking-field small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.visitor-tracking-wide-field {
  grid-column: span 2;
}

.visitor-tracking-install-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(237, 248, 244, 0.9), rgba(255, 255, 255, 0.96)),
    #fff;
  padding: 14px;
}

.visitor-tracking-install-card > div {
  display: grid;
  gap: 4px;
}

.visitor-tracking-install-card span {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.visitor-tracking-install-card strong {
  color: var(--ink);
  font-weight: 500;
}

.visitor-tracking-install-card small {
  color: var(--muted);
  line-height: 1.35;
}

.visitor-tracking-event-grid,
.visitor-crm-action-grid,
.visitor-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.visitor-event-card,
.visitor-crm-action-card,
.visitor-health-grid article,
.visitor-lead-row,
.visitor-intent-card {
  border: 1px solid rgba(35, 32, 29, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  padding: 12px;
}

.visitor-event-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 116px;
  cursor: pointer;
}

.visitor-event-card.selected {
  border-color: rgba(20, 121, 91, 0.28);
  background: linear-gradient(135deg, rgba(237, 248, 244, 0.92), rgba(255, 255, 255, 0.96));
}

.visitor-event-card input,
.visitor-action-controls input {
  width: 16px;
  min-height: 16px;
  margin-top: 2px;
  accent-color: var(--green);
}

.visitor-event-card span {
  display: grid;
  gap: 4px;
}

.visitor-event-card small {
  color: var(--muted);
  font-size: 0.72rem;
}

.visitor-event-card strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
}

.visitor-event-card em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  line-height: 1.35;
}

.visitor-tracking-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.visitor-intent-list,
.visitor-lead-list {
  display: grid;
  gap: 10px;
}

.visitor-intent-card {
  display: grid;
  gap: 6px;
  min-height: 114px;
  box-shadow: inset 4px 0 0 rgba(20, 121, 91, 0.45);
}

.visitor-intent-hot {
  box-shadow: inset 4px 0 0 rgba(184, 38, 43, 0.46);
}

.visitor-intent-warm {
  box-shadow: inset 4px 0 0 rgba(241, 165, 31, 0.58);
}

.visitor-intent-card span {
  color: var(--muted);
  font-size: 0.72rem;
}

.visitor-intent-card strong,
.visitor-lead-row strong,
.visitor-crm-action-card strong,
.visitor-health-grid strong {
  color: var(--ink);
  font-weight: 500;
}

.visitor-intent-card small {
  color: var(--green);
  font-size: 0.76rem;
}

.visitor-lead-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(0, 1fr) minmax(0, 1.1fr) auto;
  gap: 12px;
  align-items: center;
}

.visitor-lead-row div {
  display: grid;
  gap: 3px;
}

.visitor-lead-row span,
.visitor-lead-row p,
.visitor-lead-row small {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.visitor-lead-row small {
  justify-self: end;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  padding: 5px 9px;
}

.visitor-action-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.visitor-action-controls label {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 6px 11px;
  font-size: 0.78rem;
}

.visitor-action-controls select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 30px 0 12px;
  font: inherit;
  font-size: 0.78rem;
}

.visitor-crm-action-card {
  display: grid;
  gap: 7px;
  min-height: 112px;
}

.visitor-health-grid article {
  display: grid;
  gap: 5px;
  min-height: 106px;
}

.visitor-health-grid article.ready {
  border-color: rgba(20, 121, 91, 0.2);
  background: linear-gradient(135deg, rgba(237, 248, 244, 0.9), #fff);
}

.visitor-health-grid article.needs-work {
  border-color: rgba(241, 165, 31, 0.24);
  background: linear-gradient(135deg, rgba(255, 248, 229, 0.9), #fff);
}

.visitor-health-grid small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .flames-reactivation-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flames-reactivation-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flames-reactivation-row.header {
    display: none;
  }

  .visitor-tracking-hero,
  .visitor-tracking-two-column {
    grid-template-columns: 1fr;
  }

  .visitor-summary-grid,
  .visitor-tracking-event-grid,
  .visitor-crm-action-grid,
  .visitor-health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .visitor-tracking-setup-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .visitor-panel-header-actions {
    justify-content: flex-start;
  }

  .flames-reactivation-summary-grid,
  .flames-reactivation-row {
    grid-template-columns: 1fr;
  }

  .visitor-summary-grid,
  .visitor-tracking-event-grid,
  .visitor-crm-action-grid,
  .visitor-health-grid,
  .visitor-tracking-setup-grid,
  .visitor-tracking-hero-steps {
    grid-template-columns: 1fr;
  }

  .visitor-section-heading,
  .visitor-tracking-install-card {
    display: grid;
  }

  .visitor-section-heading > small {
    max-width: none;
    text-align: left;
  }

  .visitor-tracking-wide-field {
    grid-column: auto;
  }

  .visitor-lead-row {
    grid-template-columns: 1fr;
  }

  .visitor-lead-row small {
    justify-self: start;
  }

  .visitor-action-controls {
    justify-content: flex-start;
  }
}

.miller-settings-panel {
  display: grid;
  gap: 16px;
  background:
    radial-gradient(circle at top right, rgba(20, 121, 91, 0.08), transparent 32%),
    linear-gradient(135deg, rgba(255, 250, 240, 0.7), rgba(255, 255, 255, 0.98) 44%),
    #fff;
}

.miller-settings-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.miller-settings-summary-grid article {
  display: grid;
  gap: 6px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  padding: 14px;
}

.miller-settings-summary-grid span,
.miller-settings-summary-grid small,
.miller-ruleset-form label,
.miller-test-card label {
  color: var(--muted);
  font-size: 0.78rem;
}

.miller-settings-summary-grid strong {
  color: var(--ink);
  font-size: 1.32rem;
  font-weight: 500;
}

.miller-settings-notice {
  margin: 0;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background: #edf8f4;
  color: var(--green);
  padding: 10px 12px;
  font-size: 0.88rem;
}

.miller-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.miller-settings-main,
.miller-settings-side,
.miller-ruleset-form,
.miller-escalation-list,
.miller-knowledge-list {
  display: grid;
  gap: 12px;
}

.miller-settings-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.miller-step-card {
  border-color: rgba(247, 201, 72, 0.28);
}

.miller-step-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.miller-step-heading > div {
  min-width: 0;
}

.miller-step-number {
  display: grid;
  width: 30px;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #fff6df;
  color: #8a5c00;
  font-size: 0.82rem;
}

.miller-card-copy {
  margin-top: 4px;
  max-width: 720px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.miller-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.miller-switch-card,
.miller-escalation-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
  padding: 12px;
}

.miller-switch-card.active,
.miller-escalation-row:has(input:checked) {
  border-color: rgba(20, 121, 91, 0.2);
  background: #edf8f4;
}

.miller-switch-card.disabled {
  background: #fbfaf7;
  opacity: 0.68;
}

.miller-switch-card.disabled span,
.miller-switch-card.disabled small {
  color: var(--muted);
}

.miller-switch-card input,
.miller-escalation-row input {
  width: 17px;
  min-height: 17px;
  margin-top: 2px;
  accent-color: var(--green);
}

.miller-switch-card span,
.miller-switch-card small,
.miller-escalation-row span,
.miller-escalation-row small {
  display: block;
}

.miller-switch-card span,
.miller-escalation-row strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
}

.miller-switch-card small,
.miller-escalation-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.miller-availability-note {
  margin: 0;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  padding: 10px 12px;
}

.miller-ruleset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.miller-ruleset-grid label,
.miller-test-card label {
  display: grid;
  gap: 7px;
}

.miller-ruleset-form textarea,
.miller-test-card textarea,
.miller-knowledge-content textarea,
.miller-knowledge-row input,
.miller-knowledge-row select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.miller-ruleset-form textarea,
.miller-test-card textarea,
.miller-knowledge-content textarea {
  min-height: 110px;
  padding: 10px 12px;
  resize: vertical;
}

.miller-ruleset-wide {
  grid-column: 1 / -1;
}

.miller-settings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.miller-settings-actions span {
  color: var(--muted);
  font-size: 0.82rem;
}

.miller-knowledge-section {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.miller-knowledge-section h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
}

.miller-context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.miller-context-grid span {
  border: 1px solid rgba(20, 121, 91, 0.14);
  border-radius: var(--radius);
  background: #f6fbf8;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 0.84rem;
  line-height: 1.35;
}

.miller-hierarchy-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: miller-hierarchy;
}

.miller-hierarchy-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 3px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
  padding: 12px;
  counter-increment: miller-hierarchy;
}

.miller-hierarchy-list li::before {
  content: counter(miller-hierarchy);
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  grid-row: 1 / span 2;
  grid-column: 1;
  border-radius: 999px;
  background: #fff6df;
  color: #8a5c00;
  font-size: 0.78rem;
}

.miller-hierarchy-list strong,
.miller-hierarchy-list span {
  display: block;
}

.miller-hierarchy-list strong {
  grid-column: 2;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.2;
}

.miller-hierarchy-list span {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.miller-guardrail-list {
  display: grid;
  gap: 8px;
}

.miller-guardrail-list span {
  border: 1px solid rgba(200, 41, 30, 0.12);
  border-radius: var(--radius);
  background: #fff5f2;
  color: var(--ink);
  padding: 9px 10px;
  font-size: 0.82rem;
  line-height: 1.35;
}

.miller-knowledge-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
  padding: 10px;
}

.miller-knowledge-row input,
.miller-knowledge-row select {
  min-height: 36px;
  padding: 0 10px;
}

.miller-knowledge-row > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
  gap: 8px;
}

.miller-knowledge-content {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.miller-knowledge-content textarea {
  min-height: 96px;
  color: var(--ink);
  font-size: 0.86rem;
}

.miller-knowledge-row small,
.miller-test-response small {
  color: var(--muted);
  font-size: 0.76rem;
}

.miller-test-response {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background: #edf8f4;
  padding: 12px;
}

.miller-test-response h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

.miller-test-response p {
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.45;
}

.miller-test-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.miller-test-tags span {
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  padding: 5px 9px;
  font-size: 0.74rem;
}

.platform-submissions-panel {
  display: grid;
  gap: 14px;
}

.platform-submission-list {
  display: grid;
  gap: 12px;
}

.platform-submission-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: stretch;
  padding: 16px 16px 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(251, 250, 247, 0.88)),
    #fff;
  box-shadow: 0 10px 24px rgba(26, 22, 18, 0.04);
}

.platform-submission-card.feedback {
  border-left-color: var(--green);
}

.platform-submission-card.referral,
.platform-submission-card.advisor-referral,
.platform-submission-card.client-referral {
  border-left-color: var(--gold);
}

.platform-submission-card.reviewed {
  opacity: 0.72;
}

.platform-submission-main {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.platform-submission-heading,
.platform-submission-meta,
.platform-submission-details,
.platform-submission-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-submission-heading {
  justify-content: flex-start;
}

.platform-submission-heading span,
.platform-submission-heading small {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.platform-submission-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.03rem;
  font-weight: 500;
  line-height: 1.25;
}

.platform-submission-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.platform-submission-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 999px;
  background: rgba(251, 250, 247, 0.88);
  color: var(--muted);
  padding: 0 9px;
  font-size: 0.73rem;
}

.platform-submission-details {
  margin-top: 2px;
}

.platform-submission-details span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border: 1px solid rgba(20, 121, 91, 0.14);
  border-radius: 999px;
  background: #edf8f4;
  color: #315f51;
  padding: 0 9px;
  font-size: 0.76rem;
}

.platform-submission-actions {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  justify-items: stretch;
  min-width: 188px;
  gap: 8px;
}

.platform-submission-actions em {
  display: inline-flex;
  justify-content: center;
  min-height: 26px;
  align-items: center;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 999px;
  background: rgba(251, 250, 247, 0.95);
  color: var(--muted);
  font-size: 0.73rem;
  font-style: normal;
  text-align: center;
}

.platform-submission-actions .secondary-button {
  min-height: 38px;
  justify-content: center;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  width: min(560px, calc(100vw - 44px));
  padding: 14px 16px;
  border: 1px solid rgba(20, 121, 91, 0.22);
  border-radius: var(--radius);
  background: #edf8f4;
  color: var(--green);
  box-shadow: var(--shadow);
  font-weight: 500;
  line-height: 1.45;
}

@media (max-width: 1120px) {
  .opportunity-header-actions {
    justify-content: flex-start;
  }

  .opportunity-brief {
    grid-template-columns: 1fr;
  }

  .opportunity-scan-strip {
    justify-content: flex-start;
  }

  .metric-grid,
  .firm-dashboard-grid,
  .opportunity-metric-grid,
  .firm-miller-command-layout,
  .firm-team-summary,
  .firm-branding-summary,
  .platform-metric-grid,
  .platform-checklist,
  .crm-snapshot-grid,
  .three-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .firm-dashboard-layout,
  .firm-command-layout,
  .opportunity-command-layout,
  .platform-layout,
  .platform-data-section-grid,
  .data-layout,
  .firm-data-overview-layout,
  .firm-data-task-grid,
  .data-governance-card,
  .platform-owner-onboarding-body,
  .firm-branding-form,
  .brand-building-layout,
  .business-hub-layout {
    grid-template-columns: 1fr;
  }

  .platform-firm-detail-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .firm-miller-command-layout {
    grid-template-columns: 1fr;
  }

  .platform-summary-card,
  .platform-promotions-card {
    grid-column: auto;
  }

  .client-mode .metric-grid {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .platform-client-path-grid,
  .firm-brand-fields,
  .brand-building-summary-grid,
  .platform-billing-list,
  .brand-promotion-edit-grid,
  .brand-promotion-analytics-row,
  .brand-promotion-owner-panel,
  .brand-promotion-publisher-scope,
  .brand-promotion-publisher-scope-options,
  .brand-promotion-audience-options,
  .brand-promotion-tag-grid,
  .advisor-requirement-grid {
    grid-template-columns: 1fr;
  }

  .firm-brand-logo-field {
    grid-column: auto;
  }

  .goal-planner-shell {
    grid-template-columns: 1fr;
  }

  .saving-retirement-step-group .planning-tool-control-grid.retirement-income-source-grid,
  .saving-retirement-step-group .planning-tool-control-grid.retirement-income-assumption-grid,
  .saving-retirement-step-group .planning-tool-control-grid.retirement-income-factor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .planning-advisor-fee-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .firm-brand-preview-dual {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .goal-picker-grid {
    grid-template-columns: 1fr;
  }

  .saving-retirement-step-group .planning-tool-control-grid.retirement-income-source-grid,
  .saving-retirement-step-group .planning-tool-control-grid.retirement-income-assumption-grid,
  .saving-retirement-step-group .planning-tool-control-grid.retirement-income-factor-grid {
    grid-template-columns: 1fr;
  }

  .planning-advisor-fee-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding: 18px;
  }

  .brand {
    min-height: 54px;
  }

  .brand img {
    width: 190px;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-item {
    gap: 2px;
    justify-items: start;
    min-height: 54px;
  }

  .security-card {
    display: none;
  }

  .workspace {
    padding: 18px;
  }

  .topbar,
  .section-heading,
  .tax-estimates-card .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    padding-right: 0;
  }

  .onboarding-main,
  .onboarding-actions,
  .onboarding-bottom-actions,
  .advisor-onboarding-controls-header {
    align-items: stretch;
    flex-direction: column;
  }

  .platform-owner-grid.two,
  .platform-logo-upload-card,
  .platform-customization-header,
  .platform-customization-card,
  .platform-roadmap-add-form,
  .platform-firm-cleanup-grid,
  .platform-roadmap-card-grid {
    grid-template-columns: 1fr;
  }

  .platform-customization-header {
    display: grid;
  }

  .platform-customization-toggle {
    justify-self: start;
  }

  .platform-owner-onboarding-hero {
    flex-direction: column;
  }

  .platform-owner-steps {
    position: static;
  }

  .brand-promotion-form {
    position: static;
  }

  .brand-promotion-form-grid {
    grid-template-columns: 1fr;
  }

  .onboarding-profile-summary,
  .onboarding-progress,
  .onboarding-checklist,
  .onboarding-goal-picker {
    grid-template-columns: 1fr;
  }

  .onboarding-profile-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .onboarding-actions > div,
  .onboarding-bottom-actions > div,
  .onboarding-actions button,
  .onboarding-bottom-actions button {
    width: 100%;
  }

  .top-actions,
  .button-group {
    position: static;
    width: 100%;
  }

  .platform-support-access-card,
  .software-owner-access-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .platform-support-access-actions {
    min-width: 0;
    width: 100%;
  }

  .advisor-client-search {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .business-hub-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .business-hub-value-card {
    flex-basis: auto;
    text-align: left;
  }

  .mode-switch {
    flex: 1;
    width: 100%;
  }

  .tax-rate-form {
    width: 100%;
    margin-left: 0;
  }

  .metric-grid,
  .platform-metric-grid,
  .platform-owner-metric-grid,
  .platform-layout,
  .platform-form-grid,
  .platform-detail-grid,
  .platform-directory-toolbar,
  .platform-firm-cleanup-confirm,
  .platform-firm-cleanup-record,
  .task-workflow-toolbar,
  .task-window-panel,
  .task-window-controls,
  .task-row-top,
  .task-assignment-grid,
  .task-create-grid,
  .task-scheduled-row,
  .task-bulk-draft-row,
  .opportunity-card,
  .opportunity-signal-grid,
  .firm-member-form,
  .firm-planning-tools-default-card,
  .firm-team-row,
  .firm-team-row-main,
  .firm-team-editor-panel,
  .firm-team-fields-grid,
  .firm-member-access-fields,
  .firm-member-advisor-defaults-grid,
  .firm-advisor-contact-options,
  .platform-submission-card,
  .platform-client-recovery-card,
  .platform-client-reassignment-form,
  .platform-client-duplicate-row,
  .platform-client-duplicate-actions,
  .platform-client-recovery-summary,
  .platform-checklist,
  .client-invite-mode-grid,
  .client-invite-grid,
  .client-invite-routing-card,
  .client-invite-status-toggle,
  .account-layout,
  .net-worth-card-grid,
  .household-row,
  .firm-dashboard-layout,
  .firm-dashboard-grid,
  .tax-estimate-summary,
  .tax-quarter-fields,
  .business-hub-metrics,
  .business-hub-form-grid,
  .equity-dashboard,
  .equity-grant-grid,
  .crm-snapshot-grid,
  .crm-layout,
  .crm-work-grid,
  .crm-form-grid,
  .goal-planner-shell,
  .goal-progress-cards,
  .planning-path-options,
  .emergency-reserve-hero,
  .emergency-control-grid,
  .retirement-accumulator-hero,
  .retirement-accumulator-stats,
  .retirement-control-grid,
  .saving-retirement-hero,
  .saving-retirement-control-grid,
  .saving-retirement-money-grid,
  .other-goal-v4-heading-metrics,
  .unified-funding-grid,
  .unified-funding-add-grid,
  .saving-retirement-savings-inputs,
  .saving-retirement-savings-summary,
  .saving-retirement-account-controls,
  .saving-retirement-funding-hero,
  .saving-retirement-funding-breakdown,
  .child-saving-funding-add-grid,
  .child-saving-life-goal-chart-summary,
  .child-saving-detail-subgrid,
  .child-saving-path-snapshot,
  .saving-retirement-option-grid-wrap,
  .saving-retirement-option-grid,
  .saving-retirement-income-detail-grid,
  .saving-retirement-ltc-summary-grid,
  .saving-retirement-step-summary,
  .child-account-grid,
  .child-saving-purpose-grid,
  .child-saving-mini-grid.two,
  .child-saving-mini-grid.three,
  .child-saving-mini-grid.four,
  .child-saving-retirement-milestones,
  .child-saving-account-summary,
  .planning-tool-hero,
  .planning-tool-stats,
  .planning-tool-control-grid,
  .payoff-chart-story-row,
  .payoff-snapshot-grid,
  .payoff-possibility-top,
  .payoff-possibility-grid,
  .other-debt-snapshot-grid,
  .other-debt-target-grid,
  .other-debt-payment-equation,
  .other-debt-result-strip,
  .retirement-income-snapshot,
  .emergency-funding-grid,
  .goal-analysis-grid,
  .income-plan-stats,
  .retirement-income-chart-summary,
  .retirement-income-withdrawal-plan-heading,
  .retirement-income-withdrawal-grid,
  .payoff-plan-stats,
  .payoff-scenario-switch,
  .payoff-mini-grid,
  .income-bucket-grid,
  .ltc-summary-grid,
  .ltc-control-grid,
  .ltc-shock-detail,
  .withdrawal-strategy-summary,
  .locked-goal-client-panel,
  .goals-layout,
  .budgeting-layout,
  .budget-income-fields,
  .schedule-layout,
  .notes-layout,
  .vault-layout,
  .vault-summary-grid,
  .vault-workspace,
  .client-mode .client-overview-hero,
  .advisor-client-mode .client-overview-hero,
  .overview-side-bottom-grid,
  .overview-advisor-card.has-headshot,
  .customize-layout {
    grid-template-columns: 1fr;
  }

  .other-goal-v4-heading {
    display: grid;
  }

  .other-goal-v4-heading-metrics {
    min-width: 0;
    width: 100%;
  }

  .other-debt-card-heading,
  .other-debt-account-row {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .other-debt-card-heading {
    display: grid;
  }

  .other-debt-card-heading small,
  .other-debt-account-row span,
  .other-debt-account-row > div:last-child small {
    text-align: left;
  }

  .other-debt-payment-equation > span {
    display: none;
  }

  .customize-card,
  .advisor-contact-customization-card,
  .secure-vault-customization-card,
  .value-customization-card,
  .equity-customization-card {
    grid-column: 1 / -1;
  }

  .customize-card .panel-header {
    min-height: 0;
  }

  .child-saving-purpose-heading,
  .child-saving-purpose-detail-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .child-saving-purpose-heading small,
  .child-saving-purpose-detail-heading small {
    max-width: none;
    text-align: left;
  }

  .child-saving-detail-heading-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .saving-retirement-step-group.optional .saving-retirement-control-grid {
    grid-template-columns: 1fr;
  }

  .saving-retirement-step-group.goal .saving-retirement-control-grid {
    grid-template-columns: 1fr;
  }

  .saving-retirement-step-group.goal .planning-tool-control-grid.retirement-income-goal-grid {
    grid-template-columns: 1fr;
  }

  .saving-retirement-account-top,
  .saving-retirement-account-context,
  .saving-retirement-account-list-head,
  .saving-retirement-savings-panel-head,
  .unified-funding-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .saving-retirement-account-balance {
    text-align: left;
  }

  .unified-funding-section-head strong {
    text-align: left;
  }

  .saving-retirement-scenario-name-field,
  .saving-retirement-spending-field,
  .saving-retirement-tax-field {
    grid-column: auto;
  }

  .platform-client-reassignment-lookup {
    grid-column: auto;
  }

  .firm-member-address-field,
  .firm-planning-tools-default-card {
    grid-column: auto;
  }

  .task-create-detail {
    grid-column: auto;
  }

  .planning-path-header {
    flex-direction: column;
  }

  .emergency-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .emergency-section-heading small {
    text-align: left;
  }

  .emergency-target-card-head,
  .emergency-deadline-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .emergency-target-card-head strong,
  .emergency-deadline-heading strong {
    text-align: left;
  }

  .emergency-formula-grid {
    grid-template-columns: 1fr;
  }

  .emergency-formula-operator {
    justify-self: center;
  }

  .retirement-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .retirement-section-heading small {
    text-align: left;
  }

  .planning-tool-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .planning-tool-section-heading small {
    text-align: left;
  }

  .emergency-reserve-gauge {
    justify-self: start;
  }

  .retirement-accumulator-gauge {
    justify-self: start;
  }

  .saving-retirement-hero-gauge {
    justify-self: start;
  }

  .saving-retirement-card-heading,
  .saving-retirement-option-header,
  .retirement-income-scenario-switch-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .planning-tool-gauge {
    justify-self: start;
  }

  .task-row-actions {
    justify-content: flex-start;
  }

  .opportunity-card-side {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 14px;
  }

  .platform-firm-row {
    grid-template-columns: 1fr;
  }

  .firm-team-actions,
  .firm-member-badges,
  .firm-member-form-actions,
  .equity-grant-actions,
  .platform-firm-cleanup-record-stats,
  .platform-firm-cleanup-record-actions,
  .platform-submission-actions {
    justify-items: stretch;
    min-width: 0;
  }

  .platform-submission-actions em {
    justify-content: flex-start;
    padding: 0 10px;
    text-align: left;
  }

  .document-table .doc-row {
    grid-template-columns: 1fr;
  }

  .doc-row-actions {
    justify-content: flex-start;
  }

  .doc-delete-confirm {
    text-align: left;
  }

  .search-input {
    width: 100%;
    min-width: 0;
  }

  .vault-folder-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .vault-summary-latest {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .nav-list,
  .metric-grid,
  .platform-metric-grid,
  .data-metric-grid,
  .data-source-grid,
  .firm-data-overview-layout,
  .firm-data-task-grid,
  .data-boundary-grid,
  .firm-dashboard-grid,
  .opportunity-metric-grid,
  .firm-miller-status-grid,
  .firm-team-summary,
  .firm-branding-summary,
  .firm-snapshot-metric-list,
  .firm-snapshot-signal-grid,
  .tax-estimate-summary,
  .budget-tax-row,
  .three-col,
  .time-grid {
    grid-template-columns: 1fr;
  }

  .opportunity-brief {
    padding: 14px;
  }

  .opportunity-scan-strip,
  .opportunity-strip-item,
  .opportunity-toggle,
  .opportunity-toggle button {
    width: 100%;
  }

  .opportunity-toggle {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: var(--radius);
  }

  .opportunity-toggle button {
    justify-content: center;
  }

  .opportunity-card-top,
  .opportunity-list-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .firm-intelligence-dashboard .firm-data-secondary-grid {
    grid-template-columns: 1fr;
  }

  .retirement-income-combo-inputs {
    grid-template-columns: 1fr;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .value-customization-add-form {
    grid-template-columns: 1fr;
  }

  .customize-card .advisor-contact-options,
  .customize-card .equity-type-options,
  .customize-card .value-customization-list {
    grid-template-columns: 1fr;
  }

  .vault-browser-heading,
  .vault-document-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline-item,
  .crm-activity-item,
  .goal-row,
  .account-row,
  .goal-row-main,
  .goal-title-edit-form,
  .planner-step,
  .goal-assignment-edit-form,
  .assignment-edit-actions,
  .planner-settings-form,
  .planner-assignment-form,
  .planner-progress-values,
  .planning-path-option,
  .planner-account-row,
  .emergency-assignment-row,
  .emergency-assignment-form,
  .retirement-control-grid,
  .planning-tool-control-grid,
  .retirement-savings-header,
  .retirement-savings-stats,
  .retirement-contribution-buckets,
  .retirement-contribution-row,
  .retirement-contribution-form,
  .saving-retirement-account-row,
  .saving-retirement-account-summary,
  .saving-retirement-account-metrics,
  .saving-retirement-account-top,
  .saving-retirement-account-context,
  .saving-retirement-account-controls,
  .saving-retirement-account-list-head,
  .saving-retirement-savings-panel-head,
  .saving-retirement-control-grid,
  .saving-retirement-option-grid,
  .saving-retirement-income-detail-grid,
  .saving-retirement-savings-inputs,
  .saving-retirement-savings-summary,
  .retirement-income-snapshot,
  .income-plan-header,
  .income-plan-stats,
  .retirement-income-chart-summary,
  .retirement-income-withdrawal-plan-heading,
  .retirement-income-withdrawal-grid,
  .payoff-plan-stats,
  .payoff-account-row,
  .payoff-mini-grid,
  .income-lifecycle-labels,
  .income-bucket-grid,
  .ltc-summary-grid,
  .ltc-control-grid,
  .ltc-shock-detail,
  .ltc-start-field,
  .ltc-stage-row,
  .withdrawal-strategy-summary,
  .withdrawal-bucket-row,
  .withdrawal-account-heading,
  .withdrawal-account-row,
  .retirement-income-withdrawal-bucket-row,
  .retirement-income-withdrawal-account-row,
  .tax-bucket-compare-grid,
  .tax-bucket-panel .tax-bucket-layout,
  .tax-bucket-layout,
  .tax-bucket-row,
  .risk-tolerance-row,
  .donut-row,
  .access-row,
  .goal-assignment-form,
  .goal-edit-form,
  .goal-savings-assignment-form,
  .net-worth-item-row,
  .estate-planning-summary,
  .estate-planning-row,
  .net-worth-add-form,
  .estate-document-add-form,
  .net-worth-edit-form,
  .net-worth-edit-actions,
  .folder-create-row,
  .budget-row,
  .budget-summary,
  .split-input,
  .profile-grid,
  .kid-grid,
  .address-grid,
  .dob-age-field,
  .profile-security-grid {
    grid-template-columns: 1fr;
  }

  .retirement-income-withdrawal-account-row > div:last-child,
  .retirement-income-withdrawal-bucket-row strong,
  .retirement-income-withdrawal-bucket-row small {
    text-align: left;
  }

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

  .net-worth-drag-handle {
    justify-self: start;
  }

  .profile-contact-email-field {
    grid-column: auto;
  }

  .profile-security-section .profile-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-photo-card {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .profile-photo-actions {
    justify-content: flex-start;
  }

  .retirement-withdrawal-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .retirement-withdrawal-card p {
    text-align: left;
  }

  .retirement-savings-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .ltc-header-actions {
    flex-wrap: wrap;
  }

  .retirement-savings-total {
    min-width: 0;
    text-align: left;
  }

  .planning-path-target,
  .emergency-assignment-total {
    text-align: left;
  }

  .emergency-assignment-row > span {
    justify-self: start;
  }

  .retirement-accumulator-meter > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .planning-tool-meter > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-brand-feature {
    grid-template-columns: 1fr;
  }

  .client-brand-promo-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .client-brand-promo-actions {
    grid-column: 2;
    justify-items: stretch;
    width: min(100%, 220px);
    min-width: 0;
  }

  .client-brand-read-link,
  .client-brand-share-button {
    width: 100%;
  }

  .client-brand-promo-list a {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .client-brand-promo-list a span {
    grid-column: 1 / -1;
  }

  .goal-row-actions {
    justify-content: space-between;
    width: 100%;
  }

  .strategy-selector {
    width: 100%;
    min-width: 0;
  }

  .goal-progress-compact {
    flex: 1;
    grid-template-columns: auto minmax(72px, 1fr);
    min-width: 0;
  }

  .chat-message {
    max-width: 100%;
  }
}

@media (max-width: 980px) {
  .integration-tab-row,
  .integration-summary-grid,
  .integration-field-grid.two,
  .integration-field-grid.three {
    grid-template-columns: 1fr;
  }

  .current-client-setup-card {
    align-items: stretch;
    flex-direction: column;
  }

  .current-client-actions {
    justify-content: flex-start;
  }
}
