:root {
  --forest: #1f5d3a;
  --forest-dark: #17482d;
  --forest-soft: #f1f7f2;
  --ink: #17201a;
  --muted: #738078;
  --line: #e7ece8;
  --line-strong: #d7e4dc;
  --panel: #ffffff;
  --page: #f8faf8;
  --red: #bc2f3a;
  --green: #18864f;
  --amber: #a77516;
  --shadow: 0 16px 40px rgba(20, 42, 29, 0.08);
  --shadow-soft: 0 1px 2px rgba(20, 42, 29, 0.06);
  --shadow-lift: 0 14px 34px rgba(20, 42, 29, 0.1);
  --asset-accent-soft: #f1f7f2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.35;
}

button,
input,
select,
textarea {
  font: inherit;
  min-width: 0;
}

button {
  cursor: pointer;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:not(:disabled):hover,
button:not(:disabled):focus-visible,
[role="button"]:not([aria-disabled="true"]):hover,
[role="button"]:not([aria-disabled="true"]):focus-visible,
a[href]:hover,
a[href]:focus-visible,
summary:hover,
summary:focus-visible {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(31, 93, 58, 0.1);
}

[role="button"],
a[href],
summary,
select:not(:disabled),
input[type="checkbox"]:not(:disabled),
input[type="radio"]:not(:disabled),
input[type="file"]:not(:disabled),
input[type="date"]:not(:disabled),
.drawer-overlay,
.clickable-card,
.quote-card,
.metric-info-button,
.scenario-preset,
.settings-tab-button,
.mini-stat-button,
.family-asset-category-card,
.family-asset-type-button,
.family-protection-layer-review-button,
.family-protection-count-button,
.family-beneficiary-card {
  cursor: pointer;
}

.family-management-drawer-backdrop,
.family-slide-drawer-backdrop,
.family-asset-management-drawer-backdrop,
.family-document-upload-drawer-backdrop {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled,
[aria-disabled="true"],
.is-disabled {
  cursor: not-allowed;
}

a[href]:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
  outline: none;
}

input[type="file"] {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

textarea {
  min-height: 44px;
  resize: vertical;
}

.is-hidden {
  display: none !important;
}

.auth-loading-view {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px;
  background: #f6f7fb;
}

.auth-loading-panel {
  width: min(440px, 100%);
  padding: 40px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(30, 41, 59, 0.12);
}

.auth-loading-panel h1 {
  margin: 8px 0 12px;
}

.auth-loading-panel p {
  color: var(--muted);
}

.auth-loading-mark {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: #4f46e5;
  font-size: 24px;
  font-weight: 800;
}

.auth-loading-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  margin-top: 12px;
  border: 3px solid #dfe3ef;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: auth-loading-spin 0.8s linear infinite;
}

@keyframes auth-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.login-view {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px;
  background: #ffffff;
}

.login-panel {
  width: min(440px, 100%);
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.brand-mark {
  display: grid;
  position: relative;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(145deg, var(--forest), var(--forest-dark));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.brand-mark::before {
  content: "$";
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 21px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-panel h1,
.topbar h1,
.panel h2,
.drawer-header h2 {
  margin: 0;
}

.login-panel h1 {
  margin-top: 18px;
  font-size: 42px;
}

.login-copy {
  margin: 10px 0 28px;
  color: var(--muted);
}

.login-form,
.council-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input[type="date"] {
  cursor: pointer;
  color-scheme: light;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  width: 18px;
  height: 18px;
  cursor: pointer;
  opacity: 0.75;
}

input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="date"]:focus::-webkit-calendar-picker-indicator {
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px var(--forest-soft);
}

input:user-invalid,
select:user-invalid,
textarea:user-invalid {
  border-color: #efd2d5;
}

.login-form button,
.council-form button {
  border: 1px solid var(--forest);
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  background: var(--forest);
  font-weight: 800;
}

.login-form button:hover,
.login-form button:focus-visible,
.council-form button:hover,
.council-form button:focus-visible {
  border-color: var(--forest-dark);
  background: var(--forest-dark);
  box-shadow: 0 0 0 3px var(--forest-soft);
}

.council-form button {
  font-size: 13px;
  white-space: nowrap;
}

.form-error {
  min-height: 20px;
  color: var(--red);
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 280px 1fr;
  align-items: start;
  background: #fff;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  min-height: 100vh;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #fff;
}

.sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.sidebar-brand-main {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 12px;
  align-items: center;
}

.sidebar-brand-main > div:last-child {
  min-width: 0;
}

.sidebar-brand strong {
  display: block;
}

.settings-icon-button {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  color: var(--forest);
  background: #fff;
  cursor: pointer;
}

.settings-icon-button span,
.settings-icon-button::before,
.settings-icon-button::after {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.settings-icon-button span {
  box-shadow: 0 0 0 currentColor;
}

.settings-icon-button::before,
.settings-icon-button::after {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.settings-icon-button::before {
  top: 12px;
}

.settings-icon-button::after {
  bottom: 12px;
}

.settings-icon-button:hover,
.settings-icon-button:focus-visible,
.settings-icon-button.is-active {
  border-color: var(--forest);
  color: var(--forest);
  background: var(--forest-soft);
}

.sidebar-brand span,
.sidebar-footer span,
.muted {
  color: var(--muted);
}

.market-session-indicator {
  display: inline-flex;
  max-width: 100%;
  gap: 5px;
  align-items: center;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.market-session-indicator strong,
.market-session-indicator small {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.market-session-indicator strong {
  font-weight: 850;
}

.market-session-indicator small {
  overflow: hidden;
  max-width: 78px;
  text-overflow: ellipsis;
}

.market-session-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 13%, transparent);
}

.market-session-indicator.is-open {
  border-color: #b9dbc9;
  color: var(--green);
  background: #eef8f2;
}

.market-session-indicator.is-closed,
.market-session-indicator.is-unavailable {
  border-color: #f0cfd3;
  color: var(--red);
  background: #fff5f6;
}

.market-session-indicator.is-pre-market,
.market-session-indicator.is-after-hours,
.market-session-indicator.is-loading {
  border-color: #ead9b8;
  color: var(--amber);
  background: #fff9ed;
}

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

.nav-item {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-weight: 750;
  white-space: nowrap;
}

.nav-item:hover,
.nav-item:focus-visible {
  border-color: var(--line-strong);
  color: var(--forest);
  background: #fbfdfb;
}

.nav-item.is-active {
  border-color: #dbe8df;
  color: var(--forest);
  background: var(--forest-soft);
}

.nav-item.family-asset-entry {
  color: #8f4f2e;
}

.nav-item.family-asset-entry:hover,
.nav-item.family-asset-entry:focus-visible {
  border-color: #d7b99d;
  color: #8f4f2e;
  background: #fbefe4;
}

.panel-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.app-shell.family-mode .sidebar {
  border-right-color: #d7e4f2;
}

.app-shell.family-mode .sidebar-brand {
  border-bottom-color: #d7e4f2;
}

.app-shell.family-mode .investor-dashboard-button {
  flex: 1;
  width: auto;
  min-width: 0;
}

.investor-dashboard-button {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0;
  color: var(--forest);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.investor-dashboard-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.investor-dashboard-copy strong {
  color: var(--forest);
  font-size: 16px;
  line-height: 1.15;
}

.investor-dashboard-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.investor-dashboard-button .button-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.investor-dashboard-button .button-brand-mark::before {
  font-size: 24px;
}

.investor-dashboard-button .button-brand-mark::after {
  width: 21px;
  height: 28px;
}

.investor-dashboard-button:hover,
.investor-dashboard-button:focus-visible {
  color: var(--forest-dark);
  background: transparent;
}

.family-nav-list .nav-item.is-active {
  border-color: #d7e4f2;
  color: #1f4f86;
  background: #f1f6fb;
}

.app-shell.family-mode .avatar {
  background: #1f4f86;
}

.app-shell.family-mode .family-asset-top-button,
.app-shell.family-mode .global-research-top-button {
  display: none;
}

.app-shell.family-mode .topbar-status-stack,
.app-shell.family-mode .alerts-top-button,
.app-shell.family-mode .usage-top-button {
  display: none;
}

.sidebar-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: auto;
  padding: 18px 24px;
  border-top: 1px solid var(--line);
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--forest);
  font-weight: 800;
}

#logout-button {
  display: block;
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

#logout-button:hover,
#logout-button:focus-visible {
  color: var(--forest);
}

.workspace {
  min-width: 0;
  padding: 28px 34px 40px;
  background: #fff;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.topbar-left {
  min-width: 0;
}

.topbar-center {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding-top: 10px;
}

.topbar-status-stack {
  display: grid;
  gap: 5px;
  justify-items: center;
}

.topbar h1 {
  font-size: 34px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.page-subtitle {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.35;
}

.topbar-actions {
  display: grid;
  gap: 7px;
  justify-items: end;
  justify-self: end;
  padding-top: 8px;
}

.provider-status,
.panel-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.provider-status {
  max-width: 230px;
  padding: 5px 9px;
  font-size: 10px;
  text-align: center;
  white-space: normal;
}

.provider-status.is-ready {
  border-color: #cde3d4;
  color: var(--forest);
  background: var(--forest-soft);
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.status-pill.is-ready {
  border-color: #cde3d4;
  color: var(--forest);
  background: var(--forest-soft);
}

.status-pill.is-risk {
  border-color: #efd2d5;
  color: var(--red);
  background: #fff7f7;
}

.ghost-button {
  min-height: 34px;
  border: 1px solid var(--forest);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--forest);
  background: #fff;
  font-weight: 800;
  line-height: 1.2;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: var(--forest-dark);
  color: #fff;
  background: var(--forest);
  box-shadow: 0 0 0 3px var(--forest-soft);
}

.ghost-button:disabled {
  cursor: not-allowed;
  border-color: var(--line);
  color: var(--muted);
  background: #f8faf8;
  box-shadow: none;
  transform: none;
}

.alerts-top-button,
.usage-top-button,
.global-research-top-button {
  width: 96px;
  min-width: 96px;
  height: 34px;
  min-height: 34px;
  padding: 8px 10px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alerts-top-button {
  position: relative;
}

.api-health-indicator {
  display: inline-flex;
  max-width: 180px;
  gap: 5px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cde3d4;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--forest);
  background: var(--forest-soft);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.api-health-indicator small {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  text-overflow: ellipsis;
}

.api-health-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 13%, transparent);
}

.api-health-indicator.is-disconnected {
  border-color: #f0cfd3;
  color: var(--red);
  background: #fff5f6;
}

.api-health-indicator.is-loading,
.api-health-indicator.is-unavailable {
  border-color: #ead9b8;
  color: var(--amber);
  background: #fff9ed;
}

.global-research-top-button {
  position: relative;
  border-color: var(--forest);
  color: var(--forest);
}

.global-research-top-button:hover,
.global-research-top-button:focus-visible {
  color: #fff;
  border-color: var(--forest-dark);
  background: var(--forest);
  box-shadow: 0 0 0 3px var(--forest-soft);
}

.alerts-top-button.has-alerts {
  border-color: #bd2431;
  color: #bd2431;
  background: #fff4f5;
  box-shadow: 0 0 0 3px rgba(189, 36, 49, 0.08);
}

.alerts-top-button.has-alerts:hover,
.alerts-top-button.has-alerts:focus-visible {
  color: #fff;
  background: #bd2431;
  box-shadow: 0 0 0 3px rgba(189, 36, 49, 0.16);
}

.alerts-count-badge {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  margin-left: 7px;
  place-items: center;
  border-radius: 999px;
  padding: 0 6px;
  color: #fff;
  background: #bd2431;
  font-size: 11px;
  line-height: 1;
}

.alerts-top-button.has-alerts:hover .alerts-count-badge,
.alerts-top-button.has-alerts:focus-visible .alerts-count-badge {
  color: #bd2431;
  background: #fff;
}

.paloist-mobile-demo-top-button,
.paloist-full-mobile-top-button {
  display: none;
}

.app-shell.family-mode .paloist-mobile-demo-top-button,
.app-shell.family-mode .paloist-full-mobile-top-button {
  display: inline-flex;
}

.app-shell.family-mode .paloist-mobile-demo-top-button.is-active,
.app-shell.family-mode .paloist-full-mobile-top-button.is-active {
  color: var(--paloist-paper);
  border-color: var(--paloist-copper);
  background: var(--paloist-copper);
}

.council-top-button {
  font-size: 11px;
  white-space: nowrap;
}

.family-asset-top-button.is-active {
  color: #fff;
  border-color: #1f4f86;
  background: #1f4f86;
}

.asset-council-button {
  border-color: #1f4f86;
  color: #1f4f86;
}

.success-banner {
  margin-bottom: 14px;
  border: 1px solid #cde3d4;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--forest);
  background: var(--forest-soft);
  font-size: 13px;
  font-weight: 800;
}

.view-section {
  min-width: 0;
}

#family-asset-iq-view,
.council-drawer.asset-council-theme {
  --forest: #1f4f86;
  --forest-dark: #173b64;
  --forest-soft: #f1f6fb;
  --asset-accent-soft: #f1f6fb;
  --asset-accent-line: #d7e4f2;
  --asset-accent-dash: #c6daef;
  --asset-accent-shadow: rgba(31, 79, 134, 0.1);
  --asset-accent-shadow-strong: rgba(31, 79, 134, 0.14);
}

#family-asset-iq-view .primary-metric {
  border-color: var(--asset-accent-dash);
}

#family-asset-iq-view .success-banner {
  border-color: var(--asset-accent-line);
}

.app-shell.family-mode .topbar .eyebrow {
  color: #1f4f86;
}

.app-shell.wealth-studio-preview {
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 248, 0.98)),
    #fbfaf7;
}

.app-shell.wealth-studio-preview .sidebar {
  top: 28px;
  height: calc(100vh - 56px);
  min-height: calc(100vh - 56px);
  overflow-y: auto;
  border: 1px solid #dfe7e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 46px rgba(20, 42, 29, 0.07);
}

.app-shell.wealth-studio-preview .sidebar-brand {
  align-items: flex-start;
  border-bottom: 0;
  padding: 28px 28px 18px;
}

.app-shell.wealth-studio-preview .brand-mark {
  width: 50px;
  height: 50px;
}

.app-shell.wealth-studio-preview .brand-mark::before {
  font-size: 29px;
}

.app-shell.wealth-studio-preview .sidebar-brand strong {
  color: var(--ink);
  font-size: 29px;
  line-height: 1;
}

.app-shell.wealth-studio-preview .sidebar-brand span {
  font-size: 12px;
  font-weight: 850;
}

.app-shell.wealth-studio-preview .market-session-indicator {
  margin-top: 9px;
  font-size: 11px;
}

.app-shell.wealth-studio-preview .market-session-indicator strong,
.app-shell.wealth-studio-preview .market-session-indicator small,
.app-shell.wealth-studio-preview .market-session-indicator span {
  color: inherit;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.app-shell.wealth-studio-preview .market-session-indicator .market-session-dot {
  width: 8px;
  height: 8px;
}

.app-shell.wealth-studio-preview .settings-icon-button {
  width: 36px;
  height: 36px;
  margin-top: 7px;
  border-color: #d8e5dd;
  background: #fbfdfb;
}

.app-shell.wealth-studio-preview .nav-list {
  gap: 12px;
  padding: 24px 26px;
}

.app-shell.wealth-studio-preview .nav-item {
  border-color: transparent;
  border-radius: 8px;
  padding: 12px 14px;
  color: #69766f;
  background: transparent;
  font-size: 15px;
  font-weight: 850;
}

.app-shell.wealth-studio-preview .nav-item:hover,
.app-shell.wealth-studio-preview .nav-item:focus-visible {
  border-color: #d7e4dc;
  color: var(--forest);
  background: #f7fbf8;
}

.app-shell.wealth-studio-preview .nav-item.is-active {
  border-color: #bfd8c7;
  color: var(--forest);
  background: #eef7f1;
  box-shadow: inset 0 0 0 1px rgba(31, 93, 58, 0.03);
}

.app-shell.wealth-studio-preview .nav-item.family-asset-entry {
  color: #1f4f86;
}

.app-shell.wealth-studio-preview .sidebar-footer {
  margin: auto 26px 26px;
  border: 1px solid #dfe7e1;
  border-radius: 8px;
  padding: 13px;
  background: #f7fbf8;
}

.app-shell.wealth-studio-preview .workspace {
  padding: 34px 24px 48px;
  background: transparent;
}

.app-shell.wealth-studio-preview .topbar {
  grid-template-columns: minmax(0, 1fr) auto minmax(220px, auto);
  margin-bottom: 22px;
}

.app-shell.wealth-studio-preview .topbar .eyebrow {
  margin-bottom: 8px;
}

.app-shell.wealth-studio-preview .topbar h1 {
  color: #142019;
  font-size: 56px;
  line-height: 0.98;
}

.app-shell.wealth-studio-preview .page-subtitle {
  color: #7d817c;
  font-size: 19px;
}

.app-shell.wealth-studio-preview .ghost-button {
  min-height: 42px;
  border-width: 1px;
  border-radius: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(20, 42, 29, 0.04);
}

.app-shell.wealth-studio-preview .provider-status {
  border-color: #cfe2d4;
  background: rgba(241, 247, 242, 0.82);
}

.app-shell.wealth-studio-preview .metrics-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 26px;
}

.app-shell.wealth-studio-preview .metric-panel,
.app-shell.wealth-studio-preview .panel {
  border-color: #dfe7e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(20, 42, 29, 0.065);
}

.app-shell.wealth-studio-preview .metric-panel {
  min-height: 148px;
  padding: 26px;
}

.app-shell.wealth-studio-preview .metric-panel span {
  font-size: 15px;
  font-weight: 900;
}

.app-shell.wealth-studio-preview .metric-panel strong {
  margin: 16px 0 6px;
  font-size: 38px;
  letter-spacing: 0;
}

.app-shell.wealth-studio-preview .metric-panel small {
  color: #7d817c;
  font-size: 15px;
}

.app-shell.wealth-studio-preview .primary-metric {
  background: rgba(255, 255, 255, 0.92);
}

.app-shell.wealth-dashboard-preview #dashboard-view .dashboard-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.95fr);
  gap: 26px;
}

.app-shell.wealth-dashboard-preview #dashboard-view .dashboard-grid > .panel {
  order: 20;
}

.app-shell.wealth-dashboard-preview #dashboard-view .ibkr-live-panel {
  order: 1;
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 28px rgba(20, 42, 29, 0.045);
}

.app-shell.wealth-dashboard-preview #dashboard-view .market-panel {
  order: 2;
  grid-column: 1 / -1;
}

.app-shell.wealth-dashboard-preview #dashboard-view .recommendation-panel {
  order: 3;
  grid-column: span 1;
  min-height: 370px;
}

.app-shell.wealth-dashboard-preview #dashboard-view .trend-panel {
  order: 4;
  grid-column: 1 / -1;
}

.app-shell.wealth-dashboard-preview #dashboard-view .news-panel {
  order: 5;
}

.app-shell.wealth-studio-preview .panel {
  padding: 24px;
}

.app-shell.wealth-studio-preview .panel-header h2,
.app-shell.wealth-studio-preview .paper-dashboard-section-header h3 {
  color: #142019;
  font-size: 27px;
  line-height: 1.1;
}

.app-shell.wealth-studio-preview .panel-header {
  margin-bottom: 20px;
}

.app-shell.wealth-dashboard-preview .trend-chart {
  min-height: 290px;
}

.app-shell.wealth-dashboard-preview .trend-intelligence svg {
  min-height: 235px;
}

.app-shell.wealth-dashboard-preview .trend-insight-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-shell.wealth-dashboard-preview .advisor-note {
  border: 1px solid #dfe7e1;
  border-left: 0;
  border-radius: 8px;
  padding: 16px 18px;
  background: #f3f8f4;
}

.app-shell.wealth-dashboard-preview .market-cards {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 12px;
}

.app-shell.wealth-dashboard-preview .market-index-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-shell.wealth-dashboard-preview .market-index-card,
.app-shell.wealth-dashboard-preview .quote-card {
  border-color: #d8e5dd;
  background: #f3f8f4;
}

.app-shell.wealth-dashboard-preview .quote-card {
  display: grid;
  align-content: space-between;
  min-height: 112px;
  padding: 14px;
}

.app-shell.wealth-dashboard-preview .quote-card footer {
  display: none;
}

.app-shell.wealth-dashboard-preview .quote-price-row {
  margin-top: 10px;
}

.app-shell.wealth-dashboard-preview .quote-price-row em {
  font-size: 19px;
}

.app-shell.wealth-dashboard-preview .quote-price-row b {
  font-size: 14px;
}

.view-grid {
  display: grid;
  gap: 16px;
}

.view-card,
.scenario-card {
  padding: 18px;
}

.scenario-lab-header {
  padding: 18px;
}

.view-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  color: var(--muted);
  background: linear-gradient(180deg, #fff 0%, #fbfcfb 100%);
  text-align: left;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
}

.empty-state p {
  margin: 0;
}

.empty-state.error-state {
  border-style: solid;
  border-color: #efd2d5;
  background: #fffafa;
}

.empty-state.error-state strong {
  color: var(--red);
}

.empty-state.error-state small,
.inline-error small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.inline-error {
  border: 1px solid #efd2d5;
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: #fffafa;
}

.inline-error strong {
  display: block;
  margin-bottom: 6px;
  color: var(--red);
}

.inline-error p {
  margin: 0;
  line-height: 1.45;
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

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

.metric-panel {
  padding: 18px;
}

.metric-panel span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.metric-panel strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 27px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.primary-metric {
  border-color: #cfe2d4;
  background: linear-gradient(180deg, #fff, var(--forest-soft));
}

.metric-panel small {
  color: var(--muted);
}

.metric-panel-with-action {
  position: relative;
}

.metric-panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric-panel-title-row span {
  min-width: 0;
}

.metric-info-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--forest);
  background: var(--forest-soft);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.metric-info-button:hover,
.metric-info-button:focus-visible,
.metric-info-button[aria-expanded="true"] {
  border-color: var(--forest);
  color: #fff;
  background: var(--forest);
  box-shadow: 0 0 0 3px rgba(31, 93, 58, 0.12);
}

.metric-popover {
  position: absolute;
  z-index: 40;
  top: 46px;
  right: 12px;
  width: min(336px, calc(100vw - 40px));
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lift);
}

.metric-popover-header,
.metric-popover-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-popover-header strong {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.metric-popover-header span,
.metric-popover-axis span,
.metric-popover-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.metric-popover-chart {
  margin-top: 10px;
}

.metric-popover-chart svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbf8);
}

.metric-popover-line {
  fill: none;
  stroke: var(--forest);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-popover-zero-line {
  stroke: #dfe7e1;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.metric-popover-point {
  fill: var(--forest);
  stroke: #fff;
  stroke-width: 1.5;
}

.metric-popover-axis {
  margin-top: 4px;
}

.metric-popover-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.metric-popover-stats span,
.metric-popover-empty-chart {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #f8fbf8;
}

.metric-popover-stats small,
.metric-popover-stats b {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.metric-popover-stats small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.metric-popover-stats b {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.15;
}

.metric-popover-note {
  margin: 10px 0 0;
  line-height: 1.35;
}

.metric-popover-note.is-risk {
  color: var(--red);
}

.metric-popover-empty-chart {
  display: grid;
  min-height: 84px;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 18px;
}

.panel {
  min-width: 0;
  padding: 18px;
}

.panel,
.metric-panel,
.mini-stat,
.ibkr-live-stat,
.ibkr-live-status,
.quote-card,
.advisor-note,
.trade-card,
.approval-order-card,
.approval-audit-event,
.paper-position-card,
.paper-trade-row,
.settings-status-row,
.settings-assignment-row,
.capability-row,
.family-asset-category-card,
.family-asset-type-button,
.family-asset-document-row,
.family-asset-card,
.family-asset-compact-row,
.family-document-row,
.family-document-card,
.family-beneficiary-card,
.family-inheritance-asset-row,
.family-estate-asset-row,
.family-estate-analysis-card,
.family-insurance-asset-row,
.family-insurance-analysis-card,
.family-setting-row,
.family-planning-checklist > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.panel > *,
.metric-panel > *,
.quote-card > *,
.family-document-card > *,
.family-asset-card > * {
  min-width: 0;
}

.trend-panel,
.market-panel {
  grid-column: 1 / -1;
}

.recommendation-panel {
  grid-column: span 1;
}

.ibkr-live-panel {
  grid-column: 1 / -1;
  border-color: #cfe2d4;
  background: linear-gradient(180deg, #fff, #fbfdfb);
}

.ibkr-live-account-panel {
  display: grid;
  gap: 14px;
}

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

.ibkr-live-stat,
.ibkr-live-status {
  border: 1px solid #dbe8df;
  border-radius: 8px;
  background: #fff;
}

.ibkr-live-stat {
  padding: 13px;
}

.ibkr-live-stat span,
.ibkr-live-stat small,
.ibkr-live-status span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ibkr-live-stat strong {
  display: block;
  margin: 6px 0 3px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.ibkr-live-footer {
  display: grid;
  grid-template-columns: minmax(245px, 0.9fr) minmax(210px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.ibkr-live-status {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--forest-soft);
}

.ibkr-live-status.is-risk {
  border-color: #efd2d5;
  background: #fff7f7;
}

.market-driver-tile {
  min-width: 0;
  padding: 10px 12px;
  border-color: #cfe2d4;
  background: linear-gradient(180deg, #fbfdfb, #f3faf5);
}

.market-driver-tile.is-muted {
  border-color: #e2e8e3;
  background: #fbfcfb;
}

.market-driver-tile.is-cautious {
  border-color: #f0d8d8;
  background: linear-gradient(180deg, #fffafa, #fff4f4);
}

.market-driver-tile.is-watchful {
  border-color: #ead9b8;
  background: linear-gradient(180deg, #fffdf8, #fff8e8);
}

.market-driver-tile .market-driver-eyebrow,
.market-driver-tile small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.market-driver-tile .market-driver-confidence {
  display: block;
  color: var(--forest);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.market-driver-tile .market-driver-explanation {
  margin: 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.market-driver-tile small {
  margin-top: 2px;
  font-weight: 700;
  text-transform: none;
}

.ibkr-live-status strong {
  color: var(--forest);
}

.ibkr-live-status .live-order-symbols {
  margin-top: 3px;
  color: var(--ink);
  font-weight: 800;
}

.ibkr-live-status.is-risk strong {
  color: var(--red);
}

.live-submit-button {
  border-color: #b7d5bf;
  color: var(--forest);
  background: var(--forest-soft);
}

.live-submit-button:hover:not(:disabled),
.live-submit-button:focus-visible:not(:disabled) {
  background: var(--forest);
  color: #fff;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-header-three-way {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.panel-header-center-action {
  justify-self: center;
}

.panel-header-end-action {
  justify-self: end;
}

.panel-action-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.panel h2 {
  font-size: 20px;
  line-height: 1.2;
}

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

.mini-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.mini-stat span,
.mini-stat small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.mini-stat strong {
  display: block;
  margin: 6px 0 3px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.mini-stat.is-positive span,
.mini-stat.is-positive strong,
.mini-stat.is-positive small {
  color: var(--green);
}

.mini-stat.is-negative span,
.mini-stat.is-negative strong,
.mini-stat.is-negative small {
  color: var(--red);
}

.scenario-lab-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
}

.scenario-goals-panel {
  grid-column: 1 / -1;
}

.scenario-goal-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.scenario-goal-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  border: 1px solid #dfe9e2;
  border-radius: 8px;
  padding: 13px;
  background: linear-gradient(180deg, #fff, #fbfdfb);
  overflow-wrap: anywhere;
}

.scenario-goal-card.is-primary {
  border-color: #b7d5bf;
  box-shadow: inset 0 0 0 1px rgba(45, 95, 63, 0.12);
}

.scenario-goal-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.scenario-goal-card-header span,
.scenario-goal-card-header strong,
.scenario-goal-card-header em {
  display: block;
}

.scenario-goal-card-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.scenario-goal-card-header strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.scenario-goal-card-header em {
  flex: 0 0 auto;
  border: 1px solid #dbe8df;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--forest);
  background: var(--forest-soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.scenario-goal-card-header em.is-risk {
  border-color: #efd2d5;
  color: var(--red);
  background: #fff7f7;
}

.scenario-goal-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.scenario-control-panel,
.scenario-result-panel {
  align-self: start;
}

.scenario-result-panel.is-loading {
  border-color: #cfe2d4;
  box-shadow: inset 0 0 0 1px #e3f0e6;
}

.scenario-control-list {
  display: grid;
  gap: 16px;
}

.scenario-control {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
}

.scenario-control:last-child {
  border-bottom: 0;
}

.scenario-control-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.scenario-control-header label {
  color: var(--ink);
  font-weight: 800;
}

.scenario-control-header strong {
  color: var(--forest);
  white-space: nowrap;
}

.scenario-control-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(148px, 170px);
  align-items: center;
  gap: 12px;
}

.scenario-control input[type="range"] {
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #e5eee8;
  accent-color: var(--forest);
}

.scenario-manual-input {
  display: grid;
  grid-template-columns: minmax(64px, 1fr) auto;
  align-items: center;
  gap: 6px;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 7px 9px;
  background: #fff;
}

.scenario-manual-input:focus-within {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(45, 95, 63, 0.1);
}

.scenario-manual-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 800;
  outline: none;
}

.scenario-manual-input span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.scenario-control small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.scenario-preset-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.scenario-preset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.scenario-preset:hover {
  border-color: #cfe2d4;
  background: var(--forest-soft);
}

.scenario-preset strong,
.scenario-preset span {
  display: block;
}

.scenario-preset span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.compact-button {
  padding: 7px 10px;
  font-size: 12px;
}

.scenario-impact {
  margin-bottom: 14px;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 16px;
  background: var(--forest-soft);
}

.scenario-impact strong,
.scenario-impact span {
  display: block;
}

.scenario-impact strong {
  color: var(--forest);
  font-size: 34px;
}

.scenario-impact span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.scenario-result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scenario-assumption-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.scenario-assumption {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
}

.scenario-assumption span,
.scenario-assumption strong {
  display: block;
}

.scenario-assumption span {
  color: var(--muted);
  font-size: 12px;
}

.scenario-assumption strong {
  margin-top: 4px;
  color: var(--ink);
}

.trend-chart {
  min-height: 280px;
}

.trend-chart svg {
  display: block;
  width: 100%;
  height: 218px;
}

.chart-empty {
  display: grid;
  min-height: 240px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfb;
}

.trend-intelligence {
  display: grid;
  gap: 10px;
}

.trend-chart-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 7px 9px;
  background: #fbfdfb;
  box-shadow: 0 8px 18px rgba(31, 93, 58, 0.06);
}

.trend-chart-key-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.trend-chart-key-item i {
  width: 26px;
  height: 0;
  border-top: 3px solid var(--key-color, var(--forest));
  border-radius: 999px;
}

.trend-chart-key-item i.is-dashed {
  border-top-style: dashed;
}

.trend-chart-key-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.trend-insight-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.trend-insight-card {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.trend-insight-card.is-ready {
  border-color: #bddbc6;
  background: var(--forest-soft);
}

.trend-insight-card.is-risk {
  border-color: #efd2d5;
  background: #fff7f7;
}

.trend-insight-card span,
.trend-insight-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.trend-insight-card strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.trend-insight-card.is-ready strong {
  color: var(--forest);
}

.trend-insight-card.is-risk strong {
  color: var(--red);
}

.trend-insight-card .trend-driver-list {
  display: grid;
  gap: 3px;
  font-size: 14px;
  line-height: 1.15;
}

.trend-driver-list span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.trend-driver-list b,
.trend-driver-list em {
  min-width: 0;
  font-style: normal;
  overflow-wrap: anywhere;
}

.market-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.market-index-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.market-index-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #d5e5dc;
  border-radius: 8px;
  padding: 12px;
  background: var(--forest-soft);
}

.market-index-card span,
.market-index-card em,
.market-index-card small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: normal;
}

.market-index-card small {
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.market-index-card span {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 950;
  line-height: 1.05;
}

.market-index-card strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.1;
  white-space: nowrap;
}

.market-index-card em.quote-positive {
  color: #167a48;
}

.market-index-card em.quote-negative {
  color: #b42318;
}

.quote-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.quote-card header,
.quote-card footer,
.quote-price-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.quote-card:hover {
  border-color: #cde3d4;
  background: #fff;
  box-shadow: 0 0 0 3px var(--forest-soft);
}

.quote-card header > div,
.quote-card footer > div,
.quote-price-row > div {
  min-width: 0;
}

.quote-card header > div:first-child {
  flex: 1 1 auto;
}

.quote-card-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: flex-end;
  max-width: 50%;
}

.quote-card header small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  text-align: right;
}

.quote-detail-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #dbe8df;
  border-radius: 999px;
  color: var(--forest);
  background: var(--forest-soft);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.quote-detail-button:hover,
.quote-detail-button:focus-visible {
  border-color: var(--forest);
  background: #fff;
}

.quote-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.quote-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-card em {
  display: block;
  color: var(--forest);
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.quote-card em.quote-unavailable {
  color: var(--muted);
}

.quote-price-row {
  margin-top: 10px;
}

.quote-price-row b {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.quote-price-row b.quote-positive {
  color: #167a48;
}

.quote-price-row b.quote-negative {
  color: #b42318;
}

.quote-card footer {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.news-panel {
  grid-column: span 1;
}

.dashboard-news-list {
  min-height: 220px;
}

.news-status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.news-status-row span {
  color: var(--forest);
  font-weight: 800;
}

.news-scroll {
  display: grid;
  max-height: 360px;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.news-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.news-item div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.news-item div span {
  color: var(--forest);
  font-weight: 800;
}

.news-item a {
  display: block;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.news-item a:hover {
  color: var(--forest);
}

.news-item p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.allocation-bars,
.holding-list,
.recommendation-list,
.ai-status-panel {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 7px;
}

.bar-row header,
.holding-row,
.provider-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.allocation-symbols {
  display: block;
  margin-top: -2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #eef2ef;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--forest);
}

.allocation-source-note {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.holding-row,
.provider-row {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.holding-row:last-child,
.provider-row:last-child {
  border-bottom: 0;
}

.holding-row span,
.provider-row span {
  color: var(--muted);
  font-size: 12px;
}

.advisor-note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--forest);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.advisor-note.full-note {
  padding: 16px;
}

.advisor-note.is-risk {
  border-left-color: var(--red);
}

.advisor-note.is-risk strong,
.risk-text {
  color: var(--red);
}

.positive-text {
  color: var(--green);
}

.success-text {
  color: var(--green);
  font-weight: 800;
}

.advisor-note p {
  margin: 8px 0 0;
  color: var(--muted);
}

.council-review-hero {
  border-color: #dbe8df;
}

.council-filter-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

.council-checkbox-filter {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
}

.council-checkbox-filter input {
  width: auto;
}

.council-review-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.council-review-counts span,
.council-session-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.council-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.council-session-list,
.council-action-note-list {
  display: grid;
  gap: 14px;
}

.council-session-card,
.council-action-note-card {
  border-left: 3px solid var(--line);
}

.council-session-card.is-pinned,
.council-action-note-card.is-pinned {
  border-left-color: var(--forest);
  box-shadow: 0 14px 34px rgba(31, 93, 58, 0.08);
}

.council-session-header,
.council-note-header,
.council-card-footer,
.council-session-actions,
.council-session-meta {
  display: flex;
  gap: 10px;
}

.council-session-header,
.council-note-header {
  justify-content: space-between;
  align-items: flex-start;
}

.council-session-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.council-session-meta {
  flex-wrap: wrap;
  margin: 12px 0;
}

.council-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.council-insight-list {
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 12px;
  background: var(--forest-soft);
}

.council-insight-list.is-risk {
  border-color: #efd2d5;
  background: #fff7f7;
}

.council-insight-list.is-risk strong,
.council-insight-list.is-risk li {
  color: var(--red);
}

.council-insight-list strong {
  display: block;
  margin-bottom: 8px;
}

.council-insight-list ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.council-session-controls {
  display: grid;
  grid-template-columns: minmax(160px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
}

.council-card-footer {
  flex-wrap: wrap;
  margin-top: 12px;
}

.council-action-notes-panel {
  position: sticky;
  top: 18px;
}

.council-action-note-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.council-note-header input {
  margin-top: 4px;
  padding: 8px 10px;
  font-weight: 800;
}

.council-action-note-card textarea,
.council-session-controls textarea {
  resize: vertical;
}

.rebalance-hero {
  border-color: #dbe8df;
}

.rebalance-source-strip,
.rebalance-target-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.rebalance-target-form {
  display: grid;
  gap: 14px;
}

.rebalance-target-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.rebalance-target-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rebalance-target-grid input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.rebalance-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.rebalance-allocation-list,
.rebalance-drift-list,
.rebalance-move-list,
.rebalance-note-list {
  display: grid;
  gap: 12px;
}

.rebalance-allocation-row {
  display: grid;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.rebalance-allocation-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.rebalance-allocation-row header,
.rebalance-drift-row,
.rebalance-move-meta,
.rebalance-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.rebalance-allocation-row small,
.rebalance-drift-row span,
.rebalance-drift-row em,
.rebalance-move p,
.rebalance-move-meta span,
.rebalance-note span {
  color: var(--muted);
  font-size: 12px;
}

.rebalance-drift-row {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.rebalance-drift-row.is-actionable {
  border-color: #ead7a8;
  background: #fffaf0;
}

.rebalance-drift-row.is-major-drift {
  border-color: #efd2d5;
  background: #fff7f7;
}

.rebalance-drift-row.is-watch-drift > div:first-child strong,
.rebalance-drift-row.is-watch-drift .rebalance-drift-metrics strong,
.rebalance-drift-row.is-watch-drift .rebalance-drift-metrics em,
.rebalance-move.is-watch-drift strong,
.rebalance-move.is-watch-drift .rebalance-move-meta span:first-child {
  color: #9a6700;
}

.rebalance-drift-row strong,
.rebalance-drift-row span {
  display: block;
}

.rebalance-drift-row.is-major-drift > div:first-child strong,
.rebalance-drift-row.is-major-drift .rebalance-drift-metrics strong,
.rebalance-drift-row.is-major-drift .rebalance-drift-metrics em {
  color: var(--red);
}

.rebalance-drift-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, auto));
  gap: 12px;
  align-items: center;
  text-align: right;
}

.rebalance-drift-metrics strong,
.rebalance-drift-metrics em {
  color: var(--forest);
  font-style: normal;
}

.rebalance-move {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--forest);
  border-radius: 8px;
  padding: 13px;
}

.rebalance-move.is-actionable {
  border-left-color: #9a6700;
  background: #fffaf0;
}

.rebalance-move.is-major-drift {
  border-left-color: var(--red);
  background: #fff7f7;
}

.rebalance-move p {
  margin: 0;
  line-height: 1.45;
}

.rebalance-move.is-major-drift strong,
.rebalance-move.is-major-drift .rebalance-move-meta span:first-child {
  color: var(--red);
}

.rebalance-position-list {
  display: grid;
  gap: 8px;
}

.rebalance-position-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) repeat(3, minmax(90px, 0.6fr));
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.rebalance-position-row strong,
.rebalance-position-row span {
  display: block;
  min-width: 0;
}

.rebalance-position-row > span {
  text-align: right;
  font-weight: 800;
}

.rebalance-position-row div span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.rebalance-note {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.rebalance-note:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.rebalance-note strong {
  min-width: 120px;
}

.health-hero {
  border-color: #dbe8df;
}

.health-hero-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.health-score-card {
  display: grid;
  align-content: center;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 18px;
  background: var(--forest-soft);
}

.health-score-card span,
.health-score-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.health-score-card strong {
  display: block;
  margin: 8px 0;
  color: var(--forest);
  font-size: 54px;
  line-height: 1;
}

.health-progress {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.health-progress-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #eef2ef;
}

.health-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--forest);
}

.health-progress span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.health-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.health-gap-card {
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 16px;
  background: var(--forest-soft);
}

.health-gap-card.is-risk {
  border-color: #efd2d5;
  background: #fff7f7;
}

.health-gap-card span,
.health-gap-card p {
  color: var(--muted);
}

.health-gap-card span {
  font-size: 12px;
  font-weight: 800;
}

.health-gap-card strong {
  display: block;
  margin: 6px 0;
  color: var(--forest);
  font-size: 34px;
}

.health-gap-card.is-risk strong {
  color: var(--red);
}

.health-gap-card p {
  margin: 0;
  line-height: 1.45;
}

.health-two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.projection-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.projection-path {
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 14px;
  background: var(--forest-soft);
}

.projection-path.is-risk {
  border-color: #efd2d5;
  background: #fff7f7;
}

.projection-path span,
.projection-path small,
.projection-path em,
.projection-path strong {
  display: block;
}

.projection-path span,
.projection-path small,
.projection-path em {
  color: var(--muted);
  font-size: 12px;
}

.projection-path strong {
  margin: 8px 0 4px;
  color: var(--forest);
  font-size: 24px;
}

.projection-path.is-risk strong,
.projection-path.is-risk em {
  color: var(--red);
}

.projection-path em {
  margin-top: 8px;
  font-style: normal;
  font-weight: 800;
}

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

.health-risk-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.health-risk-row {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.health-risk-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.health-risk-row span {
  color: var(--muted);
  font-size: 13px;
}

.health-risk-row.is-risk strong,
.health-risk-row.is-risk span {
  color: var(--red);
}

.health-council-summary {
  display: grid;
  gap: 12px;
}

.health-council-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.health-council-summary ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.trades-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.trades-overview {
  border-color: #dbe8df;
}

.trade-position-panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.trade-position-title-block {
  min-width: 0;
}

.trade-position-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.trade-position-title-row h2 {
  margin: 0;
}

.trade-position-cash-badge {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 7px;
  align-items: baseline;
  border: 1px solid #bfd8c7;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--forest);
  background: #f2f8f4;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.trade-position-cash-badge small,
.trade-position-cash-badge strong {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.trade-position-cash-badge strong {
  font-weight: 900;
}

.trade-position-cash-badge.is-muted {
  border-color: var(--line);
  color: var(--muted);
  background: #f8faf8;
}

.trade-position-header-center {
  justify-self: center;
}

.trade-position-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.trade-position-header-actions small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.trade-position-refresh-button {
  border-color: #bfd8c7;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.9);
}

.trade-position-refresh-button:hover,
.trade-position-refresh-button:focus-visible {
  border-color: var(--forest);
  color: #fff;
  background: var(--forest);
}

.trade-position-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 12px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.trade-position-card,
.trade-position-empty {
  min-width: 0;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  background: rgba(245, 250, 246, 0.92);
  box-shadow: inset 0 0 0 1px rgba(31, 93, 58, 0.025);
}

.trade-position-card {
  display: grid;
  gap: 9px;
  padding: 11px;
  align-content: start;
}

.trade-position-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.trade-position-card header div,
.trade-position-meta {
  min-width: 0;
}

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

.trade-position-card header strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.05;
}

.trade-position-card header span,
.trade-position-meta span,
.trade-position-empty span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.trade-position-research-button {
  flex: 0 0 auto;
  align-self: start;
  border: 1px solid #bfd8c7;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.trade-position-research-button:hover,
.trade-position-research-button:focus-visible {
  border-color: var(--forest);
  color: #fff;
  background: var(--forest);
  outline: none;
}

.trade-position-owned-value {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(191, 216, 199, 0.82);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.trade-position-owned-value span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.trade-position-owned-value strong {
  min-width: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.trade-position-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(219, 232, 223, 0.9);
  padding-top: 8px;
}

.trade-position-meta strong {
  color: var(--ink);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.trade-position-meta strong.positive-text {
  color: var(--green);
}

.trade-position-meta strong.risk-text {
  color: var(--red);
}

.trade-position-empty {
  display: grid;
  gap: 5px;
  padding: 13px;
}

.trade-position-empty strong {
  color: var(--ink);
}

.paper-owned-dashboard {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.paper-owned-dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.paper-owned-dashboard-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.paper-owned-stock-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px;
  max-height: 282px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.paper-owned-stock-card {
  position: relative;
  gap: 8px;
  padding: 10px;
  background: rgba(246, 250, 247, 0.94);
}

.paper-owned-stock-card.scott-pick {
  border-color: #c8decf;
  box-shadow:
    inset 4px 0 0 rgba(31, 93, 58, 0.72),
    inset 0 0 0 1px rgba(31, 93, 58, 0.03);
}

.paper-owned-stock-card.council-pick {
  border-color: #c7d6ed;
  background: rgba(247, 250, 255, 0.96);
  box-shadow:
    inset 4px 0 0 rgba(36, 79, 141, 0.7),
    inset 0 0 0 1px rgba(36, 79, 141, 0.03);
}

.paper-owned-stock-card header {
  align-items: flex-start;
}

.paper-owned-stock-card header .paper-source-pill {
  flex: 0 0 auto;
  padding: 4px 7px;
  font-size: 10px;
}

.paper-owned-card-actions {
  display: grid;
}

.paper-owned-card-actions .trade-position-research-button {
  justify-self: stretch;
  text-align: center;
}

.paper-owned-stock-card .trade-position-owned-value {
  padding: 7px;
}

.paper-owned-stock-card .trade-position-owned-value strong {
  font-size: 18px;
}

.paper-owned-stock-card .trade-position-meta {
  padding-top: 7px;
}

.paper-owned-stock-card .trade-position-meta strong {
  white-space: normal;
  overflow-wrap: anywhere;
}

.paper-dashboard-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.paper-dashboard-kpi-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(31, 93, 58, 0.02);
}

.paper-dashboard-kpi-card span,
.paper-dashboard-kpi-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.paper-dashboard-kpi-card strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.paper-dashboard-kpi-card strong.positive-text,
.paper-dashboard-benchmark-pairs strong.positive-text {
  color: var(--green);
}

.paper-dashboard-kpi-card strong.risk-text,
.paper-dashboard-benchmark-pairs strong.risk-text {
  color: var(--red);
}

.paper-dashboard-benchmark-pairs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.paper-dashboard-benchmark-pairs span {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(219, 232, 223, 0.92);
  border-radius: 7px;
  padding: 6px;
  background: rgba(246, 250, 247, 0.86);
}

.paper-dashboard-benchmark-pairs b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.paper-dashboard-benchmark-pairs strong {
  font-size: 15px;
}

.trade-list,
.trade-safety-list {
  display: grid;
  gap: 12px;
}

.trade-side-column,
.trade-ai-panel {
  display: grid;
  gap: 16px;
}

.trade-ai-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.trade-ai-button {
  width: 100%;
}

.trade-ai-response {
  min-height: 128px;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 13px;
  background: #fbfcfb;
}

.trade-ai-response p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
  white-space: pre-wrap;
}

.trade-ai-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.trade-ai-meta span,
.trade-ai-meta strong {
  color: var(--muted);
  font-size: 12px;
}

.trade-ai-meta strong {
  color: var(--forest);
}

.trade-card {
  display: grid;
  gap: 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--forest);
  border-radius: 8px;
  padding: 15px;
  background: #fff;
}

.trade-card header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.trade-card h3,
.trade-card p {
  margin: 0;
}

.trade-card h3 {
  font-size: 21px;
}

.trade-card header span,
.trade-card p {
  color: var(--muted);
  line-height: 1.45;
}

.trade-card-status {
  text-align: right;
}

.trade-card-status strong,
.trade-card-status span,
.trade-card-title {
  display: block;
}

.trade-card-status strong {
  color: var(--forest);
}

.trade-card-status span {
  margin-top: 4px;
  font-size: 12px;
}

.trade-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.trade-card-actions .ghost-button {
  min-height: 38px;
}

.trade-card-title {
  color: var(--ink);
  font-size: 16px;
}

.trade-risk-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--red);
  font-size: 13px;
  line-height: 1.45;
}

.trade-next-step {
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 12px;
  background: var(--forest-soft);
}

.trade-next-step span,
.trade-next-step strong {
  display: block;
}

.trade-next-step span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.trade-next-step strong {
  margin-top: 4px;
  color: var(--forest);
}

.trade-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.trade-meta {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.trade-meta span,
.trade-meta strong {
  display: block;
}

.trade-meta span {
  color: var(--muted);
  font-size: 12px;
}

.trade-meta strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
}

.trade-safety-panel {
  display: grid;
  gap: 16px;
}

.trade-safety-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.trade-safety-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.trade-safety-item > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: var(--forest);
  background: var(--forest-soft);
  font-size: 12px;
  font-weight: 900;
}

.trade-safety-item strong {
  display: block;
}

.trade-safety-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.approval-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.approval-form,
.approval-order-list,
.approval-audit-list {
  display: grid;
  gap: 12px;
}

.approval-form input,
.approval-form select,
.approval-form textarea {
  padding: 10px;
}

.approval-order-card,
.approval-audit-event {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.approval-order-card {
  border-left: 3px solid var(--line);
}

.approval-order-card.is-selected {
  border-left-color: var(--forest);
  background: #fbfcfb;
}

.approval-order-card header,
.approval-safety-header,
.approval-action-row,
.approval-audit-event > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.approval-order-card header > div,
.approval-audit-event > div > div {
  min-width: 0;
}

.approval-order-card h3,
.approval-order-card p,
.approval-audit-event p {
  margin: 0;
  overflow-wrap: anywhere;
}

.approval-order-card h3 {
  font-size: 22px;
}

.approval-order-card header span:not(.status-pill),
.approval-audit-event span,
.approval-audit-event p,
.approval-audit-event em {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.approval-audit-event em {
  display: block;
  margin-top: 4px;
  font-style: normal;
}

.approval-safety {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfb;
}

.approval-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.approval-check {
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 8px;
  background: var(--forest-soft);
}

.approval-check.is-risk {
  border-color: #efd2d5;
  background: #fff7f7;
}

.approval-check span,
.approval-check strong {
  display: block;
}

.approval-check span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.approval-check.is-risk span,
.approval-check.is-risk strong {
  color: var(--red);
}

.approval-check strong {
  margin-top: 3px;
  color: var(--forest);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.approval-action-row {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.danger-button {
  border-color: #efd2d5;
  color: var(--red);
}

.danger-button:hover:not(:disabled),
.danger-button:focus-visible:not(:disabled) {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
  box-shadow: 0 0 0 3px #fff0f1;
}

.broker-status {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 10px;
  background: var(--forest-soft);
}

.broker-status.is-risk {
  border-color: #efd2d5;
  background: #fff7f7;
}

.broker-status strong {
  color: var(--forest);
}

.broker-status.is-risk strong {
  color: var(--red);
}

.broker-status span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.audit-selected-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.paper-hero {
  border-color: #dbe8df;
}

#paper-trading-content {
  gap: 12px;
}

.paper-dashboard-panel {
  display: grid;
  gap: 14px;
}

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

.paper-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(480px, 1.05fr);
  gap: 14px;
  align-items: start;
}

.paper-dashboard-summary,
.paper-benchmark-dashboard {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.paper-dashboard-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.approval-order-section {
  display: grid;
  gap: 10px;
}

.approval-order-section + .approval-order-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.approval-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.approval-section-header small {
  text-transform: none;
}

.paper-dashboard-stat-grid .mini-stat {
  padding: 11px;
}

.paper-dashboard-stat-grid .mini-stat strong {
  font-size: 18px;
}

.paper-dashboard-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.paper-dashboard-section-header h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.paper-benchmark-dashboard .paper-benchmark-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.paper-benchmark-dashboard .paper-benchmark-card {
  gap: 8px;
  padding: 10px;
}

.paper-benchmark-dashboard .paper-benchmark-values {
  gap: 6px;
}

.paper-benchmark-dashboard .paper-benchmark-values .trade-meta {
  padding: 7px;
}

.paper-benchmark-dashboard .paper-benchmark-values .trade-meta strong {
  font-size: 12px;
}

.paper-benchmark-dashboard .paper-benchmark-verdict {
  padding: 7px 8px;
}

.paper-benchmark-dashboard .paper-benchmark-verdict span {
  font-size: 11px;
}

.paper-dashboard-panel .view-copy,
.paper-benchmark-dashboard .paper-thesis {
  margin: 0;
}

.paper-source-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.paper-source-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid #d7e4da;
  border-radius: 999px;
  color: var(--muted);
  background: #f7faf7;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.paper-source-pill.scott-pick {
  border-color: #d8e4dc;
  color: var(--forest);
  background: #f1f7f2;
}

.paper-source-pill.council-pick {
  border-color: #c7d6ed;
  color: #244f8d;
  background: #f0f5fc;
}

.paper-advisor-panel {
  display: grid;
  gap: 12px;
  border-color: #c7d6ed;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9fd 100%);
}

.paper-advisor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.paper-advisor-meta span {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid #dce8f6;
  border-radius: 999px;
  color: #5d6d7e;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.paper-advisor-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.paper-advisor-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #d6e3f3;
  border-radius: 8px;
  background: #fff;
}

.paper-advisor-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.paper-advisor-card header > div {
  min-width: 0;
}

.paper-advisor-card h3,
.paper-advisor-card p {
  margin: 0;
}

.paper-advisor-card h3 {
  margin-top: 7px;
  font-size: 22px;
  line-height: 1.05;
}

.paper-advisor-card header p,
.paper-advisor-card .paper-thesis {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.paper-advisor-card header strong {
  flex: 0 0 auto;
  color: var(--forest);
  font-size: 18px;
}

.paper-advisor-share-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 0.42fr);
  gap: 10px;
  align-items: center;
  border: 1px solid #e0ebf6;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--muted);
  background: #f8fbff;
  font-size: 12px;
  font-weight: 800;
}

.paper-advisor-share-edit input {
  min-width: 0;
  width: 100%;
  border: 1px solid #cfe0f2;
  border-radius: 8px;
  padding: 8px 9px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  text-align: right;
}

.paper-advisor-share-edit input:focus {
  outline: 2px solid rgba(31, 93, 58, 0.18);
  border-color: var(--forest);
}

.paper-advisor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.paper-dashboard-panel > .panel-header,
.paper-layout .panel-header,
.paper-positions-grid .panel-header {
  margin-bottom: 12px;
}

.paper-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 12px;
  align-items: start;
}

.paper-main-stack {
  display: grid;
  gap: 12px;
}

.paper-positions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.paper-active-grid {
  align-items: stretch;
}

.paper-trade-form,
.paper-position-list,
.paper-trade-list {
  display: grid;
  gap: 10px;
}

.paper-trade-form {
  position: relative;
}

.form-row.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.paper-trade-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.paper-trade-form input,
.paper-trade-form select,
.paper-trade-form textarea {
  position: relative;
  z-index: 1;
  padding: 10px;
  pointer-events: auto;
}

.paper-symbol-field input {
  text-transform: uppercase;
}

.paper-form-actions {
  display: flex;
  justify-content: flex-start;
}

.paper-position-card,
.paper-trade-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.paper-position-card {
  display: grid;
  gap: 12px;
  border-left: 3px solid var(--forest);
}

.paper-closed-position-card {
  border-left-color: #a5b4a8;
}

.paper-position-card header,
.paper-trade-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.paper-position-card header > div,
.paper-trade-row > div {
  min-width: 0;
}

.paper-position-card h3,
.paper-position-card p,
.paper-trade-row p {
  margin: 0;
}

.paper-position-card h3 {
  font-size: 22px;
  overflow-wrap: anywhere;
}

.paper-position-card header span,
.paper-position-footer,
.paper-thesis,
.paper-trade-row span,
.paper-trade-row p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.paper-position-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.paper-position-footer strong:not(.risk-text):not(.positive-text) {
  color: var(--forest);
}

.paper-trade-row {
  align-items: flex-start;
  grid-template-columns: minmax(0, 1fr) auto;
}

.paper-trade-row strong,
.paper-trade-row span {
  display: block;
}

.paper-trade-row > div {
  min-width: 0;
}

.paper-trade-row span {
  margin-top: 4px;
}

.paper-trade-row p {
  margin-top: 8px;
}

.paper-trade-delete-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-color: #f2cbd0;
  color: var(--red);
  background: #fff8f8;
  cursor: pointer;
  pointer-events: auto;
}

.paper-trade-delete-button:hover,
.paper-trade-delete-button:focus-visible {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

.paper-trade-delete-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.paper-timeline-panel,
.paper-tags-panel {
  min-width: 0;
}

.paper-timeline-chart {
  height: 180px;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfcfb 0%, #fff 100%);
  overflow: hidden;
}

.paper-timeline-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.paper-timeline-chart line {
  stroke: #d8ded8;
  stroke-width: 1;
}

.paper-timeline-chart .paper-timeline-axis-line {
  stroke: #cdd8cf;
}

.paper-timeline-axis-label line {
  stroke: #cdd8cf;
}

.paper-timeline-axis-label text {
  fill: var(--muted);
  font-size: 4px;
  font-weight: 800;
}

.paper-timeline-chart polyline {
  fill: none;
  stroke: var(--forest);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.paper-timeline-chart circle {
  fill: var(--forest);
}

.paper-timeline-meta,
.paper-benchmark-list {
  display: grid;
  gap: 8px;
}

.paper-timeline-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.paper-benchmark-list {
  grid-template-columns: 1fr;
  gap: 12px;
}

.paper-benchmark-summary {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfb;
}

.paper-benchmark-summary span,
.paper-benchmark-summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.paper-benchmark-card {
  display: grid;
  grid-template-columns: minmax(56px, 0.45fr) minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 12px;
  background: var(--forest-soft);
  min-width: 0;
}

.paper-benchmark-card.is-beating {
  border-color: #b9d9c3;
  background: #f3faf5;
}

.paper-benchmark-card.is-lagging {
  border-color: #f1c5ca;
  background: #fff8f8;
}

.paper-benchmark-card.is-waiting {
  background: #fbfcfb;
}

.paper-benchmark-card-header {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.paper-benchmark-symbol,
.paper-benchmark-return {
  white-space: nowrap;
}

.paper-benchmark-return {
  text-align: left;
}

.paper-benchmark-return.is-positive {
  color: var(--forest);
}

.paper-benchmark-return.is-negative {
  color: var(--red);
}

.paper-benchmark-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.paper-benchmark-values .trade-meta {
  min-width: 0;
  max-width: 100%;
  padding: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.paper-benchmark-values .trade-meta span,
.paper-benchmark-values .trade-meta strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.paper-benchmark-values .trade-meta span {
  white-space: normal;
}

.paper-benchmark-values .trade-meta strong {
  font-size: 13px;
  line-height: 1.15;
}

.paper-benchmark-verdict {
  grid-column: 1 / -1;
  border-left: 3px solid #b9d9c3;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  align-self: stretch;
}

.paper-benchmark-card.is-lagging .paper-benchmark-verdict {
  border-left-color: var(--red);
}

.paper-benchmark-card.is-waiting .paper-benchmark-verdict {
  border-left-color: #d8ded8;
}

.paper-benchmark-verdict strong,
.paper-benchmark-verdict span {
  display: block;
}

.paper-benchmark-verdict span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.paper-benchmark-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.paper-tag-cloud,
.paper-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.paper-tag-cloud span,
.paper-tag-list span {
  border: 1px solid #dbe8df;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--forest-soft);
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
}

.paper-tag-list {
  margin-top: 2px;
}

.paper-trade-row .paper-tag-list {
  margin-top: 10px;
}

.app-shell.wealth-paper-preview #paper-trading-content {
  gap: 28px;
}

.app-shell.wealth-paper-preview .paper-dashboard-panel {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.app-shell.wealth-paper-preview .paper-dashboard-panel > .panel-header {
  margin-bottom: 24px;
}

.app-shell.wealth-paper-preview .paper-dashboard-summary {
  gap: 14px;
}

.app-shell.wealth-paper-preview .paper-dashboard-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.app-shell.wealth-paper-preview .paper-dashboard-stat-grid .mini-stat {
  min-height: 148px;
  padding: 26px;
  border-color: #dfe7e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(20, 42, 29, 0.065);
}

.app-shell.wealth-paper-preview .paper-dashboard-stat-grid .mini-stat span {
  font-size: 15px;
  font-weight: 900;
}

.app-shell.wealth-paper-preview .paper-dashboard-stat-grid .mini-stat strong {
  margin: 16px 0 6px;
  font-size: 38px;
  line-height: 1.05;
}

.app-shell.wealth-paper-preview .paper-dashboard-stat-grid .mini-stat small {
  font-size: 15px;
}

.paper-studio-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.85fr);
  gap: 26px;
  align-items: stretch;
}

.app-shell.wealth-paper-preview .paper-benchmark-dashboard,
.app-shell.wealth-paper-preview .paper-timeline-panel,
.app-shell.wealth-paper-preview .paper-advisor-panel,
.app-shell.wealth-paper-preview .paper-positions-grid > .panel,
.app-shell.wealth-paper-preview .paper-layout > .panel,
.app-shell.wealth-paper-preview .paper-realized-results-panel {
  border-color: #dfe7e1;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(20, 42, 29, 0.065);
}

.app-shell.wealth-paper-preview .paper-benchmark-dashboard,
.app-shell.wealth-paper-preview .paper-timeline-panel {
  min-height: 320px;
}

.app-shell.wealth-paper-preview .paper-advisor-panel {
  box-shadow: 0 16px 36px rgba(36, 79, 141, 0.055);
}

.app-shell.wealth-paper-preview .paper-benchmark-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.app-shell.wealth-paper-preview .paper-benchmark-card {
  grid-template-columns: 1fr;
  gap: 12px;
  border-color: #cfe2d4;
  background: #f3f8f4;
}

.app-shell.wealth-paper-preview .paper-benchmark-card-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.app-shell.wealth-paper-preview .paper-benchmark-return {
  font-size: 23px;
}

.app-shell.wealth-paper-preview .paper-benchmark-values {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-shell.wealth-paper-preview .paper-timeline-chart {
  height: 210px;
  border-color: #edf1ee;
  background: #fff;
}

.app-shell.wealth-paper-preview .paper-timeline-meta {
  display: none;
}

.app-shell.wealth-paper-preview .paper-positions-grid {
  gap: 26px;
}

.app-shell.wealth-paper-preview .paper-position-card,
.app-shell.wealth-paper-preview .paper-trade-row {
  border-color: #dfe7e1;
  background: #f3f8f4;
}

.app-shell.wealth-paper-preview .paper-position-card {
  border-left-color: transparent;
}

.app-shell.wealth-paper-preview .paper-trade-row {
  align-items: center;
  padding: 14px 18px;
}

.app-shell.wealth-paper-preview .paper-trade-row > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(110px, 0.8fr) minmax(100px, auto);
  gap: 12px;
  align-items: center;
}

.app-shell.wealth-paper-preview .paper-trade-row p,
.app-shell.wealth-paper-preview .paper-trade-row .paper-tag-list {
  grid-column: 1 / -1;
}

.app-shell.wealth-paper-preview .paper-layout.paper-utility-grid {
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 26px;
}

.app-shell.wealth-paper-preview .paper-realized-results-panel {
  margin-top: 0;
}

.app-shell.wealth-studio-preview .workspace {
  padding: 22px 16px 34px;
}

.app-shell.wealth-studio-preview .topbar {
  gap: 14px;
  margin-bottom: 14px;
}

.app-shell.wealth-studio-preview .topbar h1 {
  font-size: 39px;
  line-height: 1.02;
}

.app-shell.wealth-studio-preview .page-subtitle {
  max-width: 660px;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.3;
}

.app-shell.wealth-studio-preview .ghost-button {
  min-height: 34px;
  padding: 7px 12px;
  box-shadow: 0 6px 14px rgba(20, 42, 29, 0.035);
}

.app-shell.wealth-studio-preview .ghost-button:hover,
.app-shell.wealth-studio-preview .ghost-button:focus-visible {
  border-color: var(--forest-dark);
  color: #fff;
  background: var(--forest);
  box-shadow: 0 0 0 3px var(--forest-soft);
}

.app-shell.wealth-studio-preview .ghost-button:disabled {
  border-color: var(--line);
  color: var(--muted);
  background: #f8faf8;
  box-shadow: none;
}

.app-shell.wealth-studio-preview .topbar-center,
.app-shell.wealth-studio-preview .topbar-actions {
  padding-top: 4px;
}

.app-shell.wealth-studio-preview .metrics-grid,
.app-shell.wealth-paper-preview .paper-dashboard-stat-grid {
  gap: 14px;
  margin-bottom: 16px;
}

.app-shell.wealth-studio-preview .metric-panel,
.app-shell.wealth-paper-preview .paper-dashboard-stat-grid .mini-stat {
  min-height: 100px;
  padding: 17px;
  box-shadow: 0 10px 24px rgba(20, 42, 29, 0.052);
}

.app-shell.wealth-dashboard-preview #dashboard-view .metrics-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel {
  min-height: 68px;
  padding: 10px 12px;
}

.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel > span,
.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel-title-row span {
  font-size: 11px;
  line-height: 1.15;
}

.app-shell.wealth-studio-preview .metric-panel span,
.app-shell.wealth-paper-preview .paper-dashboard-stat-grid .mini-stat span {
  font-size: 12px;
}

.app-shell.wealth-studio-preview .metric-panel strong,
.app-shell.wealth-paper-preview .paper-dashboard-stat-grid .mini-stat strong {
  margin: 9px 0 3px;
  font-size: 26px;
  line-height: 1.08;
}

.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel strong {
  margin: 5px 0 2px;
  font-size: 20px;
}

.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel strong.metric-compact-value {
  font-size: 15px;
  line-height: 1.2;
}

.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel strong.metric-performer-list {
  display: grid;
  gap: 2px;
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.15;
}

.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel .metric-performer-row {
  display: grid;
  grid-template-columns: minmax(34px, 0.8fr) minmax(48px, 0.9fr) minmax(58px, 1fr);
  gap: 5px;
  align-items: baseline;
  min-width: 0;
  white-space: nowrap;
}

.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel .metric-performer-symbol,
.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel .metric-performer-percent,
.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel .metric-performer-dollar {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel .metric-performer-symbol,
.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel .metric-performer-dollar {
  font-weight: 900;
}

.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel .metric-performer-percent {
  color: var(--muted);
  font-weight: 800;
}

.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel .metric-performer-dollar.positive-text {
  color: var(--green);
}

.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel .metric-performer-dollar.risk-text {
  color: var(--red);
}

.app-shell.wealth-studio-preview .metric-panel small,
.app-shell.wealth-paper-preview .paper-dashboard-stat-grid .mini-stat small {
  font-size: 12px;
}

.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel small {
  font-size: 11px;
  line-height: 1.2;
}

.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel small.metric-multiline-detail {
  display: block;
  line-height: 1.25;
  white-space: normal;
}

.app-shell.wealth-dashboard-preview #dashboard-view .metric-panel small.metric-empty-detail {
  display: none;
}

.app-shell.wealth-studio-preview .panel,
.app-shell.wealth-paper-preview .paper-benchmark-dashboard,
.app-shell.wealth-paper-preview .paper-timeline-panel,
.app-shell.wealth-paper-preview .paper-positions-grid > .panel,
.app-shell.wealth-paper-preview .paper-layout > .panel,
.app-shell.wealth-paper-preview .paper-realized-results-panel {
  padding: 16px;
  box-shadow: 0 10px 24px rgba(20, 42, 29, 0.052);
}

.app-shell.wealth-studio-preview .panel-header {
  margin-bottom: 12px;
}

.app-shell.wealth-studio-preview .panel-header h2,
.app-shell.wealth-studio-preview .paper-dashboard-section-header h3 {
  font-size: 20px;
}

.app-shell.wealth-dashboard-preview #dashboard-view .dashboard-grid,
.paper-studio-split,
.app-shell.wealth-paper-preview .paper-positions-grid,
.app-shell.wealth-paper-preview .paper-layout.paper-utility-grid {
  gap: 16px;
}

.app-shell.wealth-dashboard-preview #dashboard-view .trend-panel,
.app-shell.wealth-dashboard-preview #dashboard-view .market-panel,
.app-shell.wealth-dashboard-preview #dashboard-view .recommendation-panel {
  min-height: 260px;
}

.app-shell.wealth-dashboard-preview .trend-chart {
  min-height: 205px;
}

.app-shell.wealth-dashboard-preview .trend-intelligence svg {
  min-height: 168px;
}

.app-shell.wealth-dashboard-preview .trend-insight-strip {
  gap: 8px;
}

.app-shell.wealth-studio-preview .trend-insight-card,
.app-shell.wealth-studio-preview .mini-stat,
.app-shell.wealth-studio-preview .trade-meta {
  padding: 9px;
}

.app-shell.wealth-studio-preview .ibkr-live-account-panel {
  gap: 9px;
}

.app-shell.wealth-studio-preview .ibkr-live-summary,
.app-shell.wealth-studio-preview .ibkr-live-footer {
  gap: 8px;
}

.app-shell.wealth-studio-preview .ibkr-live-stat,
.app-shell.wealth-studio-preview .ibkr-live-status {
  padding: 9px;
}

.app-shell.wealth-studio-preview .ibkr-live-stat strong {
  margin: 4px 0 2px;
  font-size: 18px;
}

.app-shell.wealth-studio-preview .ibkr-live-stat span,
.app-shell.wealth-studio-preview .ibkr-live-stat small,
.app-shell.wealth-studio-preview .ibkr-live-status span,
.app-shell.wealth-studio-preview .market-driver-tile small {
  font-size: 10px;
}

.app-shell.wealth-dashboard-preview .advisor-note {
  padding: 10px 12px;
}

.app-shell.wealth-dashboard-preview .advisor-note strong {
  font-size: 13px;
}

.app-shell.wealth-dashboard-preview .advisor-note p {
  font-size: 12px;
}

.app-shell.wealth-dashboard-preview .market-cards {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.app-shell.wealth-dashboard-preview .market-cards {
  grid-template-columns: repeat(auto-fill, 138px);
  justify-content: start;
  align-items: start;
}

.app-shell.wealth-dashboard-preview .market-index-card,
.app-shell.wealth-dashboard-preview .quote-card {
  min-height: 78px;
  padding: 9px;
}

.app-shell.wealth-dashboard-preview .quote-card {
  width: 138px;
  min-height: 86px;
  overflow: hidden;
}

.app-shell.wealth-dashboard-preview .quote-card header,
.app-shell.wealth-dashboard-preview .quote-price-row {
  gap: 6px;
}

.app-shell.wealth-dashboard-preview .quote-card header {
  min-width: 0;
}

.app-shell.wealth-dashboard-preview .quote-card header > div:first-child {
  min-width: 0;
  max-width: 92px;
}

.app-shell.wealth-dashboard-preview .quote-card-actions small {
  display: none;
}

.app-shell.wealth-dashboard-preview .quote-detail-button {
  width: 20px;
  height: 20px;
  font-size: 11px;
}

.app-shell.wealth-dashboard-preview .market-index-card strong,
.app-shell.wealth-dashboard-preview .quote-price-row em {
  font-size: 13px;
}

.app-shell.wealth-dashboard-preview .quote-card header strong,
.app-shell.wealth-dashboard-preview .market-index-card span {
  font-size: 12px;
}

.app-shell.wealth-dashboard-preview .quote-card header span,
.app-shell.wealth-dashboard-preview .quote-card-actions small,
.app-shell.wealth-dashboard-preview .market-index-card em,
.app-shell.wealth-dashboard-preview .quote-price-row b {
  font-size: 10px;
}

.app-shell.wealth-dashboard-preview .quote-card header span {
  max-width: 100%;
  line-height: 1.05;
}

.app-shell.wealth-dashboard-preview .quote-price-row {
  align-items: baseline;
  margin-top: 4px;
}

.app-shell.wealth-paper-preview #paper-trading-content {
  gap: 16px;
}

.app-shell.wealth-paper-preview .paper-dashboard-panel > .panel-header {
  margin-bottom: 14px;
}

.app-shell.wealth-paper-preview .paper-benchmark-dashboard,
.app-shell.wealth-paper-preview .paper-timeline-panel {
  min-height: 220px;
}

.app-shell.wealth-paper-preview .paper-benchmark-list {
  gap: 8px;
}

.app-shell.wealth-paper-preview .paper-benchmark-card {
  gap: 8px;
  padding: 9px;
}

.app-shell.wealth-paper-preview .paper-benchmark-return {
  font-size: 16px;
}

.app-shell.wealth-paper-preview .paper-benchmark-summary {
  padding: 8px 10px;
}

.app-shell.wealth-paper-preview .paper-benchmark-verdict {
  padding: 7px 8px;
}

.app-shell.wealth-paper-preview .paper-timeline-chart {
  height: 145px;
}

.app-shell.wealth-paper-preview .paper-position-card,
.app-shell.wealth-paper-preview .paper-trade-row {
  padding: 10px 12px;
}

.app-shell.wealth-paper-preview .paper-position-card h3 {
  font-size: 16px;
}

.app-shell.wealth-paper-preview .paper-position-card header span,
.app-shell.wealth-paper-preview .paper-position-footer,
.app-shell.wealth-paper-preview .paper-thesis,
.app-shell.wealth-paper-preview .paper-trade-row span,
.app-shell.wealth-paper-preview .paper-trade-row p {
  font-size: 11px;
}

.app-shell.wealth-studio-preview #health-content,
.app-shell.wealth-studio-preview #rebalance-content,
.app-shell.wealth-studio-preview #scenario-content,
.app-shell.wealth-studio-preview #council-history-content,
.app-shell.wealth-studio-preview #recommendations-screen-list,
.app-shell.wealth-studio-preview #trades-content,
.app-shell.wealth-studio-preview #data-management-content,
.app-shell.wealth-studio-preview #settings-content {
  display: grid;
  gap: 16px;
}

.app-shell.wealth-studio-preview .view-card,
.app-shell.wealth-studio-preview .scenario-card,
.app-shell.wealth-studio-preview .scenario-lab-header,
.app-shell.wealth-studio-preview .settings-status-row,
.app-shell.wealth-studio-preview .settings-assignment-row,
.app-shell.wealth-studio-preview .capability-row,
.app-shell.wealth-studio-preview .data-holding-row,
.app-shell.wealth-studio-preview .data-target-row,
.app-shell.wealth-studio-preview .data-transaction-row,
.app-shell.wealth-studio-preview .trade-card,
.app-shell.wealth-studio-preview .approval-order-card,
.app-shell.wealth-studio-preview .approval-audit-event,
.app-shell.wealth-studio-preview .council-session-card,
.app-shell.wealth-studio-preview .council-action-note-card,
.app-shell.wealth-studio-preview .recommendation-card,
.app-shell.wealth-studio-preview .rebalance-allocation-row,
.app-shell.wealth-studio-preview .rebalance-drift-row,
.app-shell.wealth-studio-preview .rebalance-move-row,
.app-shell.wealth-studio-preview .health-gap-card,
.app-shell.wealth-studio-preview .scenario-control-header {
  border-color: #dfe7e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(20, 42, 29, 0.045);
}

.app-shell.wealth-studio-preview .view-card,
.app-shell.wealth-studio-preview .scenario-card,
.app-shell.wealth-studio-preview .scenario-lab-header {
  padding: 16px;
}

.app-shell.wealth-studio-preview .health-hero,
.app-shell.wealth-studio-preview .rebalance-hero,
.app-shell.wealth-studio-preview .trades-overview,
.app-shell.wealth-studio-preview .data-management-hero,
.app-shell.wealth-studio-preview .settings-hero,
.app-shell.wealth-studio-preview .council-review-hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 250, 246, 0.92)),
    #fff;
}

.app-shell.wealth-studio-preview .health-layout,
.app-shell.wealth-studio-preview .rebalance-layout,
.app-shell.wealth-studio-preview .scenario-lab-layout,
.app-shell.wealth-studio-preview .trades-layout,
.app-shell.wealth-studio-preview .data-management-layout,
.app-shell.wealth-studio-preview .settings-layout,
.app-shell.wealth-studio-preview .approval-workspace,
.app-shell.wealth-studio-preview .compact-stat-grid,
.app-shell.wealth-studio-preview .stat-grid {
  gap: 14px;
}

.app-shell.wealth-studio-preview .compact-stat-grid,
.app-shell.wealth-studio-preview .stat-grid {
  margin-bottom: 12px;
}

.app-shell.wealth-studio-preview .mini-stat {
  border-color: #dfe7e1;
  background: rgba(245, 250, 246, 0.9);
  box-shadow: inset 0 0 0 1px rgba(31, 93, 58, 0.025);
}

.app-shell.wealth-studio-preview .mini-stat strong {
  font-size: 18px;
}

.app-shell.wealth-studio-preview .view-copy,
.app-shell.wealth-studio-preview .muted,
.app-shell.wealth-studio-preview .panel-subtitle {
  color: #6f7b73;
}

.app-shell.wealth-studio-preview .empty-state,
.app-shell.wealth-studio-preview .inline-error {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.app-shell.wealth-studio-preview input,
.app-shell.wealth-studio-preview select,
.app-shell.wealth-studio-preview textarea {
  border-color: #dbe8df;
  background-color: rgba(255, 255, 255, 0.88);
}

.app-shell.wealth-studio-preview input:focus,
.app-shell.wealth-studio-preview select:focus,
.app-shell.wealth-studio-preview textarea:focus {
  border-color: #8fb49d;
  box-shadow: 0 0 0 3px rgba(31, 93, 58, 0.09);
}

.app-shell.wealth-studio-preview .settings-tab-list {
  margin-top: 4px;
  border-bottom-color: #dfe7e1;
}

.app-shell.wealth-studio-preview .settings-tab-button {
  border-color: #dfe7e1;
  background: rgba(255, 255, 255, 0.82);
}

.app-shell.wealth-studio-preview .settings-tab-button.is-active {
  border-color: #bfd8c7;
  background: #eef7f1;
}

.app-shell.wealth-studio-preview .trade-ai-actions,
.app-shell.wealth-studio-preview .panel-action-row,
.app-shell.wealth-studio-preview .data-action-row,
.app-shell.wealth-studio-preview .data-row-actions {
  gap: 8px;
}

.app-shell.wealth-studio-preview .approval-workspace {
  align-items: start;
}

.app-shell.wealth-studio-preview .council-session-card.is-pinned,
.app-shell.wealth-studio-preview .recommendation-card.is-high,
.app-shell.wealth-studio-preview .trade-card.is-high,
.app-shell.wealth-studio-preview .approval-order-card.is-selected {
  border-color: #bfd8c7;
  box-shadow:
    inset 4px 0 0 rgba(31, 93, 58, 0.72),
    0 10px 24px rgba(20, 42, 29, 0.05);
}

.app-shell.wealth-studio-preview .signal-intelligence-hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 247, 0.9)),
    #fff;
}

.app-shell.wealth-studio-preview .signal-intelligence-header {
  align-items: flex-start;
}

.signal-intelligence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.signal-capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.signal-capability-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid #dfe7e1;
  border-radius: 8px;
  padding: 12px;
  background: rgba(245, 250, 246, 0.76);
}

.signal-capability-card span {
  color: var(--forest);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.signal-capability-card strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.signal-capability-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.signal-card-section {
  display: grid;
  gap: 12px;
}

.signal-section-header {
  margin-bottom: 0;
}

.signal-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.signal-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid #dfe7e1;
  border-left: 4px solid var(--forest);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(20, 42, 29, 0.05);
  overflow-wrap: anywhere;
}

.signal-card.is-positive {
  border-left-color: var(--green);
}

.signal-card.is-risk {
  border-color: #efd2d5;
  border-left-color: var(--red);
  background: rgba(255, 250, 250, 0.92);
}

.signal-card.is-anomaly {
  border-color: #c9daee;
  border-left-color: #1f4f86;
  background: #f6f9fd;
}

.signal-card-header,
.signal-card-body,
.signal-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.signal-card-body > div {
  min-width: 0;
}

.signal-created-date {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.signal-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.signal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.signal-card-body > span,
.signal-card-thesis {
  border: 1px solid #dfe7e1;
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--forest);
  background: rgba(245, 250, 246, 0.84);
  font-size: 12px;
  font-weight: 900;
}

.signal-card-thesis {
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 750;
}

.signal-card.is-risk .signal-card-body > span {
  border-color: #efd2d5;
  color: var(--red);
  background: #fff4f5;
}

.signal-card.is-anomaly .eyebrow,
.signal-card.is-anomaly h3,
.signal-card.is-anomaly .signal-card-body > span {
  color: #1f4f86;
}

.signal-card.is-anomaly .signal-card-body > span {
  border-color: #c9daee;
  background: #fff;
}

.signal-card-actions {
  justify-content: flex-end;
}

.data-management-hero {
  border-color: #dbe8df;
}

.data-management-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.data-message {
  margin: 12px 0 0;
  font-weight: 800;
}

.data-form {
  display: grid;
  gap: 12px;
}

.data-form label,
.data-holding-grid label,
.data-holding-row label,
.data-target-row label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.data-form input,
.data-form textarea,
.data-holding-grid input,
.data-holding-row input,
.data-target-row input {
  padding: 10px;
}

.symbol-input {
  text-transform: uppercase;
}

.data-action-row,
.data-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.data-holding-grid,
.data-holding-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.9fr) minmax(130px, 1fr) minmax(120px, 0.9fr) minmax(120px, 0.9fr) auto;
  gap: 10px;
  align-items: end;
}

.data-holding-add-form {
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 12px;
  background: var(--forest-soft);
}

.data-holdings-list,
.data-target-rows,
.data-transaction-list {
  display: grid;
  gap: 10px;
}

.data-holdings-list {
  margin-top: 12px;
}

.data-holding-row,
.data-target-row,
.data-transaction-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.data-target-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
}

.data-target-actual {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 9px;
  background: var(--forest-soft);
}

.data-target-actual span,
.data-target-actual strong {
  display: block;
}

.data-target-actual span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.data-target-actual strong {
  color: var(--forest);
  font-size: 12px;
}

.data-transaction-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.data-transaction-row strong,
.data-transaction-row span {
  display: block;
}

.data-transaction-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.settings-hero {
  border-color: #dbe8df;
}

.settings-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.settings-tab-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.settings-tab-button:hover {
  border-color: #cbdcd0;
  color: var(--forest);
}

.settings-tab-button.is-active {
  border-color: var(--forest);
  color: var(--forest);
  background: var(--forest-soft);
  box-shadow: inset 0 0 0 1px rgba(31, 93, 58, 0.06);
}

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

.settings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

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

.capability-map-layout,
.capability-map-panel {
  grid-template-columns: 1fr;
}

.compact-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.family-protection-stat-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mini-stat-button {
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.mini-stat-button:hover,
.mini-stat-button:focus-visible,
.mini-stat-button.is-active {
  border-color: var(--forest);
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 93, 58, 0.12);
}

.family-document-dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.capability-table {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.capability-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.capability-row > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.capability-row span,
.capability-row small,
.capability-row em {
  color: var(--muted);
  font-size: 12px;
}

.capability-row em {
  flex: 0 0 auto;
  color: var(--forest);
  font-style: normal;
  font-weight: 800;
}

.capability-row.is-risk {
  border-color: #f2d6d3;
}

.capability-row.is-risk em {
  color: var(--red);
}

.settings-status-list,
.settings-assignment-list,
.settings-action-row,
.settings-target-list,
.settings-watchlist-form,
.settings-trade-form,
.settings-verification {
  display: grid;
  gap: 12px;
}

.settings-action-row {
  justify-items: start;
}

.settings-status-row,
.settings-assignment-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.settings-status-row > div,
.settings-assignment-row > div {
  min-width: 0;
}

.settings-status-row:last-child,
.settings-assignment-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.settings-status-row span,
.settings-status-row em,
.settings-assignment-row span,
.settings-note {
  color: var(--muted);
  font-size: 12px;
}

.settings-status-row em {
  max-width: 260px;
  text-align: right;
  font-style: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.settings-status-row.is-risk strong,
.settings-status-row.is-risk em {
  color: var(--red);
}

.settings-assignment-list {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.settings-assignment-row span {
  font-weight: 800;
}

.settings-target-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.settings-target-row label {
  display: grid;
  gap: 6px;
}

.settings-target-row input,
.settings-trade-form input,
.settings-trade-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
}

.settings-target-row input:disabled {
  color: var(--muted);
  background: #f7f9f7;
}

.settings-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-watchlist-form textarea {
  min-height: 184px;
  resize: vertical;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  line-height: 1.5;
}

.settings-simulator-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.settings-simulator-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.settings-simulator-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.settings-watchlist-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-chip-list span,
.settings-watchlist-preview span {
  border: 1px solid #dbe8df;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--forest);
  background: var(--forest-soft);
  font-size: 12px;
  font-weight: 800;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.settings-note {
  margin: 14px 0 0;
  line-height: 1.45;
}

.anomaly-radar-settings-form,
.anomaly-radar-source-grid {
  display: grid;
  gap: 10px;
}

.anomaly-radar-source-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfb;
  cursor: pointer;
}

.anomaly-radar-source-row.is-locked {
  cursor: default;
  background: #f8faf8;
}

.anomaly-radar-source-row > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.anomaly-radar-source-row strong,
.anomaly-radar-source-row span {
  overflow-wrap: anywhere;
}

.anomaly-radar-source-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.anomaly-radar-source-row input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: var(--forest);
}

.backup-restore-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.backup-restore-panel {
  border-color: #dbe8df;
}

.backup-restore-danger {
  border-color: #efd2d5;
}

.backup-restore-copy,
.backup-restore-form {
  display: grid;
  gap: 12px;
}

.backup-restore-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.backup-restore-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.backup-restore-list span {
  border: 1px solid #dbe8df;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--forest);
  background: var(--forest-soft);
  font-size: 12px;
  font-weight: 800;
}

.backup-restore-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.backup-file-row {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.backup-file-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
}

.backup-restore-warning {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid #efd2d5;
  border-radius: 8px;
  padding: 12px;
  background: #fff7f7;
}

.backup-restore-warning input {
  width: auto;
  margin-top: 3px;
}

.backup-restore-warning strong,
.backup-restore-warning small {
  display: block;
}

.backup-restore-warning strong {
  color: var(--red);
}

.backup-restore-warning small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.broker-safety-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
}

.broker-safety-panel {
  border-color: #dbe8df;
}

.broker-safety-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.broker-safety-status {
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 12px;
  background: var(--forest-soft);
}

.broker-safety-status.is-risk {
  border-color: #efd2d5;
  background: #fff7f7;
}

.broker-safety-status span,
.broker-safety-status small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.broker-safety-status strong {
  display: block;
  margin: 5px 0;
  color: var(--forest);
}

.broker-safety-status.is-risk strong {
  color: var(--red);
}

.broker-safety-form {
  display: grid;
  gap: 14px;
}

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

.broker-safety-toggle-list {
  display: grid;
  gap: 10px;
}

.broker-safety-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.broker-safety-toggle.is-risk {
  border-color: #efd2d5;
  background: #fff7f7;
}

.broker-safety-toggle input {
  width: auto;
  margin-top: 3px;
}

.broker-safety-toggle strong,
.broker-safety-toggle small {
  display: block;
}

.broker-safety-toggle small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.broker-safety-audit-panel {
  align-self: start;
}

.broker-safety-event-list {
  display: grid;
  gap: 10px;
}

.broker-safety-event {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--forest);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.broker-safety-event.is-risk {
  border-left-color: var(--red);
}

.broker-safety-event > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.broker-safety-event p,
.broker-safety-event small,
.broker-safety-event span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.settings-trade-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-trade-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.settings-trade-actions {
  display: flex;
  gap: 10px;
  align-items: end;
  grid-column: 1 / -1;
}

.settings-verification {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.settings-verification-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.settings-verification-step > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: var(--forest);
  background: var(--forest-soft);
  font-size: 12px;
  font-weight: 900;
}

.settings-verification-step.is-risk > span {
  color: var(--red);
  background: #fff7f7;
}

.settings-verification-step strong,
.settings-verification-step p {
  margin: 0;
}

.settings-verification-step p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.settings-verification-check {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.council-drawer,
.usage-drawer,
.stock-detail-drawer,
.research-drawer,
.alerts-drawer,
.trade-ticket-drawer,
.paper-trade-drawer {
  position: fixed;
  inset: 0;
  display: block;
  visibility: hidden;
  z-index: 20;
  pointer-events: none;
  transition: visibility 0s linear 520ms;
}

.council-drawer.is-open,
.usage-drawer.is-open,
.stock-detail-drawer.is-open,
.research-drawer.is-open,
.alerts-drawer.is-open,
.trade-ticket-drawer.is-open,
.paper-trade-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(23, 32, 26, 0.18);
  opacity: 0;
  transition: opacity 520ms ease;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: min(560px, 100%);
  height: 100%;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
  overflow: auto;
  border-left: 1px solid var(--line);
  padding: 26px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 520ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.council-drawer.is-open .drawer-overlay,
.usage-drawer.is-open .drawer-overlay,
.stock-detail-drawer.is-open .drawer-overlay,
.research-drawer.is-open .drawer-overlay,
.alerts-drawer.is-open .drawer-overlay,
.trade-ticket-drawer.is-open .drawer-overlay,
.paper-trade-drawer.is-open .drawer-overlay {
  opacity: 1;
}

.council-drawer.is-open .drawer-panel,
.usage-drawer.is-open .drawer-panel,
.stock-detail-drawer.is-open .drawer-panel,
.research-drawer.is-open .drawer-panel,
.alerts-drawer.is-open .drawer-panel,
.trade-ticket-drawer.is-open .drawer-panel,
.paper-trade-drawer.is-open .drawer-panel {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .council-drawer,
  .usage-drawer,
  .stock-detail-drawer,
  .research-drawer,
  .alerts-drawer,
  .trade-ticket-drawer,
  .paper-trade-drawer,
  .drawer-overlay,
  .drawer-panel {
    transition-duration: 1ms;
  }

  .family-management-drawer {
    animation-duration: 1ms;
  }

  .family-slide-drawer-backdrop,
  .family-slide-drawer-panel {
    transition-duration: 1ms;
  }
}

.council-drawer .drawer-panel,
.usage-panel,
.stock-detail-panel,
.research-panel,
.trade-ticket-panel {
  border-left-color: #d8c4a7;
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.98) 0%, rgba(247, 240, 228, 0.98) 100%),
    #fbf6ec;
  box-shadow: -22px 0 48px rgba(62, 45, 24, 0.16);
}

.usage-panel {
  width: min(680px, 100%);
}

.stock-detail-panel {
  width: min(520px, 100%);
}

.research-panel {
  width: min(720px, 100%);
}

.trade-ticket-panel {
  width: min(540px, 100%);
}

.alerts-panel {
  width: min(640px, 100%);
  border-left-color: #e6b8bd;
  background:
    linear-gradient(180deg, rgba(255, 248, 248, 0.98) 0%, rgba(252, 238, 240, 0.98) 100%),
    #fff5f6;
  box-shadow: -22px 0 48px rgba(126, 36, 48, 0.16);
}

.council-drawer .drawer-header,
.usage-panel .drawer-header,
.stock-detail-panel .drawer-header,
.research-panel .drawer-header,
.trade-ticket-panel .drawer-header {
  border: 1px solid #eadbc4;
  border-radius: 10px;
  padding: 14px;
  background: rgba(255, 253, 248, 0.92);
}

.alerts-panel .drawer-header {
  border: 1px solid #f0c8cc;
  border-radius: 10px;
  padding: 14px;
  background: rgba(255, 252, 252, 0.92);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.council-context-label {
  display: inline-block;
  margin-top: 10px;
  border: 1px solid #dbe8df;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--forest);
  background: var(--forest-soft);
  font-size: 12px;
  font-weight: 800;
}

.alert-context-label {
  border-color: #f0c8cc;
  color: #bd2431;
  background: #fff4f5;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 22px;
  line-height: 1;
}

.voice-textarea-wrap {
  position: relative;
  margin-top: 5px;
}

.voice-textarea-wrap textarea {
  margin-top: 0;
  padding-right: 54px;
}

.voice-input-button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(20, 42, 29, 0.08);
}

.voice-input-button:hover,
.voice-input-button:focus-visible,
.voice-input-button.is-listening {
  border-color: var(--forest);
  color: #fff;
  background: var(--forest);
  box-shadow: 0 0 0 3px var(--forest-soft);
}

.voice-input-button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: #f8faf8;
  opacity: 0.68;
}

.voice-input-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 22px;
}

.voice-input-icon::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 5px;
  width: 8px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.voice-input-icon::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 2px;
  width: 14px;
  height: 9px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 999px 999px;
}

.voice-input-status {
  display: block;
  min-height: 17px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.council-voice-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(239, 247, 240, 0.7);
}

.voice-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 13px;
  color: var(--forest);
  background: #fff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.voice-tool-button:hover,
.voice-tool-button:focus-visible,
.voice-tool-button.is-active {
  border-color: var(--forest);
  color: #fff;
  background: var(--forest);
  box-shadow: 0 0 0 3px var(--forest-soft);
}

.voice-tool-button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: #f7faf7;
  opacity: 0.68;
  box-shadow: none;
}

.voice-tool-button.muted-tool {
  color: var(--muted);
}

.voice-playback-status {
  min-height: 17px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
}

.council-result {
  display: grid;
  align-content: start;
  gap: 12px;
}

.council-drawer .council-form,
.council-drawer .expert-card,
.council-drawer .summary-card {
  border: 1px solid #ddcdb4;
  border-radius: 10px;
  padding: 14px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: 0 10px 24px rgba(84, 62, 31, 0.06);
}

.usage-dashboard-content,
.usage-section,
.usage-row-list,
.usage-source-list,
.usage-event-list {
  display: grid;
  gap: 12px;
}

.usage-section {
  border: 1px solid #ddcdb4;
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: 0 10px 24px rgba(84, 62, 31, 0.06);
}

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

.usage-metric {
  border: 1px solid #decdb2;
  border-radius: 8px;
  padding: 13px;
  background: #fff9ef;
}

.usage-metric span,
.usage-metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.usage-metric strong {
  display: block;
  margin: 6px 0 3px;
  color: var(--forest);
  font-size: 22px;
}

.usage-row,
.usage-source,
.usage-event {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.usage-row:last-child,
.usage-source:last-child,
.usage-event:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.usage-row span,
.usage-event span,
.usage-source p {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.usage-row > strong,
.usage-event > div:last-child {
  text-align: right;
}

.alerts-drawer-content,
.alerts-list,
.alert-rule-list {
  display: grid;
  gap: 12px;
}

.alerts-drawer-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid #f0c8cc;
  border-radius: 10px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.74);
}

.alerts-drawer-toolbar strong,
.alerts-drawer-toolbar span {
  display: block;
}

.alerts-drawer-toolbar span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.alerts-drawer-actions,
.alert-card-actions,
.alert-rule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.alert-card {
  display: grid;
  gap: 10px;
  border: 1px solid #f0c8cc;
  border-left: 4px solid #bd2431;
  border-radius: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(126, 36, 48, 0.06);
  overflow-wrap: anywhere;
}

.alert-card.is-advisory {
  border-left-color: var(--forest);
}

.alert-card.is-urgent {
  border-left-color: #9f1625;
  background: rgba(255, 250, 250, 0.92);
}

.alert-card.is-anomaly {
  border-color: #c9daee;
  border-left-color: #1f4f86;
  background: #f6f9fd;
  box-shadow: 0 10px 24px rgba(31, 79, 134, 0.08);
}

.alert-card.is-anomaly .eyebrow,
.alert-card.is-anomaly h3 {
  color: #1f4f86;
}

.alert-card.is-anomaly .alert-severity,
.alert-card.is-anomaly .alert-card-meta span {
  border-color: #c9daee;
  color: #1f4f86;
  background: #fff;
}

.alert-card-main,
.alert-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.alert-card-main > div,
.alert-card-footer > small {
  min-width: 0;
}

.alert-card h3 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.alert-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.alert-severity {
  flex: 0 0 auto;
  border: 1px solid #f0c8cc;
  border-radius: 999px;
  padding: 6px 9px;
  color: #bd2431;
  background: #fff4f5;
  font-size: 11px;
  font-weight: 900;
}

.alert-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alert-card-meta span {
  border: 1px solid #f0c8cc;
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
  background: #fffafa;
  font-size: 12px;
  font-weight: 800;
}

.alert-card-footer small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.anomaly-ai-review {
  display: grid;
  gap: 8px;
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.78);
}

.anomaly-ai-review strong,
.anomaly-ai-review span {
  color: #1f4f86;
  font-weight: 900;
}

.anomaly-ai-review p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.alert-settings-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.settings-alert-rule-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-alert-rule-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.settings-alert-rule-form input,
.settings-alert-rule-form select,
.settings-alert-rule-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.settings-alert-rule-form textarea {
  min-height: 94px;
  resize: vertical;
}

.settings-alert-notes,
.settings-alert-toggle,
.settings-alert-rule-form .settings-trade-actions {
  grid-column: 1 / -1;
}

.settings-alert-toggle {
  display: flex !important;
  grid-template-columns: auto minmax(0, 1fr);
  flex-direction: row;
  align-items: center;
  color: var(--muted);
}

.settings-alert-toggle input {
  width: auto;
}

.alert-rule-stock-group {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.alert-rule-stock-group header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.alert-rule-stock-group header > div {
  min-width: 0;
}

.alert-rule-stock-group h3 {
  margin: 2px 0;
  font-size: 24px;
}

.alert-rule-stock-group header span,
.alert-rule-chip span,
.alert-rule-chip small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.alert-rule-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.alert-rule-chip {
  display: grid;
  gap: 10px;
  align-content: space-between;
  min-height: 154px;
  border: 1px solid #dbe8df;
  border-radius: 8px;
  padding: 11px;
  background: #fbfdfb;
  overflow-wrap: anywhere;
}

.alert-rule-chip.is-risk {
  border-color: #f0c8cc;
  background: #fffafa;
}

.alert-rule-chip.is-disabled {
  opacity: 0.72;
  background: #f8faf8;
}

.alert-rule-chip strong,
.alert-rule-chip span,
.alert-rule-chip small {
  display: block;
}

.alert-rule-chip strong {
  color: var(--ink);
  line-height: 1.2;
}

.alert-rule-chip span,
.alert-rule-chip small {
  margin-top: 5px;
}

.alert-rule-chip footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.alert-rule-chip footer .panel-pill {
  padding: 6px 9px;
}

.alert-rule-chip.is-disabled footer .panel-pill {
  border-color: var(--line);
  color: var(--muted);
  background: #fff;
}

.stock-detail-content {
  display: grid;
  align-content: start;
  gap: 14px;
}

.trade-ticket-drawer-content {
  display: grid;
  align-content: start;
  gap: 14px;
}

.trade-ticket-drawer-intro {
  display: grid;
  gap: 6px;
  border: 1px solid #eadbc4;
  border-radius: 10px;
  padding: 14px;
  background: rgba(255, 253, 248, 0.9);
}

.trade-ticket-drawer-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.trade-ticket-drawer .approval-form,
.paper-trade-drawer .paper-trade-form {
  border: 1px solid #eadbc4;
  border-radius: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.research-drawer-content,
.research-drawer-results,
.research-section,
.research-news-list {
  display: grid;
  gap: 12px;
}

.research-symbol-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.32fr) auto;
  gap: 10px;
  align-items: end;
}

.research-drawer-note {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.research-quote-hero {
  border-color: #d9c8ad;
}

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

.research-section-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.research-section-heading span {
  border: 1px solid #eadbc4;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  background: #fff9ef;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.research-chart-card {
  gap: 12px;
}

.research-chart-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.research-chart-summary b.quote-positive {
  color: var(--good);
}

.research-chart-summary b.quote-negative {
  color: var(--danger);
}

.research-price-chart {
  width: 100%;
  overflow: hidden;
  border: 1px solid #decdb2;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf8 0%, #f7efe1 100%);
}

.research-price-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.research-chart-axis,
.research-chart-tick {
  stroke: #b7a17f;
  stroke-width: 1.25;
}

.research-chart-gridline {
  stroke: #eadbc4;
  stroke-width: 1;
  stroke-dasharray: 5 6;
}

.research-chart-line {
  fill: none;
  stroke: var(--forest);
  stroke-width: 3.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.research-chart-endpoint {
  fill: var(--forest);
  stroke: #fff;
  stroke-width: 2;
}

.research-chart-label,
.research-chart-year {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.research-chart-year {
  text-anchor: middle;
}

.research-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.research-chip-list span,
.research-cache-summary span {
  border: 1px solid #decdb2;
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--forest);
  background: #fff9ef;
  font-size: 12px;
  font-weight: 800;
}

.research-news-item {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.research-news-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.research-news-item a,
.research-news-item strong {
  color: var(--ink);
  font-weight: 850;
}

.research-news-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.research-cache-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.research-council-card {
  border-color: #d6c2a4;
  background: linear-gradient(180deg, #fffdf8 0%, #fbf5ea 100%);
}

.research-council-card .ghost-button {
  justify-self: start;
}

.research-council-loading {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid #d7c5a8;
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
}

.research-council-loading span {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid #d6c2a4;
  border-top-color: var(--forest);
  border-radius: 999px;
  animation: research-council-spin 900ms linear infinite;
}

.research-council-loading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.research-council-summary {
  display: grid;
  gap: 10px;
  border-left: 4px solid var(--forest);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}

.research-council-summary p {
  margin: 0;
}

.research-council-summary strong {
  color: var(--forest);
}

.research-council-summary ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

@keyframes research-council-spin {
  to {
    transform: rotate(360deg);
  }
}

.stock-detail-hero,
.stock-detail-note,
.stock-detail-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stock-detail-panel .stock-detail-hero,
.stock-detail-panel .stock-detail-note,
.stock-detail-panel .stock-detail-metric,
.research-panel .stock-detail-hero,
.research-panel .stock-detail-note,
.research-panel .stock-detail-metric {
  border-color: #ddcdb4;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: 0 10px 24px rgba(84, 62, 31, 0.06);
}

.stock-detail-panel .stock-detail-metric,
.research-panel .stock-detail-metric {
  background: rgba(255, 255, 255, 0.76);
}

.stock-detail-hero {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px;
}

.stock-detail-hero h3 {
  margin: 2px 0 6px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.stock-detail-hero span,
.stock-detail-note p,
.stock-detail-metric span {
  color: var(--muted);
}

.stock-detail-price {
  min-width: 130px;
  text-align: right;
}

.stock-detail-price strong {
  display: block;
  color: var(--forest);
  font-size: 22px;
}

.stock-detail-price b {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.stock-detail-price b.quote-positive {
  color: #167a48;
}

.stock-detail-price b.quote-negative {
  color: #b42318;
}

.stock-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stock-detail-metric {
  padding: 13px;
}

.stock-detail-metric span {
  display: block;
  font-size: 12px;
}

.stock-detail-metric strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
}

.stock-detail-note {
  padding: 15px;
  background: #fbfcfb;
}

.stock-detail-note strong {
  color: var(--forest);
}

.stock-detail-note p {
  margin: 7px 0 0;
  font-size: 14px;
  line-height: 1.45;
}

.stock-detail-actions {
  display: flex;
}

.usage-source a {
  border: 1px solid var(--forest);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--forest);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.family-asset-summary-grid {
  margin-bottom: 0;
}

.family-asset-single-column {
  display: grid;
  gap: 16px;
}

.family-overview-grid,
.family-planning-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 16px;
  margin-bottom: 16px;
}

.family-overview-hero {
  display: grid;
  align-content: center;
  min-height: 260px;
  border-color: var(--asset-accent-line);
  background: linear-gradient(180deg, #fff 0%, #f7fbff 100%);
}

.family-overview-hero h2 {
  max-width: 760px;
  margin: 4px 0 10px;
  color: var(--ink);
  font-size: 36px;
  line-height: 1.05;
}

.family-overview-hero .view-copy {
  max-width: 760px;
}

.family-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.family-inheritance-dashboard-panel {
  border-color: var(--asset-accent-line);
  background: linear-gradient(180deg, #fff 0%, #f7fbff 100%);
}

.family-inheritance-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.family-inheritance-dashboard-stats > div,
.family-inheritance-dashboard-row {
  min-width: 0;
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  background: #fff;
}

.family-inheritance-dashboard-stats > div {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.family-inheritance-dashboard-stats span,
.family-inheritance-dashboard-stats small,
.family-inheritance-dashboard-row span,
.family-inheritance-dashboard-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-inheritance-dashboard-stats strong {
  overflow-wrap: anywhere;
  color: var(--forest);
  font-size: 22px;
  line-height: 1.1;
}

.family-inheritance-dashboard-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.family-inheritance-dashboard-columns > div {
  min-width: 0;
}

.family-inheritance-dashboard-columns > div > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.family-inheritance-dashboard-list {
  display: grid;
  gap: 8px;
}

.family-inheritance-dashboard-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  padding: 10px;
}

.family-inheritance-dashboard-row span {
  color: var(--ink);
  font-weight: 850;
}

.family-inheritance-dashboard-row strong {
  color: var(--forest);
  font-size: 14px;
  text-align: right;
  white-space: nowrap;
}

.family-inheritance-dashboard-row small {
  grid-column: 1 / -1;
}

.compact-empty-state {
  min-height: 104px;
  padding: 12px;
}

.family-opportunity-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.family-opportunity-results {
  display: grid;
  gap: 16px;
}

.family-opportunity-form,
.family-opportunity-rule-list,
.family-opportunity-run-list,
.family-opportunity-comps,
.family-opportunity-sources {
  display: grid;
  gap: 10px;
}

.family-opportunity-hint {
  display: grid;
  gap: 3px;
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: var(--asset-accent-soft);
  font-size: 13px;
}

.family-opportunity-hint strong {
  color: var(--forest);
}

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

.family-opportunity-rule-card,
.family-opportunity-run-card {
  min-width: 0;
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.family-opportunity-rule-card {
  display: grid;
  gap: 12px;
}

.family-opportunity-rule-card.is-editing {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(31, 93, 58, 0.12);
}

.family-opportunity-rule-card h3,
.family-opportunity-run-card h3 {
  margin: 3px 0 6px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.12;
}

.family-opportunity-rule-card p,
.family-opportunity-run-card p {
  margin: 0;
  color: var(--muted);
}

.family-opportunity-rule-card span,
.family-opportunity-rule-card p,
.family-opportunity-run-card p,
.family-opportunity-run-card span,
.family-opportunity-run-card small,
.family-opportunity-comps span,
.family-opportunity-comps small,
.family-opportunity-sources small {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.family-opportunity-rule-card > div:first-child > span {
  color: var(--forest);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.family-opportunity-rule-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.family-opportunity-rule-meta span {
  border: 1px solid var(--asset-accent-line);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 750;
}

.family-opportunity-rule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.family-opportunity-run-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.family-opportunity-run-card {
  display: grid;
  gap: 12px;
}

.family-opportunity-run-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.family-opportunity-score {
  display: grid;
  min-width: 104px;
  justify-items: end;
  color: var(--muted);
}

.family-opportunity-score strong {
  color: var(--forest);
  font-size: 34px;
  line-height: 1;
}

.family-opportunity-run-metrics,
.family-opportunity-run-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.family-opportunity-run-detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.family-opportunity-run-metrics > div,
.family-opportunity-analysis-list,
.family-opportunity-comps > div,
.family-opportunity-sources > div {
  min-width: 0;
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
}

.family-opportunity-run-metrics span,
.family-opportunity-comps small,
.family-opportunity-sources small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.family-opportunity-run-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

.family-opportunity-analysis-list strong,
.family-opportunity-comps > strong,
.family-opportunity-sources > strong {
  color: var(--ink);
}

.family-opportunity-analysis-list ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.family-opportunity-analysis-list li + li {
  margin-top: 5px;
}

.family-opportunity-comps > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
}

.family-opportunity-comps strong {
  color: var(--forest);
  text-align: right;
}

.family-opportunity-comps small {
  grid-column: 1 / -1;
}

.family-opportunity-sources a,
.family-opportunity-sources span {
  color: var(--forest);
  font-weight: 850;
  text-decoration: none;
}

.family-opportunity-sources a:hover,
.family-opportunity-sources a:focus-visible {
  text-decoration: underline;
}

.family-asset-category-panel {
  margin-bottom: 16px;
}

.family-asset-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.family-asset-category-card {
  display: grid;
  gap: 5px;
  min-height: 104px;
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 13px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.family-asset-category-card:hover,
.family-asset-category-card:focus-visible {
  border-color: var(--forest);
  outline: none;
  background: var(--forest-soft);
  box-shadow: 0 0 0 3px var(--asset-accent-shadow);
}

.family-asset-category-card span,
.family-asset-category-card small {
  color: var(--muted);
  font-size: 12px;
}

.family-asset-category-card strong {
  color: var(--forest);
  font-size: 20px;
  line-height: 1.1;
}

.family-asset-type-strip-panel {
  margin-bottom: 16px;
}

.panel-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.family-asset-type-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.family-asset-type-button {
  display: grid;
  flex: 1 1 132px;
  min-width: 132px;
  max-width: 190px;
  min-height: 88px;
  gap: 4px;
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.family-asset-type-button:hover,
.family-asset-type-button:focus-visible,
.family-asset-type-button.is-active {
  border-color: var(--forest);
  outline: none;
  background: var(--forest-soft);
  box-shadow: 0 0 0 3px var(--asset-accent-shadow);
}

.family-asset-type-button span,
.family-asset-type-button small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-asset-type-button span {
  color: var(--ink);
  font-weight: 850;
}

.family-asset-type-button strong {
  color: var(--forest);
  font-size: 17px;
  line-height: 1.1;
}

.family-asset-inventory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.family-asset-layout,
.family-asset-inventory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 18px;
  align-items: start;
}

.family-asset-management-page {
  display: grid;
  gap: 18px;
}

.family-management-category-panel {
  overflow: hidden;
}

.family-management-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.family-management-category-grid .family-asset-type-button {
  max-width: none;
  min-width: 0;
}

.family-management-toolbar {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(170px, 220px);
  gap: 10px;
  align-items: end;
}

.family-management-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.family-management-toolbar input,
.family-management-toolbar select {
  width: 100%;
}

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

.family-asset-management-panel .family-asset-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.family-asset-management-panel .family-asset-card {
  min-width: 0;
}

.family-management-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(38, 31, 23, 0.24);
}

.family-management-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 71;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(720px, calc(100vw - 28px));
  height: 100vh;
  overflow: auto;
  border-left: 1px solid var(--paloist-line, var(--line));
  padding: 20px;
  background: var(--paloist-paper, var(--panel));
  box-shadow: -28px 0 60px rgba(38, 31, 23, 0.2);
  animation: familyManagementDrawerIn 220ms ease-out;
}

.family-slide-drawer-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 520ms ease;
}

.family-slide-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.family-slide-drawer-panel {
  transform: translateX(100%);
  pointer-events: none;
  animation: none;
  transition: transform 520ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.family-slide-drawer-panel.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.family-management-drawer-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: -20px -20px 18px;
  border-bottom: 1px solid var(--paloist-line, var(--line));
  padding: 20px;
  background: inherit;
}

.family-management-drawer-header h2 {
  margin: 0;
}

.family-management-drawer .family-asset-intake-panel {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.family-protection-page {
  display: grid;
  gap: 18px;
}

.family-protection-layer-grid,
.family-protection-layout {
  display: grid;
  gap: 16px;
  align-items: start;
}

.family-protection-layer-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.family-protection-layout {
  grid-template-columns: minmax(0, 1.28fr) minmax(340px, 0.72fr);
}

.family-protection-layer-card {
  display: grid;
  gap: 12px;
}

.family-protection-layer-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.family-protection-meter {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #f2e5d8;
}

.family-protection-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--paloist-copper), var(--paloist-gold));
}

.family-protection-count-row,
.family-protection-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.family-protection-count-row span {
  border: 1px solid var(--asset-accent-line);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.family-protection-layer-review-button,
.family-protection-count-button {
  cursor: pointer;
}

.family-protection-layer-review-button {
  font: inherit;
  font-size: 12px;
}

.family-protection-layer-review-button:hover,
.family-protection-layer-review-button:focus-visible,
.family-protection-layer-review-button.is-active {
  border-color: var(--paloist-copper);
  color: var(--paloist-paper);
  background: var(--paloist-copper);
  outline: none;
}

.family-protection-count-button {
  border: 1px solid var(--asset-accent-line);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

.family-protection-count-button:hover,
.family-protection-count-button:focus-visible,
.family-protection-count-button.is-active {
  outline: none;
  box-shadow: 0 0 0 3px rgba(180, 107, 63, 0.12);
}

.family-protection-count-button.is-strong:hover,
.family-protection-count-button.is-strong:focus-visible,
.family-protection-count-button.is-strong.is-active {
  border-color: #95bd9a;
  color: #1f6b3f;
  background: #eff8ef;
}

.family-protection-count-button.is-review:hover,
.family-protection-count-button.is-review:focus-visible,
.family-protection-count-button.is-review.is-active {
  border-color: #d7b99d;
  color: var(--paloist-copper-dark);
  background: #fbefe4;
}

.family-protection-count-button.is-gap:hover,
.family-protection-count-button.is-gap:focus-visible,
.family-protection-count-button.is-gap.is-active {
  border-color: #efc0bd;
  color: #aa3934;
  background: #fff2f0;
}

.family-protection-count-row strong {
  color: var(--ink);
}

.family-protection-filter-row .ghost-button.is-active {
  color: var(--paloist-paper);
  background: var(--paloist-copper);
}

.family-protection-matrix-list,
.family-protection-attention-list,
.family-protection-alert-stack {
  display: grid;
  gap: 10px;
}

.family-protection-matrix-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) repeat(3, minmax(120px, 0.58fr)) auto;
  gap: 10px;
  align-items: stretch;
  border: 1px solid var(--asset-accent-line);
  border-radius: 10px;
  padding: 10px;
  background: #fffdf8;
}

.family-protection-asset-cell,
.family-protection-layer-cell,
.family-protection-policy-hint,
.family-protection-drawer-layer {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.family-protection-asset-cell strong,
.family-protection-policy-hint strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.family-protection-asset-cell span,
.family-protection-asset-cell small,
.family-protection-layer-cell small,
.family-protection-policy-hint span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.family-protection-filter-reason {
  border-left: 2px solid var(--paloist-copper);
  padding-left: 8px;
  color: var(--paloist-copper-dark) !important;
}

.family-protection-layer-cell {
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 8px;
  background: #fffcf5;
}

.family-protection-status {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--asset-accent-line);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

.family-protection-status.is-strong {
  border-color: #b9d6bd;
  color: #1f6b3f;
  background: #eff8ef;
}

.family-protection-status.is-review,
.family-protection-status.is-unknown {
  border-color: #ead3ab;
  color: #8f5d1c;
  background: #fff5df;
}

.family-protection-status.is-gap {
  border-color: #efc0bd;
  color: #aa3934;
  background: #fff2f0;
}

.family-protection-drawer-form {
  display: grid;
  gap: 16px;
}

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

.family-protection-drawer-layer,
.family-protection-policy-hint {
  border: 1px solid var(--asset-accent-line);
  border-radius: 10px;
  padding: 12px;
  background: #fffcf5;
}

.family-protection-drawer-layer label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

@keyframes familyManagementDrawerIn {
  from {
    transform: translateX(22px);
    opacity: 0.92;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.family-asset-intake-panel,
.family-asset-advisor-panel,
.family-asset-list-panel,
.family-asset-council-panel {
  min-width: 0;
}

.family-asset-photo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 16px;
}

.family-asset-document-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 16px;
}

.family-asset-photo-preview {
  display: grid;
  min-height: 138px;
  max-height: 178px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--asset-accent-dash, #cfe2d4);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfb;
  cursor: pointer;
  text-align: center;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.family-asset-photo-preview:hover,
.family-asset-photo-preview:focus-visible {
  border-color: var(--forest);
  outline: none;
  box-shadow: 0 0 0 3px var(--asset-accent-shadow, rgba(31, 93, 58, 0.1));
}

.family-asset-photo-preview.is-dragging {
  border-color: var(--forest);
  background: var(--forest-soft);
  box-shadow: 0 0 0 4px var(--asset-accent-shadow-strong, rgba(31, 93, 58, 0.14));
}

.family-asset-document-dropzone {
  display: grid;
  min-height: 138px;
  max-height: 178px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--asset-accent-dash, #cfe2d4);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  background: #fbfcfb;
  cursor: pointer;
  text-align: center;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.family-asset-document-dropzone:hover,
.family-asset-document-dropzone:focus-visible,
.family-asset-document-dropzone.is-dragging {
  border-color: var(--forest);
  outline: none;
  background: var(--forest-soft);
  box-shadow: 0 0 0 3px var(--asset-accent-shadow, rgba(31, 93, 58, 0.1));
}

.family-asset-document-dropzone strong,
.family-asset-document-dropzone span {
  display: block;
}

.family-asset-document-dropzone span {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
}

.family-asset-document-preview {
  display: grid;
  grid-template-columns: minmax(74px, 0.34fr) minmax(0, 0.66fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-width: 0;
  text-align: left;
}

.family-asset-document-preview img,
.family-asset-document-thumbnail {
  width: 100%;
  min-height: 82px;
  max-height: 128px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.7);
}

.family-asset-document-preview img {
  object-fit: cover;
}

.family-asset-document-thumbnail {
  display: grid;
  place-items: center;
  color: var(--forest);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.family-asset-document-preview strong,
.family-asset-document-preview span {
  overflow-wrap: anywhere;
}

.family-asset-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.family-asset-photo-preview strong,
.family-asset-photo-preview span {
  display: block;
}

.family-asset-photo-preview span {
  margin-top: 6px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 1.35;
}

.family-asset-photo-controls,
.family-asset-document-controls,
.family-document-controls-grid,
.family-profile-form,
.family-asset-form,
.family-asset-council-form,
.family-asset-alert-list,
.family-asset-card-grid,
.family-asset-compact-list,
.family-document-row-list,
.family-settings-list,
.family-planning-checklist {
  display: grid;
  align-content: start;
  gap: 8px;
}

.family-profile-panel {
  margin-bottom: 16px;
}

.family-profile-header {
  align-items: flex-start;
}

.family-profile-status {
  display: grid;
  gap: 6px;
  justify-items: end;
  min-width: 140px;
}

.family-profile-status small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

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

.family-profile-field {
  display: grid;
  min-width: 0;
  gap: 5px;
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
}

.family-profile-field span,
.family-profile-field small {
  display: block;
}

.family-profile-field span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.family-profile-field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.family-profile-field textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  line-height: 1.35;
}

.family-profile-field.is-family-name {
  grid-column: 1 / -1;
}

.family-profile-field.is-family-name textarea {
  min-height: 44px;
  resize: none;
}

.family-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.family-profile-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.family-asset-photo-controls .ghost-button,
.family-asset-document-controls .ghost-button {
  width: 100%;
}

.family-asset-photo-controls label,
.family-asset-document-controls label,
.family-asset-form label,
.family-asset-council-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.family-asset-photo-controls input,
.family-asset-document-controls input,
.family-document-controls-grid select,
.family-asset-form input,
.family-asset-form select,
.family-asset-form textarea,
.family-asset-council-form select,
.family-asset-council-form textarea {
  margin-top: 5px;
  padding: 10px;
}

.family-asset-appraisal-fields,
.family-asset-number-with-unit {
  display: grid;
  gap: 8px;
}

.family-asset-appraisal-fields {
  grid-template-columns: minmax(0, 1fr) minmax(96px, 0.7fr);
  align-items: end;
}

.family-asset-number-with-unit {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-top: 5px;
}

.family-asset-number-with-unit input {
  margin-top: 0;
}

.family-asset-number-with-unit small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.family-asset-council-submit {
  border-color: var(--forest);
  color: #fff;
  background: var(--forest);
  font-size: 13px;
  white-space: nowrap;
}

.family-asset-field-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.family-asset-ai-value-button {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--asset-accent-dash, #cfe2d4);
  border-radius: 8px;
  color: var(--forest);
  background: var(--forest-soft);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.family-asset-ai-value-button:hover,
.family-asset-ai-value-button:focus-visible {
  border-color: var(--forest);
  outline: none;
  box-shadow: 0 0 0 3px var(--asset-accent-shadow, rgba(31, 93, 58, 0.1));
}

.family-asset-ai-value-button:disabled {
  color: var(--muted);
  background: #f5f7f5;
  cursor: not-allowed;
  opacity: 0.7;
}

.family-asset-document-list {
  display: grid;
  gap: 8px;
}

.family-asset-document-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.family-asset-document-row > div {
  min-width: 0;
}

.family-asset-document-row strong,
.family-asset-document-row span {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.family-asset-document-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.family-asset-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.family-asset-form-actions button {
  min-width: 120px;
}

.family-asset-field-help {
  display: grid;
  align-content: center;
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  line-height: 1.35;
}

.family-asset-field-help strong,
.family-asset-field-help span {
  display: block;
}

.family-asset-field-help strong {
  color: var(--forest);
}

#family-asset-iq-view .family-asset-form-actions button[type="submit"] {
  border-color: var(--forest);
  color: #fff;
  background: var(--forest);
}

.family-asset-question-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--asset-accent-line, #dbe8df);
  border-radius: 8px;
  padding: 12px;
  background: var(--forest-soft);
}

.family-asset-question-list strong {
  color: var(--forest);
}

.family-asset-question-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.family-asset-edit-note {
  margin: 0 0 14px;
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  background: #fbfdff;
  font-size: 13px;
  line-height: 1.45;
}

.family-asset-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.family-asset-mini-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.family-asset-breakdown-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.family-asset-breakdown-row,
.family-asset-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.family-asset-breakdown-row span {
  color: var(--muted);
}

.family-asset-breakdown-row strong {
  color: var(--ink);
}

.family-asset-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--forest);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.family-asset-card:hover {
  border-color: var(--asset-accent-dash, #cfe2d4);
  box-shadow: 0 0 0 3px var(--asset-accent-shadow, rgba(31, 93, 58, 0.1));
}

.family-asset-card-image {
  display: grid;
  width: 108px;
  min-height: 108px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--forest-soft);
}

.family-asset-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.family-asset-card-image span {
  color: var(--forest);
  font-size: 32px;
  font-weight: 900;
}

.family-asset-card header strong,
.family-asset-card header span {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.family-asset-card header span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.family-asset-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.family-asset-card-actions .ghost-button {
  flex: 0 1 auto;
}

.family-asset-compact-row,
.family-document-row,
.family-setting-row,
.family-planning-checklist > div {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.family-document-row > div {
  min-width: 0;
  flex: 1 1 auto;
}

.family-document-row strong,
.family-document-row span,
.family-document-row small {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.family-asset-compact-row span,
.family-document-row span,
.family-setting-row span,
.family-planning-checklist span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.family-document-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.family-asset-compact-row > strong,
.family-document-row > span,
.family-setting-row > strong {
  flex: 0 0 auto;
  max-width: 36%;
  color: var(--forest);
  font-weight: 850;
  text-align: right;
}

.family-document-library-layout {
  display: grid;
  margin-bottom: 16px;
}

.family-document-control-panel {
  display: grid;
  gap: 14px;
}

.family-document-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.family-document-filter-buttons .ghost-button {
  border-color: var(--asset-accent-line);
  background: #fff;
}

.family-document-filter-buttons .ghost-button.is-active {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}

.family-document-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 280px);
  gap: 12px;
  align-items: end;
}

.family-document-search-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.family-document-controls-grid {
  display: grid;
  grid-template-columns: minmax(210px, 280px);
}

.family-document-controls-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.family-document-search-summary {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.family-document-upload-drawer {
  width: min(620px, calc(100vw - 28px));
}

.family-document-drawer-body {
  display: grid;
  gap: 14px;
}

.family-document-drawer-intro {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.family-document-estate-layout {
  display: grid;
  margin-bottom: 16px;
}

.family-library-document-dropzone {
  display: grid;
  min-height: 150px;
  place-items: center;
  border: 1px dashed var(--asset-accent-dash, #cfe2d4);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: #fbfcfb;
  cursor: pointer;
  text-align: center;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.family-library-document-dropzone:hover,
.family-library-document-dropzone:focus-visible,
.family-library-document-dropzone.is-dragging {
  border-color: var(--forest);
  outline: none;
  background: var(--forest-soft);
  box-shadow: 0 0 0 3px var(--asset-accent-shadow);
}

.family-library-document-dropzone strong,
.family-library-document-dropzone span {
  display: block;
}

.family-library-document-dropzone span {
  max-width: 640px;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.family-document-upload-actions,
.family-document-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.family-document-upload-actions input {
  display: none;
}

.family-document-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.family-document-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--asset-accent-line);
  border-left: 3px solid var(--forest);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  align-content: start;
}

.family-document-card header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.family-document-card header > div {
  min-width: 0;
}

.family-document-card h2 {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.family-document-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.family-document-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.family-document-meta-grid div {
  min-width: 0;
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 8px;
  background: var(--asset-accent-soft);
}

.family-document-meta-grid dt {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.family-document-meta-grid dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.family-document-card-actions {
  margin-top: auto;
}

.family-document-card-actions .ghost-button {
  flex: 1 1 132px;
  text-align: center;
}

.family-report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.family-report-builder-panel,
.family-report-guide-panel {
  display: grid;
  gap: 14px;
}

.family-report-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.family-report-control-grid label,
.family-report-static-control {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.family-report-checkbox {
  grid-column: span 2;
  display: flex !important;
  align-items: center;
  gap: 9px !important;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 253, 248, 0.72);
}

.family-report-checkbox input {
  width: 16px !important;
  height: 16px;
}

.family-report-static-control {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 253, 248, 0.72);
}

.family-report-static-control strong {
  color: var(--ink);
  font-size: 14px;
}

.family-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.family-report-guide-list {
  display: grid;
  gap: 9px;
}

.family-report-guide-list > div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 253, 248, 0.74);
}

.family-report-guide-list strong {
  color: var(--ink);
}

.family-report-guide-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.family-report-preview-shell {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(41, 36, 31, 0.06);
}

.family-report-document {
  color: #111;
  background: #fff;
  font-family: Georgia, "Times New Roman", serif;
}

.family-report-document-header,
.family-report-section > header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 2px solid #111;
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.family-report-document-header span {
  display: block;
  margin-bottom: 6px;
  color: #555;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.family-report-document-header h2,
.family-report-section h3,
.family-report-asset-card h4 {
  margin: 0;
  color: #111;
}

.family-report-document-header h2 {
  font-size: 30px;
  line-height: 1.05;
}

.family-report-document-header p,
.family-report-section p,
.family-report-asset-card p {
  margin: 6px 0 0;
  color: #333;
  line-height: 1.45;
}

.family-report-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 20px;
}

.family-report-meta-grid div,
.family-report-policy-summary,
.family-report-note-list,
.family-report-asset-card,
.family-report-empty {
  border: 1px solid #999;
  background: #fff;
}

.family-report-meta-grid div,
.family-report-policy-summary,
.family-report-note-list,
.family-report-empty {
  padding: 10px;
}

.family-report-meta-grid dt,
.family-report-asset-card dt {
  color: #555;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.family-report-meta-grid dd,
.family-report-asset-card dd {
  margin: 3px 0 0;
  color: #111;
  font-weight: 700;
}

.family-report-policy-summary,
.family-report-note-list,
.family-report-empty {
  margin-bottom: 18px;
}

.family-report-note-list ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.family-report-note-list li {
  margin: 4px 0;
  color: #222;
}

.family-report-section {
  margin-top: 22px;
}

.family-report-section > header strong {
  white-space: nowrap;
}

.family-report-asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.family-report-asset-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
}

.family-report-asset-photo {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 1px solid #999;
  color: #111;
  background: #f6f6f6;
  overflow: hidden;
  font-size: 30px;
  font-weight: 700;
}

.family-report-asset-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}

.family-report-asset-body {
  min-width: 0;
}

.family-report-asset-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin: 10px 0 0;
}

.family-report-asset-card h4,
.family-report-asset-card p,
.family-report-asset-card dd {
  overflow-wrap: anywhere;
}

.family-planning-panel {
  min-height: 300px;
}

.family-inheritance-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.family-inheritance-review-stack,
.family-inheritance-bottom-list {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.family-beneficiary-grid,
.family-inheritance-asset-list {
  display: grid;
  gap: 10px;
}

.family-beneficiary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.family-beneficiary-card {
  display: grid;
  gap: 5px;
  min-height: 96px;
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.family-beneficiary-card:hover,
.family-beneficiary-card:focus-visible,
.family-beneficiary-card.is-active {
  border-color: var(--forest);
  outline: none;
  background: var(--forest-soft);
  box-shadow: 0 0 0 3px var(--asset-accent-shadow);
}

.family-beneficiary-card span,
.family-beneficiary-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-beneficiary-card span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.family-beneficiary-card strong {
  color: var(--forest);
  font-size: 20px;
  line-height: 1.1;
}

.family-beneficiary-card small {
  color: var(--muted);
  font-size: 12px;
}

.family-inheritance-asset-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.family-inheritance-asset-row > div,
.family-estate-asset-row > div,
.family-insurance-asset-row > div {
  min-width: 0;
}

.family-inheritance-asset-row strong,
.family-inheritance-asset-row span,
.family-estate-asset-row strong,
.family-estate-asset-row span,
.family-estate-asset-row small,
.family-insurance-asset-row strong,
.family-insurance-asset-row span,
.family-insurance-asset-row small {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.family-inheritance-asset-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.family-inheritance-asset-row > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.family-inheritance-asset-row > div:last-child strong {
  flex-basis: 100%;
  color: var(--forest);
  text-align: right;
}

.family-estate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.family-estate-document-dropzone {
  display: grid;
  min-height: 168px;
  place-items: center;
  border: 1px dashed var(--asset-accent-dash, #cfe2d4);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: #fbfcfb;
  cursor: pointer;
  text-align: center;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.family-estate-document-dropzone:hover,
.family-estate-document-dropzone:focus-visible,
.family-estate-document-dropzone.is-dragging {
  border-color: var(--forest);
  outline: none;
  background: var(--forest-soft);
  box-shadow: 0 0 0 3px var(--asset-accent-shadow);
}

.family-estate-document-dropzone strong,
.family-estate-document-dropzone span {
  display: block;
}

.family-estate-document-dropzone span {
  max-width: 520px;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.family-estate-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.family-estate-upload-actions input {
  display: none;
}

.family-estate-asset-list,
.family-estate-analysis-list {
  display: grid;
  gap: 10px;
}

.family-estate-asset-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.family-estate-asset-row span,
.family-estate-asset-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.family-estate-asset-row > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.family-estate-asset-row > div:last-child strong {
  flex-basis: 100%;
  color: var(--forest);
  text-align: right;
}

.family-estate-analysis-card {
  border: 1px solid var(--asset-accent-line);
  border-left: 3px solid var(--forest);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.family-estate-analysis-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.family-estate-analysis-card header > div,
.family-insurance-analysis-card header > div {
  min-width: 0;
}

.family-estate-analysis-card strong,
.family-estate-analysis-card span,
.family-insurance-analysis-card strong,
.family-insurance-analysis-card span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.family-estate-analysis-card header span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.family-estate-analysis-card p {
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.45;
}

.family-estate-analysis-list-block {
  margin-top: 10px;
}

.family-estate-analysis-list-block > strong {
  color: var(--forest);
  font-size: 12px;
  text-transform: uppercase;
}

.family-estate-analysis-list-block ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.family-insurance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.family-insurance-document-dropzone {
  display: grid;
  min-height: 168px;
  place-items: center;
  border: 1px dashed var(--asset-accent-dash, #cfe2d4);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: #fbfcfb;
  cursor: pointer;
  text-align: center;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.family-insurance-document-dropzone:hover,
.family-insurance-document-dropzone:focus-visible,
.family-insurance-document-dropzone.is-dragging {
  border-color: var(--forest);
  outline: none;
  background: var(--forest-soft);
  box-shadow: 0 0 0 3px var(--asset-accent-shadow);
}

.family-insurance-document-dropzone strong,
.family-insurance-document-dropzone span {
  display: block;
}

.family-insurance-document-dropzone span {
  max-width: 540px;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.family-insurance-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.family-insurance-upload-actions input {
  display: none;
}

.family-insurance-asset-list,
.family-insurance-analysis-list {
  display: grid;
  gap: 10px;
}

.family-insurance-asset-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.family-insurance-asset-row span,
.family-insurance-asset-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.family-insurance-asset-row > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.family-insurance-asset-row > div:last-child strong {
  flex-basis: 100%;
  color: var(--forest);
  text-align: right;
}

.family-insurance-analysis-card {
  border: 1px solid var(--asset-accent-line);
  border-left: 3px solid var(--forest);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.family-insurance-analysis-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.family-insurance-analysis-card header span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.family-insurance-analysis-card p {
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.45;
}

.family-policy-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.family-policy-detail-grid div {
  border: 1px solid var(--asset-accent-line);
  border-radius: 8px;
  padding: 8px;
  background: var(--asset-accent-soft);
}

.family-policy-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.family-policy-detail-grid strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.family-planning-checklist span {
  font-weight: 800;
  white-space: nowrap;
}

.family-asset-card p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.45;
}

.family-asset-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.family-asset-meta-grid span {
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--muted);
  background: var(--forest-soft);
  font-size: 12px;
}

.family-asset-expert-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.family-asset-council-result .summary-card {
  margin-top: 12px;
}

.summary-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.expert-card,
.summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.expert-card h3,
.summary-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.expert-card p,
.summary-card p {
  margin: 0;
  color: var(--muted);
}

.family-asset-photo-preview,
.family-asset-document-dropzone,
.family-library-document-dropzone,
.family-estate-document-dropzone,
.family-insurance-document-dropzone {
  position: relative;
  outline-offset: 2px;
}

.family-asset-photo-preview::after,
.family-asset-document-dropzone::after,
.family-library-document-dropzone::after,
.family-estate-document-dropzone::after,
.family-insurance-document-dropzone::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 6px;
  pointer-events: none;
}

.family-asset-photo-preview:hover::after,
.family-asset-document-dropzone:hover::after,
.family-library-document-dropzone:hover::after,
.family-estate-document-dropzone:hover::after,
.family-insurance-document-dropzone:hover::after {
  border: 1px solid rgba(31, 79, 134, 0.12);
}

.app-shell.family-mode,
.council-drawer.asset-council-theme {
  --paloist-charcoal: #29241f;
  --paloist-charcoal-soft: #3f3b36;
  --paloist-cream: #f3eee5;
  --paloist-cream-light: #fbf7f0;
  --paloist-paper: #fffdf8;
  --paloist-copper: #b46b3f;
  --paloist-copper-dark: #8f4f2e;
  --paloist-gold: #cba246;
  --paloist-taupe: #8a8176;
  --paloist-line: #ded4c6;
  --paloist-line-strong: #cbbba8;
  --forest: var(--paloist-copper);
  --forest-dark: var(--paloist-copper-dark);
  --forest-soft: #f8eadc;
  --ink: #27221d;
  --muted: #776f65;
  --line: var(--paloist-line);
  --line-strong: var(--paloist-line-strong);
  --panel: var(--paloist-paper);
  --page: var(--paloist-cream);
  --asset-accent-soft: #f8eadc;
  --asset-accent-line: #d7b99d;
  --asset-accent-dash: #c98f64;
  --asset-accent-shadow: rgba(180, 107, 63, 0.14);
  --asset-accent-shadow-strong: rgba(180, 107, 63, 0.2);
  --shadow-soft: 0 1px 2px rgba(51, 41, 31, 0.08);
  --shadow-lift: 0 16px 34px rgba(51, 41, 31, 0.13);
}

.app-shell.family-mode {
  background:
    linear-gradient(180deg, rgba(251, 247, 240, 0.96), rgba(243, 238, 229, 0.98)),
    var(--paloist-cream);
}

.app-shell.family-mode .sidebar {
  border-right-color: var(--paloist-line-strong);
  color: var(--paloist-cream-light);
  background: var(--paloist-charcoal);
  box-shadow: 16px 0 44px rgba(41, 36, 31, 0.08);
}

.app-shell.family-mode .sidebar-brand {
  border-bottom-color: rgba(251, 247, 240, 0.14);
}

.app-shell.family-mode .sidebar-brand-main {
  color: var(--paloist-cream-light);
}

.app-shell.family-mode .sidebar-brand-main strong,
.app-shell.family-mode .investor-dashboard-copy strong {
  color: var(--paloist-cream-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0;
}

.app-shell.family-mode .investor-dashboard-copy strong {
  font-size: 21px;
  line-height: 1.05;
}

.app-shell.family-mode .sidebar-brand-main span,
.app-shell.family-mode .investor-dashboard-copy span,
.app-shell.family-mode .sidebar-footer span,
.app-shell.family-mode .sidebar-footer strong,
.app-shell.family-mode #logout-button {
  color: rgba(251, 247, 240, 0.7);
}

.app-shell.family-mode .settings-icon-button {
  border-color: rgba(251, 247, 240, 0.22);
  color: #111814;
  background: rgba(255, 255, 255, 0.04);
}

.app-shell.family-mode .settings-icon-button span,
.app-shell.family-mode .settings-icon-button::before,
.app-shell.family-mode .settings-icon-button::after {
  background: #111814;
}

.app-shell.family-mode .settings-icon-button:hover,
.app-shell.family-mode .settings-icon-button:focus-visible,
.app-shell.family-mode .settings-icon-button.is-active {
  border-color: var(--paloist-copper);
  color: #111814;
  background: rgba(180, 107, 63, 0.22);
}

.app-shell.family-mode .brand-mark {
  color: #fff;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.32), transparent 28%),
    linear-gradient(135deg, #4f46e5, #8b5cf6);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
}

.app-shell.family-mode .investor-dashboard-button {
  border-color: rgba(251, 247, 240, 0.22);
  border-radius: 8px;
  padding: 8px;
}

.app-shell.family-mode .investor-dashboard-button:hover,
.app-shell.family-mode .investor-dashboard-button:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

.app-shell.family-mode .nav-list {
  gap: 8px;
  padding: 20px 16px;
}

.app-shell.family-mode .nav-item {
  border-color: transparent;
  color: rgba(251, 247, 240, 0.72);
  background: transparent;
  font-weight: 760;
}

.app-shell.family-mode .nav-item:hover,
.app-shell.family-mode .nav-item:focus-visible,
.app-shell.family-mode .family-nav-list .nav-item.is-active {
  border-color: rgba(203, 162, 70, 0.46);
  color: var(--paloist-cream-light);
  background: rgba(180, 107, 63, 0.22);
  box-shadow: inset 3px 0 0 var(--paloist-gold);
}

.app-shell.family-mode .sidebar-footer {
  border-top-color: rgba(251, 247, 240, 0.14);
}

.app-shell.family-mode .avatar {
  color: var(--paloist-charcoal);
  background: var(--paloist-gold);
}

.app-shell.family-mode .workspace {
  background:
    radial-gradient(circle at 100% 0%, rgba(180, 107, 63, 0.08), transparent 28%),
    var(--paloist-cream);
}

.app-shell.family-mode .topbar {
  border-bottom: 1px solid var(--paloist-line);
  padding-bottom: 18px;
}

.app-shell.family-mode .topbar .eyebrow,
#family-asset-iq-view .eyebrow,
.council-drawer.asset-council-theme .eyebrow {
  color: var(--paloist-copper);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.app-shell.family-mode .topbar h1,
#family-asset-iq-view .panel h2,
#family-asset-iq-view .family-overview-hero h2,
.council-drawer.asset-council-theme .drawer-header h2,
.council-drawer.asset-council-theme .summary-card h3 {
  color: var(--paloist-charcoal);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
}

.app-shell.family-mode .page-subtitle {
  color: var(--paloist-taupe);
}

.app-shell.family-mode .asset-council-button,
#family-asset-iq-view .ghost-button,
#family-asset-iq-view .family-asset-council-submit,
#family-asset-iq-view .family-asset-form-actions button[type="submit"] {
  border-color: var(--paloist-copper);
  color: var(--paloist-copper-dark);
  background: var(--paloist-paper);
}

.app-shell.family-mode .asset-council-button:hover,
.app-shell.family-mode .asset-council-button:focus-visible,
#family-asset-iq-view .ghost-button:hover,
#family-asset-iq-view .ghost-button:focus-visible,
#family-asset-iq-view .family-asset-council-submit,
#family-asset-iq-view .family-asset-form-actions button[type="submit"] {
  color: var(--paloist-paper);
  background: var(--paloist-copper);
  box-shadow: 0 0 0 3px rgba(180, 107, 63, 0.14);
}

#family-asset-iq-view .danger-button {
  border-color: #b84542;
  color: #b84542;
  background: #fff8f6;
}

#family-asset-iq-view .danger-button:hover,
#family-asset-iq-view .danger-button:focus-visible {
  color: #fff;
  background: #b84542;
}

.app-shell.family-mode button:not(:disabled):hover,
.app-shell.family-mode button:not(:disabled):focus-visible,
#family-asset-iq-view [role="button"]:not([aria-disabled="true"]):hover,
#family-asset-iq-view [role="button"]:not([aria-disabled="true"]):focus-visible,
.council-drawer.asset-council-theme button:not(:disabled):hover,
.council-drawer.asset-council-theme button:not(:disabled):focus-visible {
  border-color: var(--paloist-copper);
  box-shadow: 0 0 0 3px rgba(180, 107, 63, 0.14);
}

.app-shell.family-mode .council-top-button.is-dashboard-hidden {
  display: none;
}

.app-shell.family-mode .sidebar {
  border-right-color: #e8eaf0;
  color: #1c1e26;
  background: #fff;
  box-shadow: 1px 0 0 rgba(20, 23, 40, 0.02);
}

.app-shell.family-mode .sidebar-brand {
  padding: 20px 18px;
  border-bottom-color: #eef0f4;
}

.app-shell.family-mode .investor-dashboard-button {
  gap: 10px;
  border: 1px solid #d8e7dc;
  border-radius: 16px;
  padding: 10px 12px;
  color: var(--forest);
  background: #f7fbf8;
}

.app-shell.family-mode .investor-dashboard-button:hover,
.app-shell.family-mode .investor-dashboard-button:focus-visible {
  border-color: #b9d7c3;
  color: var(--forest-dark);
  background: #eef8f1;
  box-shadow: 0 0 0 4px rgba(28, 106, 60, 0.08);
}

.app-shell.family-mode .investor-dashboard-button .button-brand-mark {
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.3), transparent 28%),
    linear-gradient(135deg, #4f46e5, #8b5cf6);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
}

.app-shell.family-mode .investor-dashboard-copy strong {
  color: var(--forest);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 19px;
  font-weight: 850;
}

.app-shell.family-mode .investor-dashboard-copy span {
  color: #69756d;
  font-size: 11.5px;
  font-weight: 700;
}

.app-shell.family-mode .family-nav-list {
  gap: 3px;
  padding: 12px 14px 18px;
}

.app-shell.family-mode .family-nav-list .nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 42px;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  padding: 10px 11px;
  color: #747985;
  background: transparent;
  box-shadow: none;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 13.5px;
  font-weight: 720;
  letter-spacing: 0;
  text-align: left;
}

.app-shell.family-mode .family-nav-list .nav-item > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell.family-mode .family-nav-list .nav-item:hover,
.app-shell.family-mode .family-nav-list .nav-item:focus-visible {
  color: #1f2430;
  background: #f6f7fb;
  box-shadow: none;
}

.app-shell.family-mode .family-nav-list .nav-item.is-active {
  color: #4f46e5;
  background: #eef0fe;
  box-shadow: none;
}

.app-shell.family-mode .nav-icon {
  display: grid;
  position: relative;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 6px;
  color: currentColor;
}

.app-shell.family-mode .nav-icon::before,
.app-shell.family-mode .nav-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
  border-color: currentColor;
}

.app-shell.family-mode .nav-icon-dashboard::before {
  top: 4px;
  left: 4px;
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
  box-shadow:
    7px 0 0 currentColor,
    0 7px 0 currentColor,
    7px 7px 0 currentColor;
}

.app-shell.family-mode .nav-icon-management::before {
  inset: 4px 5px 7px;
  border: 1.7px solid currentColor;
  border-radius: 4px;
}

.app-shell.family-mode .nav-icon-management::after {
  right: 4px;
  bottom: 4px;
  left: 7px;
  height: 7px;
  border: 1.7px solid currentColor;
  border-radius: 4px;
}

.app-shell.family-mode .nav-icon-protection::before {
  top: 3px;
  left: 5px;
  width: 10px;
  height: 13px;
  border: 1.8px solid currentColor;
  border-radius: 8px 8px 10px 10px;
}

.app-shell.family-mode .nav-icon-protection::after {
  top: 8px;
  left: 9px;
  width: 2px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}

.app-shell.family-mode .nav-icon-opportunity::before {
  inset: 4px;
  border: 1.7px solid currentColor;
  border-radius: 999px;
}

.app-shell.family-mode .nav-icon-opportunity::after {
  top: 8px;
  left: 8px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
}

.app-shell.family-mode .nav-icon-inheritance::before {
  top: 4px;
  left: 9px;
  width: 2px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
}

.app-shell.family-mode .nav-icon-inheritance::after {
  top: 6px;
  left: 4px;
  width: 12px;
  height: 9px;
  border-top: 1.8px solid currentColor;
  border-right: 1.8px solid currentColor;
  border-left: 1.8px solid currentColor;
  border-radius: 5px 5px 0 0;
}

.app-shell.family-mode .nav-icon-documents::before {
  inset: 3px 5px 3px 4px;
  border: 1.7px solid currentColor;
  border-radius: 3px;
}

.app-shell.family-mode .nav-icon-documents::after {
  top: 7px;
  right: 7px;
  left: 7px;
  height: 1.7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
}

.app-shell.family-mode .nav-icon-reports::before {
  bottom: 4px;
  left: 5px;
  width: 3px;
  height: 7px;
  border-radius: 999px 999px 1px 1px;
  background: currentColor;
  box-shadow:
    5px -4px 0 currentColor,
    10px -1px 0 currentColor;
}

.app-shell.family-mode .sidebar-footer {
  border-top-color: #eef0f4;
  color: #69756d;
}

.app-shell.family-mode .sidebar-footer span,
.app-shell.family-mode .sidebar-footer strong,
.app-shell.family-mode #logout-button {
  color: #69756d;
}

.app-shell.family-mode .avatar {
  color: #fff;
  background: linear-gradient(145deg, #4f46e5, #8b5cf6);
}

.app-shell.family-mode:has(#family-asset-iq-view .paloist-dashboard-shell) {
  background: #f4f5f8;
}

.app-shell.family-mode:has(#family-asset-iq-view .paloist-dashboard-shell) .workspace {
  background: #f4f5f8;
}

.app-shell.family-mode:has(#family-asset-iq-view .paloist-dashboard-shell) .topbar {
  border-bottom-color: transparent;
}

.app-shell.family-mode:has(#family-asset-iq-view .paloist-dashboard-shell) .topbar .eyebrow {
  color: #4f46e5;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.app-shell.family-mode:has(#family-asset-iq-view .paloist-dashboard-shell) .topbar h1 {
  color: #1c1e26;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.app-shell.family-mode:has(#family-asset-iq-view .paloist-dashboard-shell) .page-subtitle {
  color: #6b7280;
}

#family-asset-iq-view .metric-panel,
#family-asset-iq-view .panel,
#family-asset-iq-view .family-document-card,
#family-asset-iq-view .family-opportunity-rule-card,
#family-asset-iq-view .family-opportunity-run-card,
.council-drawer.asset-council-theme .drawer-panel,
.council-drawer.asset-council-theme .expert-card,
.council-drawer.asset-council-theme .summary-card {
  border-color: var(--paloist-line);
  background: var(--paloist-paper);
  box-shadow: 0 10px 28px rgba(51, 41, 31, 0.08);
}

#family-asset-iq-view .panel,
#family-asset-iq-view .metric-panel {
  border-radius: 10px;
}

#family-asset-iq-view .primary-metric,
#family-asset-iq-view .family-inheritance-dashboard-panel,
#family-asset-iq-view .family-overview-hero {
  border-color: #d1a77f;
  background:
    linear-gradient(135deg, rgba(180, 107, 63, 0.12), rgba(255, 253, 248, 0.94)),
    var(--paloist-paper);
}

#family-asset-iq-view .metric-panel span,
#family-asset-iq-view .panel-subtitle,
#family-asset-iq-view .muted,
#family-asset-iq-view .family-asset-card header span,
#family-asset-iq-view .family-document-row span,
#family-asset-iq-view .family-setting-row span {
  color: var(--paloist-taupe);
}

#family-asset-iq-view .metric-panel strong,
#family-asset-iq-view .family-asset-category-card strong,
#family-asset-iq-view .family-asset-type-button strong,
#family-asset-iq-view .family-inheritance-dashboard-stats strong,
#family-asset-iq-view .family-asset-card-image span,
#family-asset-iq-view .family-asset-breakdown-row strong,
#family-asset-iq-view .family-opportunity-score strong,
#family-asset-iq-view .family-opportunity-comps strong,
#family-asset-iq-view .family-asset-field-help strong {
  color: var(--paloist-copper-dark);
}

#family-asset-iq-view .panel-pill,
.council-drawer.asset-council-theme .panel-pill,
#family-asset-iq-view .provider-status.is-ready,
#family-asset-iq-view .status-pill.is-ready {
  border-color: #d7b99d;
  color: var(--paloist-copper-dark);
  background: #fbefe4;
}

#family-asset-iq-view .family-asset-category-card,
#family-asset-iq-view .family-asset-type-button,
#family-asset-iq-view .family-asset-compact-row,
#family-asset-iq-view .family-document-row,
#family-asset-iq-view .family-setting-row,
#family-asset-iq-view .family-profile-field,
#family-asset-iq-view .family-planning-checklist > div,
#family-asset-iq-view .family-beneficiary-card,
#family-asset-iq-view .family-inheritance-asset-row,
#family-asset-iq-view .family-estate-asset-row,
#family-asset-iq-view .family-estate-analysis-card,
#family-asset-iq-view .family-insurance-asset-row,
#family-asset-iq-view .family-insurance-analysis-card,
#family-asset-iq-view .family-protection-matrix-row,
#family-asset-iq-view .family-protection-layer-cell,
#family-asset-iq-view .family-protection-drawer-layer,
#family-asset-iq-view .family-protection-policy-hint,
#family-asset-iq-view .family-opportunity-run-metrics > div,
#family-asset-iq-view .family-opportunity-analysis-list,
#family-asset-iq-view .family-opportunity-comps > div,
#family-asset-iq-view .family-opportunity-sources > div {
  border-color: var(--paloist-line);
  background: #fffcf5;
}

#family-asset-iq-view .family-asset-category-card:hover,
#family-asset-iq-view .family-asset-category-card:focus-visible,
#family-asset-iq-view .family-asset-type-button:hover,
#family-asset-iq-view .family-asset-type-button:focus-visible,
#family-asset-iq-view .family-asset-type-button.is-active {
  border-color: var(--paloist-copper);
  background: #fbefe4;
  box-shadow: 0 0 0 3px rgba(180, 107, 63, 0.14);
}

#family-asset-iq-view .family-asset-card {
  border-color: var(--paloist-line);
  border-left-color: var(--paloist-copper);
  background: #fffcf5;
}

#family-asset-iq-view .family-asset-card:hover {
  border-color: #d1a77f;
  box-shadow: 0 0 0 3px rgba(180, 107, 63, 0.12);
}

#family-asset-iq-view .family-asset-card-image,
#family-asset-iq-view .family-asset-photo-preview,
#family-asset-iq-view .family-asset-document-dropzone,
#family-asset-iq-view .family-library-document-dropzone,
#family-asset-iq-view .family-estate-document-dropzone,
#family-asset-iq-view .family-insurance-document-dropzone,
#family-asset-iq-view .family-opportunity-hint,
#family-asset-iq-view .family-asset-question-list,
#family-asset-iq-view .family-asset-field-help,
#family-asset-iq-view .empty-state {
  border-color: #d7b99d;
  background: #f8eadc;
}

#family-asset-iq-view input,
#family-asset-iq-view select,
#family-asset-iq-view textarea,
.council-drawer.asset-council-theme textarea {
  border-color: var(--paloist-line);
  color: var(--paloist-charcoal);
  background: #fffdf8;
}

#family-asset-iq-view input:focus,
#family-asset-iq-view select:focus,
#family-asset-iq-view textarea:focus,
.council-drawer.asset-council-theme textarea:focus {
  border-color: var(--paloist-copper);
  box-shadow: 0 0 0 3px rgba(180, 107, 63, 0.14);
}

#family-asset-iq-view .success-banner {
  border-color: #d7b99d;
  color: var(--paloist-copper-dark);
  background: #fbefe4;
}

#family-asset-iq-view .paloist-mobile-demo-page {
  display: grid;
  gap: 18px;
}

#family-asset-iq-view .paloist-mobile-demo-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

#family-asset-iq-view .paloist-mobile-demo-intro h2 {
  margin: 0;
}

#family-asset-iq-view .paloist-mobile-demo-chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 240px;
}

#family-asset-iq-view .paloist-mobile-demo-chip-row span {
  border: 1px solid #d7b99d;
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--paloist-copper-dark);
  background: #fbefe4;
  font-size: 12px;
  font-weight: 850;
}

#family-asset-iq-view .paloist-mobile-demo-stage {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(320px, 400px) minmax(180px, 260px);
  align-items: center;
  justify-content: center;
  gap: 24px;
}

#family-asset-iq-view .paloist-full-mobile-stage {
  display: grid;
  justify-items: center;
  padding: 4px 0 18px;
}

#family-asset-iq-view .paloist-mobile-demo-side-panel {
  border: 1px solid var(--paloist-line);
  border-radius: 10px;
  padding: 18px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 10px 26px rgba(51, 41, 31, 0.06);
}

#family-asset-iq-view .paloist-mobile-demo-side-panel h3 {
  margin: 0 0 12px;
  color: var(--paloist-charcoal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
}

#family-asset-iq-view .paloist-mobile-demo-side-panel p {
  margin: 0;
  color: var(--paloist-taupe);
  font-size: 14px;
  line-height: 1.5;
}

#family-asset-iq-view .paloist-mobile-demo-side-panel button {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--paloist-line);
  border-radius: 999px;
  padding: 10px 12px;
  color: var(--paloist-charcoal);
  background: #fffdf8;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

#family-asset-iq-view .paloist-mobile-demo-side-panel button:hover,
#family-asset-iq-view .paloist-mobile-demo-side-panel button:focus-visible,
#family-asset-iq-view .paloist-mobile-demo-side-panel button.is-active {
  border-color: var(--paloist-copper);
  color: var(--paloist-copper-dark);
  background: #fbefe4;
}

#family-asset-iq-view .paloist-phone-shell {
  position: relative;
  width: min(100%, 354px);
  min-height: 690px;
  border: 10px solid #24201c;
  border-radius: 38px;
  padding: 14px 12px;
  background: #24201c;
  box-shadow: 0 28px 70px rgba(41, 36, 31, 0.28);
}

#family-asset-iq-view .paloist-phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 2;
  width: 112px;
  height: 20px;
  border-radius: 0 0 14px 14px;
  background: #24201c;
  transform: translateX(-50%);
}

#family-asset-iq-view .paloist-phone-screen {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 640px;
  max-height: 640px;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(circle at 92% 12%, rgba(180, 107, 63, 0.1), transparent 26%),
    #f6f0e7;
}

#family-asset-iq-view .paloist-phone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 18px 8px;
}

#family-asset-iq-view .paloist-phone-header button {
  border: 0;
  padding: 0;
  color: var(--paloist-charcoal);
  background: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
}

#family-asset-iq-view .paloist-phone-header button:last-child {
  font-family: inherit;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#family-asset-iq-view .paloist-mobile-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 18px 18px;
  scrollbar-width: thin;
}

#family-asset-iq-view .paloist-mobile-screen.is-centered {
  justify-content: center;
}

#family-asset-iq-view .paloist-mobile-hero-card {
  border-radius: 10px;
  padding: 18px 16px;
  color: #fffdf8;
  background:
    radial-gradient(circle at 92% 24%, rgba(255, 255, 255, 0.18), transparent 18%),
    linear-gradient(135deg, #8f4f2e, #d48b4f);
}

#family-asset-iq-view .paloist-mobile-hero-card span,
#family-asset-iq-view .paloist-mobile-kicker,
#family-asset-iq-view .paloist-mobile-recognition-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--paloist-copper);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

#family-asset-iq-view .paloist-mobile-hero-card span {
  color: rgba(255, 253, 248, 0.76);
}

#family-asset-iq-view .paloist-mobile-hero-card strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

#family-asset-iq-view .paloist-mobile-copy-block h3 {
  margin: 0 0 4px;
  color: var(--paloist-charcoal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
}

#family-asset-iq-view .paloist-mobile-copy-block p,
#family-asset-iq-view .paloist-mobile-listening {
  margin: 0;
  color: var(--paloist-taupe);
  font-size: 12px;
  line-height: 1.4;
}

#family-asset-iq-view .paloist-mobile-copy-block.is-centered,
#family-asset-iq-view .paloist-mobile-listening {
  text-align: center;
}

#family-asset-iq-view .paloist-mobile-pill-list {
  display: grid;
  gap: 7px;
}

#family-asset-iq-view .paloist-mobile-pill-list button,
#family-asset-iq-view .paloist-mobile-menu-card button {
  border: 1px solid var(--paloist-line);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--paloist-charcoal);
  background: #fffdf8;
  font-size: 11px;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

#family-asset-iq-view .paloist-mobile-pill-list button:hover,
#family-asset-iq-view .paloist-mobile-pill-list button:focus-visible,
#family-asset-iq-view .paloist-mobile-menu-card button:hover,
#family-asset-iq-view .paloist-mobile-menu-card button:focus-visible {
  border-color: var(--paloist-copper);
  background: #fbefe4;
}

#family-asset-iq-view .paloist-mobile-assistant {
  overflow: hidden;
  border: 1px solid var(--paloist-line);
  border-radius: 9px;
  background: #fffdf8;
}

#family-asset-iq-view .paloist-mobile-assistant header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  color: #fffdf8;
  background: #24201c;
  font-size: 11px;
}

#family-asset-iq-view .paloist-mobile-assistant header span {
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 9px;
}

#family-asset-iq-view .paloist-mobile-assistant p {
  margin: 0;
  padding: 12px;
  color: var(--paloist-taupe);
  font-size: 12px;
  line-height: 1.45;
}

#family-asset-iq-view .paloist-mobile-assistant button,
#family-asset-iq-view .paloist-mobile-primary-button,
#family-asset-iq-view .paloist-mobile-secondary-button,
#family-asset-iq-view .paloist-mobile-recognition-card button,
#family-asset-iq-view .paloist-mobile-risk-card button {
  border: 1px solid var(--paloist-copper);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fffdf8;
  background: var(--paloist-copper);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

#family-asset-iq-view .paloist-mobile-assistant button {
  margin: 0 12px 12px;
  padding: 8px 10px;
}

#family-asset-iq-view .paloist-mobile-secondary-button {
  color: var(--paloist-copper-dark);
  background: #fffdf8;
}

#family-asset-iq-view .paloist-mobile-voice-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 82px;
}

#family-asset-iq-view .paloist-mobile-voice-wave span {
  display: block;
  width: 5px;
  border-radius: 999px;
  background: var(--paloist-copper);
}

#family-asset-iq-view .paloist-mobile-voice-wave span:nth-child(1),
#family-asset-iq-view .paloist-mobile-voice-wave span:nth-child(6) {
  height: 26px;
}

#family-asset-iq-view .paloist-mobile-voice-wave span:nth-child(2),
#family-asset-iq-view .paloist-mobile-voice-wave span:nth-child(5) {
  height: 48px;
}

#family-asset-iq-view .paloist-mobile-voice-wave span:nth-child(3),
#family-asset-iq-view .paloist-mobile-voice-wave span:nth-child(4) {
  height: 64px;
}

#family-asset-iq-view .paloist-mobile-action-row,
#family-asset-iq-view .paloist-mobile-split-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#family-asset-iq-view .paloist-mobile-action-row button {
  border: 0;
  border-radius: 9px;
  min-height: 54px;
  color: #fffdf8;
  background: #3f3b36;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

#family-asset-iq-view .paloist-mobile-action-row button.is-primary {
  background: var(--paloist-copper);
}

#family-asset-iq-view .paloist-mobile-camera-card {
  display: grid;
  place-items: center;
  min-height: 168px;
  border-radius: 10px;
  background: #24201c;
}

#family-asset-iq-view .paloist-mobile-watch-face,
#family-asset-iq-view .paloist-mobile-small-watch {
  width: 72px;
  height: 86px;
  border: 4px solid #56514a;
  border-radius: 18px;
  background:
    linear-gradient(90deg, transparent 48%, #d3a451 49% 51%, transparent 52%),
    linear-gradient(135deg, #111, #333 48%, #111);
  box-shadow: inset 0 0 0 4px #202020, 0 12px 30px rgba(0, 0, 0, 0.3);
}

#family-asset-iq-view .paloist-mobile-small-watch {
  align-self: center;
  width: 46px;
  height: 56px;
  border-width: 3px;
  border-radius: 12px;
}

#family-asset-iq-view .paloist-mobile-recognition-card,
#family-asset-iq-view .paloist-mobile-status-card,
#family-asset-iq-view .paloist-mobile-menu-card,
#family-asset-iq-view .paloist-mobile-risk-card,
#family-asset-iq-view .paloist-mobile-location-card {
  border: 1px solid var(--paloist-line);
  border-radius: 9px;
  padding: 12px;
  background: #fffdf8;
}

#family-asset-iq-view .paloist-mobile-recognition-card h3,
#family-asset-iq-view .paloist-mobile-risk-card h3,
#family-asset-iq-view .paloist-mobile-menu-card h3 {
  margin: 0 0 6px;
  color: var(--paloist-charcoal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
}

#family-asset-iq-view .paloist-mobile-recognition-card p,
#family-asset-iq-view .paloist-mobile-recognition-card small,
#family-asset-iq-view .paloist-mobile-risk-card p,
#family-asset-iq-view .paloist-mobile-location-card span {
  display: block;
  margin: 0 0 6px;
  color: var(--paloist-taupe);
  font-size: 11px;
  line-height: 1.4;
}

#family-asset-iq-view .paloist-mobile-confidence-bar {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e7dccf;
}

#family-asset-iq-view .paloist-mobile-confidence-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--paloist-copper), var(--paloist-gold));
}

#family-asset-iq-view .paloist-mobile-confidence-bar.is-large {
  height: 8px;
}

#family-asset-iq-view .paloist-mobile-split-actions {
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
}

#family-asset-iq-view .paloist-mobile-split-actions button:last-child {
  color: var(--paloist-copper-dark);
  background: #fffdf8;
}

#family-asset-iq-view .paloist-mobile-warning {
  color: #b84542;
  font-size: 11px;
}

#family-asset-iq-view .paloist-mobile-status-card {
  display: grid;
  gap: 8px;
  color: var(--paloist-charcoal);
  font-size: 12px;
}

#family-asset-iq-view .paloist-mobile-status-card div {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--paloist-line);
  padding-top: 8px;
}

#family-asset-iq-view .paloist-mobile-status-card span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 6px;
  color: #fffdf8;
  font-size: 9px;
  font-weight: 900;
}

#family-asset-iq-view .paloist-mobile-status-card .is-ok {
  background: #5f8764;
}

#family-asset-iq-view .paloist-mobile-status-card .is-gap {
  background: #b84542;
}

#family-asset-iq-view .paloist-mobile-status-card .is-warn {
  background: var(--paloist-gold);
}

#family-asset-iq-view .paloist-mobile-menu-card {
  display: grid;
  gap: 0;
  padding: 10px;
}

#family-asset-iq-view .paloist-mobile-menu-card h3 {
  color: var(--paloist-copper-dark);
}

#family-asset-iq-view .paloist-mobile-menu-card button {
  border-width: 1px 0 0;
  border-radius: 0;
  padding: 10px 2px;
}

#family-asset-iq-view .paloist-mobile-menu-card.is-full button:first-child {
  border-top-width: 0;
}

#family-asset-iq-view .paloist-mobile-risk-card {
  border-left: 4px solid #b84542;
}

#family-asset-iq-view .paloist-mobile-risk-card span {
  display: inline-block;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #b84542;
  background: #fff0ed;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

#family-asset-iq-view .paloist-mobile-location-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#family-asset-iq-view .paloist-mobile-location-card strong,
#family-asset-iq-view .paloist-mobile-location-card span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#family-asset-iq-view .paloist-mobile-score-ring {
  display: grid;
  place-items: center;
  align-self: center;
  width: 132px;
  height: 132px;
  border: 12px solid #d7b99d;
  border-top-color: var(--paloist-copper);
  border-radius: 50%;
  color: var(--paloist-copper-dark);
  background: #fffdf8;
  font-size: 28px;
  font-weight: 900;
}

#family-asset-iq-view .paloist-live-mobile-screen {
  gap: 10px;
}

#family-asset-iq-view .paloist-live-mobile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--paloist-line);
  border-radius: 10px;
  padding: 12px;
  background: #fffdf8;
}

#family-asset-iq-view .paloist-live-mobile-top h3 {
  margin: 0;
  color: var(--paloist-charcoal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
}

#family-asset-iq-view .paloist-live-mobile-top button {
  border: 1px solid var(--paloist-line);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--paloist-copper-dark);
  background: #fbefe4;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

#family-asset-iq-view .paloist-live-mobile-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

#family-asset-iq-view .paloist-live-mobile-nav button {
  flex: 0 0 auto;
  border: 1px solid var(--paloist-line);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--paloist-taupe);
  background: #fffdf8;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

#family-asset-iq-view .paloist-live-mobile-nav button:hover,
#family-asset-iq-view .paloist-live-mobile-nav button:focus-visible,
#family-asset-iq-view .paloist-live-mobile-nav button.is-active {
  border-color: var(--paloist-copper);
  color: #fffdf8;
  background: var(--paloist-copper);
}

#family-asset-iq-view .paloist-live-mobile-menu-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--paloist-line);
  border-radius: 10px;
  padding: 10px;
  background: #fffdf8;
}

#family-asset-iq-view .paloist-live-mobile-menu-card > strong {
  color: var(--paloist-charcoal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
}

#family-asset-iq-view .paloist-live-mobile-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#family-asset-iq-view .paloist-live-mobile-menu-grid button {
  min-width: 0;
  border: 1px solid var(--paloist-line);
  border-radius: 8px;
  padding: 9px 8px;
  color: var(--paloist-charcoal);
  background: #fffcf5;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

#family-asset-iq-view .paloist-live-mobile-menu-grid button:hover,
#family-asset-iq-view .paloist-live-mobile-menu-grid button:focus-visible,
#family-asset-iq-view .paloist-live-mobile-menu-grid button.is-active {
  border-color: var(--paloist-copper);
  color: #fffdf8;
  background: var(--paloist-copper);
}

#family-asset-iq-view .paloist-live-mobile-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#family-asset-iq-view .paloist-live-mobile-stat {
  min-width: 0;
  border: 1px solid var(--paloist-line);
  border-radius: 10px;
  padding: 10px;
  background: #fffdf8;
}

#family-asset-iq-view .paloist-live-mobile-stat span,
#family-asset-iq-view .paloist-live-mobile-stat small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--paloist-taupe);
  font-size: 10px;
  font-weight: 800;
}

#family-asset-iq-view .paloist-live-mobile-stat strong {
  display: block;
  min-width: 0;
  margin: 4px 0;
  overflow-wrap: anywhere;
  color: var(--paloist-charcoal);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.12;
}

#family-asset-iq-view .paloist-live-mobile-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--paloist-line);
  border-radius: 10px;
  padding: 12px;
  background: #fffdf8;
}

#family-asset-iq-view .paloist-live-mobile-card > strong {
  color: var(--paloist-charcoal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
}

#family-asset-iq-view .paloist-live-mobile-card p,
#family-asset-iq-view .paloist-live-mobile-card span {
  margin: 0;
  color: var(--paloist-taupe);
  font-size: 12px;
  line-height: 1.45;
}

#family-asset-iq-view .paloist-live-mobile-card.is-action-card button,
#family-asset-iq-view .paloist-live-mobile-card button {
  border: 1px solid var(--paloist-copper);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--paloist-copper-dark);
  background: #fbefe4;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

#family-asset-iq-view .paloist-live-mobile-card.is-action-card button:first-of-type {
  color: #fffdf8;
  background: var(--paloist-copper);
}

#family-asset-iq-view .paloist-live-mobile-row-list {
  display: grid;
  gap: 8px;
}

#family-asset-iq-view .paloist-live-mobile-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--paloist-line);
  border-radius: 8px;
  padding: 9px;
  background: #fffcf5;
}

#family-asset-iq-view .paloist-live-mobile-row div,
#family-asset-iq-view .paloist-live-mobile-row span,
#family-asset-iq-view .paloist-live-mobile-row small,
#family-asset-iq-view .paloist-live-mobile-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

#family-asset-iq-view .paloist-live-mobile-row span {
  display: block;
  color: var(--paloist-charcoal);
  font-size: 12px;
  font-weight: 900;
}

#family-asset-iq-view .paloist-live-mobile-row small {
  display: block;
  margin-top: 2px;
  color: var(--paloist-taupe);
  font-size: 10px;
  line-height: 1.3;
}

#family-asset-iq-view .paloist-live-mobile-row > strong {
  color: var(--paloist-copper-dark);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

#family-asset-iq-view .paloist-live-mobile-empty {
  margin: 0;
  border: 1px dashed #d7b99d;
  border-radius: 8px;
  padding: 12px;
  color: var(--paloist-taupe);
  background: #fbefe4;
  font-size: 12px;
}

#family-asset-iq-view .paloist-mobile-asset-intake-card {
  gap: 12px;
}

#family-asset-iq-view .paloist-mobile-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#family-asset-iq-view .paloist-mobile-upload-card {
  display: grid;
  min-width: 0;
  gap: 8px;
  border: 1px solid var(--paloist-line);
  border-radius: 10px;
  padding: 8px;
  background: #fffcf5;
}

#family-asset-iq-view .paloist-mobile-upload-dropzone {
  display: grid;
  place-items: center;
  min-height: 104px;
  border: 1px dashed #d7b99d;
  border-radius: 9px;
  padding: 8px;
  color: var(--paloist-taupe);
  background: #fff8ef;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
}

#family-asset-iq-view .paloist-mobile-upload-dropzone.is-dragging {
  border-color: var(--paloist-copper);
  background: #fbefe4;
}

#family-asset-iq-view .paloist-mobile-upload-dropzone img {
  width: 100%;
  height: 100%;
  max-height: 112px;
  border-radius: 8px;
  object-fit: cover;
}

#family-asset-iq-view .paloist-mobile-upload-dropzone span,
#family-asset-iq-view .paloist-mobile-upload-dropzone small {
  display: block;
  margin: 0;
  color: inherit;
}

#family-asset-iq-view .paloist-mobile-upload-dropzone span {
  color: var(--paloist-charcoal);
  font-size: 12px;
  font-weight: 900;
}

#family-asset-iq-view .paloist-mobile-upload-dropzone small {
  font-size: 10px;
  font-weight: 800;
}

#family-asset-iq-view .paloist-mobile-upload-card label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--paloist-taupe);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
}

#family-asset-iq-view .paloist-mobile-upload-card label span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#family-asset-iq-view .paloist-mobile-upload-card input[type="file"] {
  width: 100%;
  min-width: 0;
  color: var(--paloist-taupe);
  font-size: 9px;
}

#family-asset-iq-view .paloist-mobile-upload-card button,
#family-asset-iq-view .paloist-mobile-form-actions button,
#family-asset-iq-view .paloist-mobile-field-with-action button {
  min-width: 0;
  border: 1px solid var(--paloist-copper);
  border-radius: 8px;
  padding: 8px 9px;
  color: var(--paloist-copper-dark);
  background: #fbefe4;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
}

#family-asset-iq-view .paloist-mobile-upload-card button:disabled,
#family-asset-iq-view .paloist-mobile-form-actions button:disabled,
#family-asset-iq-view .paloist-mobile-field-with-action button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#family-asset-iq-view .paloist-mobile-asset-form {
  display: grid;
  gap: 10px;
}

#family-asset-iq-view .paloist-mobile-asset-form label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--paloist-taupe);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

#family-asset-iq-view .paloist-mobile-asset-form input,
#family-asset-iq-view .paloist-mobile-asset-form select,
#family-asset-iq-view .paloist-mobile-asset-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--paloist-line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--paloist-charcoal);
  background: #fffdf8;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

#family-asset-iq-view .paloist-mobile-asset-form textarea {
  resize: vertical;
}

#family-asset-iq-view .paloist-mobile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#family-asset-iq-view .paloist-mobile-field-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: center;
}

#family-asset-iq-view .paloist-mobile-field-with-action button {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
}

#family-asset-iq-view .paloist-mobile-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 8px;
}

#family-asset-iq-view .paloist-mobile-form-actions button[type="submit"] {
  color: #fffdf8;
  background: var(--paloist-copper);
}

#family-asset-iq-view .paloist-mobile-success,
#family-asset-iq-view .paloist-mobile-follow-up-list {
  display: grid;
  gap: 6px;
  border: 1px solid #d7b99d;
  border-radius: 9px;
  padding: 9px;
  color: var(--paloist-charcoal);
  background: #fbefe4;
  font-size: 11px;
  line-height: 1.35;
}

#family-asset-iq-view .paloist-mobile-follow-up-list strong {
  color: var(--paloist-copper-dark);
  font-size: 12px;
}

#family-asset-iq-view .paloist-mobile-follow-up-list p {
  color: var(--paloist-taupe);
  font-size: 11px;
}

#family-asset-iq-view .paloist-mobile-asset-intake-card .family-asset-document-list {
  gap: 6px;
}

#family-asset-iq-view .paloist-mobile-asset-intake-card .family-asset-document-row {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 7px;
}

#family-asset-iq-view .paloist-mobile-asset-intake-card .family-asset-document-row strong,
#family-asset-iq-view .paloist-mobile-asset-intake-card .family-asset-document-row span {
  overflow-wrap: anywhere;
}

#family-asset-iq-view .paloist-mobile-asset-intake-card .family-asset-document-preview {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
  width: 100%;
}

#family-asset-iq-view .paloist-mobile-asset-intake-card .family-asset-document-thumbnail {
  width: 34px;
  height: 34px;
  font-size: 10px;
}

#family-asset-iq-view .family-asset-ai-value-button {
  border-color: #d7b99d;
  color: var(--paloist-copper-dark);
  background: #fbefe4;
}

#family-asset-iq-view .family-asset-photo-preview:hover::after,
#family-asset-iq-view .family-asset-document-dropzone:hover::after,
#family-asset-iq-view .family-library-document-dropzone:hover::after,
#family-asset-iq-view .family-estate-document-dropzone:hover::after,
#family-asset-iq-view .family-insurance-document-dropzone:hover::after {
  border-color: rgba(180, 107, 63, 0.18);
}

.council-drawer.asset-council-theme .drawer-panel {
  background:
    linear-gradient(180deg, rgba(251, 247, 240, 0.96), rgba(255, 253, 248, 0.98)),
    var(--paloist-paper);
}

.council-drawer.asset-council-theme .council-form button {
  border-color: var(--paloist-copper);
  color: var(--paloist-paper);
  background: var(--paloist-copper);
}

.app-shell.family-mode .council-voice-controls,
.council-drawer.asset-council-theme .council-voice-controls {
  border-color: var(--paloist-line);
  background: #fbefe4;
}

.app-shell.family-mode .voice-tool-button,
.council-drawer.asset-council-theme .voice-tool-button {
  border-color: #d7b99d;
  color: var(--paloist-copper-dark);
  background: var(--paloist-paper);
}

.app-shell.family-mode .voice-tool-button:hover,
.app-shell.family-mode .voice-tool-button:focus-visible,
.app-shell.family-mode .voice-tool-button.is-active,
.council-drawer.asset-council-theme .voice-tool-button:hover,
.council-drawer.asset-council-theme .voice-tool-button:focus-visible,
.council-drawer.asset-council-theme .voice-tool-button.is-active {
  border-color: var(--paloist-copper);
  color: var(--paloist-paper);
  background: var(--paloist-copper);
  box-shadow: 0 0 0 3px rgba(180, 107, 63, 0.14);
}

.council-drawer.asset-council-theme .expert-card {
  border-left: 3px solid var(--paloist-copper);
}

.paloist-dashboard-shell {
  --paloist-dash-primary: #4f46e5;
  --paloist-dash-primary-dark: #4338ca;
  --paloist-dash-primary-soft: #eef0fe;
  --paloist-dash-panel: #ffffff;
  --paloist-dash-line: #e9ebf0;
  --paloist-dash-ink: #1c1e26;
  --paloist-dash-muted: #6b7280;
  --paloist-dash-faint: #9aa1ad;
  --paloist-dash-green: #10b981;
  --paloist-dash-amber: #f59e0b;
  --paloist-dash-red: #ef4444;
  display: grid;
  gap: 16px;
  color: var(--paloist-dash-ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.app-shell.family-mode #family-asset-iq-view .paloist-dashboard-shell .panel,
.app-shell.family-mode #family-asset-iq-view .paloist-dashboard-metric {
  border: 1px solid var(--paloist-dash-line);
  border-radius: 18px;
  background: var(--paloist-dash-panel);
  box-shadow: 0 1px 3px rgba(20, 23, 40, 0.05), 0 6px 18px rgba(20, 23, 40, 0.04);
}

.app-shell.family-mode #family-asset-iq-view .paloist-dashboard-shell .panel h2 {
  color: var(--paloist-dash-ink);
  font-family: inherit;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.app-shell.family-mode #family-asset-iq-view .paloist-dashboard-shell .eyebrow {
  color: var(--paloist-dash-primary);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.app-shell.family-mode #family-asset-iq-view .paloist-dashboard-shell .panel-pill {
  border-color: var(--paloist-dash-line);
  color: var(--paloist-dash-muted);
  background: #fff;
}

.app-shell.family-mode #family-asset-iq-view .paloist-dashboard-shell .panel-subtitle,
.app-shell.family-mode #family-asset-iq-view .paloist-dashboard-shell .muted {
  color: var(--paloist-dash-muted);
}

.paloist-dashboard-command {
  display: flex;
  gap: 11px;
  align-items: stretch;
}

.paloist-dashboard-search-form {
  display: flex;
  flex: 1 1 auto;
  gap: 11px;
  min-width: 0;
}

.paloist-dashboard-search-field {
  display: flex;
  flex: 1 1 auto;
  grid-template-columns: none;
  min-width: 0;
  height: 54px;
  align-items: center;
  gap: 11px;
  border: 1.5px solid var(--paloist-dash-line);
  border-radius: 14px;
  padding: 0 18px;
  color: var(--paloist-dash-primary);
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 23, 40, 0.05), 0 6px 18px rgba(20, 23, 40, 0.04);
}

.paloist-dashboard-search-field:focus-within {
  border-color: var(--paloist-dash-primary);
  box-shadow: 0 0 0 4px var(--paloist-dash-primary-soft);
}

.paloist-dashboard-search-field input {
  border: 0;
  padding: 0;
  color: var(--paloist-dash-ink);
  background: transparent;
  box-shadow: none;
}

.paloist-dashboard-go-button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 14px;
  padding: 0 24px;
  color: #fff;
  background: #16181d;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

.paloist-dashboard-council-button {
  display: flex;
  flex: 0 0 auto;
  height: 54px;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--paloist-dash-line);
  border-radius: 14px;
  padding: 0 18px;
  color: var(--paloist-dash-ink);
  background: #fff;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(20, 23, 40, 0.05), 0 6px 18px rgba(20, 23, 40, 0.04);
}

.paloist-dashboard-council-button:hover,
.paloist-dashboard-council-button:focus-visible {
  border-color: var(--paloist-dash-primary);
  color: var(--paloist-dash-primary-dark);
}

.paloist-dashboard-council-button b {
  color: var(--paloist-dash-muted);
}

.paloist-dashboard-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.paloist-dashboard-chip {
  border: 1px solid var(--paloist-dash-line);
  border-radius: 999px;
  padding: 6px 13px;
  color: var(--paloist-dash-muted);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.paloist-dashboard-chip:hover,
.paloist-dashboard-chip:focus-visible {
  border-color: var(--paloist-dash-primary);
  color: var(--paloist-dash-primary-dark);
}

.paloist-dashboard-metrics,
.paloist-dashboard-main-grid,
.paloist-dashboard-lower-grid {
  display: grid;
  gap: 16px;
}

.paloist-dashboard-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.paloist-dashboard-main-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
}

.paloist-dashboard-lower-grid {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 1fr);
}

.paloist-dashboard-metric {
  display: grid;
  gap: 7px;
  padding: 18px;
}

.paloist-dashboard-metric span {
  color: var(--paloist-dash-muted);
  font-size: 12px;
  font-weight: 700;
}

.paloist-dashboard-metric strong {
  color: var(--paloist-dash-ink);
  font-size: 26px;
  line-height: 1.05;
}

.paloist-dashboard-metric small {
  color: var(--paloist-dash-faint);
  font-size: 11.5px;
  font-weight: 700;
}

.app-shell.family-mode #family-asset-iq-view .paloist-dashboard-metric.is-hero {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--paloist-dash-primary), #6366f1 55%, #8b5cf6);
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.26);
}

.app-shell.family-mode #family-asset-iq-view .paloist-dashboard-metric.is-hero span,
.app-shell.family-mode #family-asset-iq-view .paloist-dashboard-metric.is-hero strong,
.app-shell.family-mode #family-asset-iq-view .paloist-dashboard-metric.is-hero small {
  color: #fff;
}

.app-shell.family-mode #family-asset-iq-view .paloist-dashboard-metric.is-hero small {
  opacity: 0.78;
}

.paloist-dashboard-metric.is-flag strong {
  color: var(--paloist-dash-red);
}

.paloist-dashboard-composition-body {
  display: grid;
  gap: 18px;
}

.paloist-dashboard-donut {
  display: grid;
  position: relative;
  width: 188px;
  height: 188px;
  place-self: center;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: conic-gradient(var(--paloist-donut-gradient));
  box-shadow: none;
}

.paloist-dashboard-donut::after {
  content: "";
  position: absolute;
  inset: 27%;
  border: 1px solid var(--paloist-dash-line);
  border-radius: 50%;
  background: #fff;
}

.paloist-dashboard-donut span {
  display: grid;
  position: relative;
  z-index: 1;
  gap: 2px;
  place-items: center;
  text-align: center;
}

.paloist-dashboard-donut strong {
  color: var(--paloist-dash-ink);
  font-size: 20px;
  font-weight: 850;
}

.paloist-dashboard-donut small {
  color: var(--paloist-dash-muted);
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paloist-dashboard-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.paloist-dashboard-legend-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto 42px;
  gap: 9px;
  align-items: center;
  border: 0;
  padding: 0;
  color: var(--paloist-dash-ink);
  background: transparent;
  text-align: left;
}

.paloist-dashboard-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.paloist-dashboard-legend-row span:not(.paloist-dashboard-legend-dot) {
  overflow: hidden;
  color: var(--paloist-dash-ink);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paloist-dashboard-legend-row strong {
  color: var(--paloist-dash-ink);
  font-size: 13px;
}

.paloist-dashboard-legend-row small {
  color: var(--paloist-dash-faint);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.paloist-dashboard-action-list,
.paloist-dashboard-note-grid {
  display: grid;
}

.paloist-dashboard-action {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--paloist-dash-line);
  padding: 13px 2px;
}

.paloist-dashboard-action:last-child {
  border-bottom: 0;
}

.paloist-dashboard-action-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--paloist-dash-line);
  border-radius: 10px;
  color: var(--paloist-dash-muted);
  background: #f7f8fa;
}

.paloist-dashboard-action strong {
  display: block;
  color: var(--paloist-dash-ink);
  font-size: 13.5px;
  line-height: 1.25;
}

.paloist-dashboard-action small {
  display: block;
  margin-top: 2px;
  color: var(--paloist-dash-faint);
  font-size: 11.5px;
  line-height: 1.35;
}

.paloist-dashboard-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.paloist-dashboard-badge.is-now {
  background: var(--paloist-dash-red);
}

.paloist-dashboard-badge.is-soon {
  background: var(--paloist-dash-amber);
}

.paloist-dashboard-badge.is-later {
  background: #9ca3af;
}

.paloist-dashboard-badge.is-good {
  background: var(--paloist-dash-green);
}

.paloist-dashboard-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #f7f8fa;
}

.paloist-dashboard-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--paloist-dash-green), #34d399);
}

.paloist-dashboard-two-num {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.paloist-dashboard-two-num > div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--paloist-dash-line);
  border-radius: 12px;
  padding: 13px;
  background: #f7f8fa;
}

.paloist-dashboard-two-num span,
.paloist-dashboard-two-num small {
  color: var(--paloist-dash-muted);
  font-size: 11px;
  font-weight: 700;
}

.paloist-dashboard-two-num strong {
  color: var(--paloist-dash-primary-dark);
  font-size: 20px;
  line-height: 1.1;
}

.paloist-dashboard-status-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--paloist-dash-line);
  padding: 12px 0;
}

.paloist-dashboard-status-row:last-child {
  border-bottom: 0;
}

.paloist-dashboard-status-row span {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--paloist-dash-ink);
  font-size: 13.5px;
  font-weight: 700;
}

.paloist-dashboard-status-row strong {
  color: var(--paloist-dash-primary-dark);
}

.paloist-dashboard-note-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.paloist-dashboard-note {
  border-left: 3px solid var(--paloist-dash-primary);
  border-radius: 0 11px 11px 0;
  padding: 11px 14px;
  background: #f7f8fa;
}

.paloist-dashboard-note strong {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--paloist-dash-ink);
  font-size: 13px;
  line-height: 1.3;
}

.paloist-dashboard-note p {
  margin: 5px 0 0;
  color: var(--paloist-dash-muted);
  font-size: 12px;
  line-height: 1.45;
}

.paloist-dashboard-top-assets-panel {
  margin-top: 0;
}

.app-shell.family-mode,
.council-drawer.asset-council-theme {
  --paloist-charcoal: #1c1e26;
  --paloist-charcoal-soft: #333845;
  --paloist-cream: #f4f5f8;
  --paloist-cream-light: #fafbff;
  --paloist-paper: #ffffff;
  --paloist-copper: #4f46e5;
  --paloist-copper-dark: #4338ca;
  --paloist-gold: #8b5cf6;
  --paloist-taupe: #6b7280;
  --paloist-line: #e9ebf0;
  --paloist-line-strong: #d9dde7;
  --forest: var(--paloist-copper);
  --forest-dark: var(--paloist-copper-dark);
  --forest-soft: #eef0fe;
  --ink: var(--paloist-charcoal);
  --muted: var(--paloist-taupe);
  --line: var(--paloist-line);
  --line-strong: var(--paloist-line-strong);
  --panel: var(--paloist-paper);
  --page: var(--paloist-cream);
  --asset-accent-soft: #f7f8fa;
  --asset-accent-line: var(--paloist-line);
  --asset-accent-dash: #c7ccfb;
  --asset-accent-shadow: rgba(79, 70, 229, 0.12);
  --asset-accent-shadow-strong: rgba(79, 70, 229, 0.18);
  --shadow-soft: 0 1px 3px rgba(20, 23, 40, 0.05), 0 6px 18px rgba(20, 23, 40, 0.04);
  --shadow-lift: 0 14px 34px rgba(20, 23, 40, 0.1);
}

.app-shell.family-mode,
.app-shell.family-mode .workspace {
  background: #f4f5f8;
}

.app-shell.family-mode .topbar {
  border-bottom-color: transparent;
}

.app-shell.family-mode .topbar .eyebrow,
#family-asset-iq-view .eyebrow,
.council-drawer.asset-council-theme .eyebrow {
  color: var(--paloist-copper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.12em;
}

.app-shell.family-mode .topbar h1,
#family-asset-iq-view .panel h2,
#family-asset-iq-view .family-overview-hero h2,
.council-drawer.asset-council-theme .drawer-header h2,
.council-drawer.asset-council-theme .summary-card h3 {
  color: var(--paloist-charcoal);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.app-shell.family-mode .topbar h1 {
  font-size: 30px;
}

.app-shell.family-mode .page-subtitle,
#family-asset-iq-view .panel-subtitle,
#family-asset-iq-view .muted,
.council-drawer.asset-council-theme .panel-subtitle,
.council-drawer.asset-council-theme .muted {
  color: var(--paloist-taupe);
}

.app-shell.family-mode #family-asset-iq-view {
  color: var(--paloist-charcoal);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.app-shell.family-mode #family-asset-iq-view .panel,
.app-shell.family-mode #family-asset-iq-view .metric-panel,
.app-shell.family-mode #family-asset-iq-view .family-document-card,
.app-shell.family-mode #family-asset-iq-view .family-opportunity-rule-card,
.app-shell.family-mode #family-asset-iq-view .family-opportunity-run-card,
.app-shell.family-mode #family-asset-iq-view .family-report-preview-shell,
.council-drawer.asset-council-theme .expert-card,
.council-drawer.asset-council-theme .summary-card {
  border: 1px solid var(--paloist-line);
  border-radius: 18px;
  background: var(--paloist-paper);
  box-shadow: var(--shadow-soft);
}

.app-shell.family-mode #family-asset-iq-view .panel,
.app-shell.family-mode #family-asset-iq-view .metric-panel {
  border-radius: 18px;
}

.app-shell.family-mode #family-asset-iq-view .primary-metric,
.app-shell.family-mode #family-asset-iq-view .family-overview-hero {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--paloist-copper), #6366f1 55%, var(--paloist-gold));
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.24);
}

.app-shell.family-mode #family-asset-iq-view .primary-metric span,
.app-shell.family-mode #family-asset-iq-view .primary-metric strong,
.app-shell.family-mode #family-asset-iq-view .primary-metric small,
.app-shell.family-mode #family-asset-iq-view .family-overview-hero h2,
.app-shell.family-mode #family-asset-iq-view .family-overview-hero .eyebrow,
.app-shell.family-mode #family-asset-iq-view .family-overview-hero .panel-subtitle {
  color: #fff;
}

.app-shell.family-mode #family-asset-iq-view .metric-panel span,
.app-shell.family-mode #family-asset-iq-view .family-asset-card header span,
.app-shell.family-mode #family-asset-iq-view .family-document-row span,
.app-shell.family-mode #family-asset-iq-view .family-setting-row span,
.app-shell.family-mode #family-asset-iq-view .family-planning-checklist span {
  color: var(--paloist-taupe);
}

.app-shell.family-mode #family-asset-iq-view .metric-panel strong,
.app-shell.family-mode #family-asset-iq-view .family-asset-category-card strong,
.app-shell.family-mode #family-asset-iq-view .family-asset-type-button strong,
.app-shell.family-mode #family-asset-iq-view .family-inheritance-dashboard-stats strong,
.app-shell.family-mode #family-asset-iq-view .family-asset-card-image span,
.app-shell.family-mode #family-asset-iq-view .family-asset-breakdown-row strong,
.app-shell.family-mode #family-asset-iq-view .family-opportunity-score strong,
.app-shell.family-mode #family-asset-iq-view .family-opportunity-comps strong,
.app-shell.family-mode #family-asset-iq-view .family-asset-field-help strong {
  color: var(--paloist-copper-dark);
}

.app-shell.family-mode #family-asset-iq-view .panel-pill,
.council-drawer.asset-council-theme .panel-pill,
.app-shell.family-mode #family-asset-iq-view .provider-status.is-ready,
.app-shell.family-mode #family-asset-iq-view .status-pill.is-ready {
  border-color: var(--paloist-line);
  color: var(--paloist-taupe);
  background: #fff;
}

.app-shell.family-mode #family-asset-iq-view .family-asset-category-card,
.app-shell.family-mode #family-asset-iq-view .family-asset-type-button,
.app-shell.family-mode #family-asset-iq-view .family-asset-compact-row,
.app-shell.family-mode #family-asset-iq-view .family-document-row,
.app-shell.family-mode #family-asset-iq-view .family-setting-row,
.app-shell.family-mode #family-asset-iq-view .family-profile-field,
.app-shell.family-mode #family-asset-iq-view .family-report-checkbox,
.app-shell.family-mode #family-asset-iq-view .family-report-static-control,
.app-shell.family-mode #family-asset-iq-view .family-report-guide-list > div,
.app-shell.family-mode #family-asset-iq-view .family-planning-checklist > div,
.app-shell.family-mode #family-asset-iq-view .family-beneficiary-card,
.app-shell.family-mode #family-asset-iq-view .family-inheritance-asset-row,
.app-shell.family-mode #family-asset-iq-view .family-estate-asset-row,
.app-shell.family-mode #family-asset-iq-view .family-estate-analysis-card,
.app-shell.family-mode #family-asset-iq-view .family-insurance-asset-row,
.app-shell.family-mode #family-asset-iq-view .family-insurance-analysis-card,
.app-shell.family-mode #family-asset-iq-view .family-protection-matrix-row,
.app-shell.family-mode #family-asset-iq-view .family-protection-layer-cell,
.app-shell.family-mode #family-asset-iq-view .family-protection-drawer-layer,
.app-shell.family-mode #family-asset-iq-view .family-protection-policy-hint,
.app-shell.family-mode #family-asset-iq-view .family-policy-detail-grid div,
.app-shell.family-mode #family-asset-iq-view .family-opportunity-run-metrics > div,
.app-shell.family-mode #family-asset-iq-view .family-opportunity-analysis-list,
.app-shell.family-mode #family-asset-iq-view .family-opportunity-comps > div,
.app-shell.family-mode #family-asset-iq-view .family-opportunity-sources > div,
.council-drawer.asset-council-theme .expert-card {
  border-color: var(--paloist-line);
  border-radius: 14px;
  background: #f7f8fa;
}

.app-shell.family-mode #family-asset-iq-view .family-asset-card,
.app-shell.family-mode #family-asset-iq-view .family-document-card,
.app-shell.family-mode #family-asset-iq-view .family-estate-analysis-card,
.app-shell.family-mode #family-asset-iq-view .family-insurance-analysis-card {
  border-color: var(--paloist-line);
  border-left-color: var(--paloist-copper);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 23, 40, 0.05);
}

.app-shell.family-mode #family-asset-iq-view .family-asset-card:hover,
.app-shell.family-mode #family-asset-iq-view .family-document-card:hover,
.app-shell.family-mode #family-asset-iq-view .family-asset-category-card:hover,
.app-shell.family-mode #family-asset-iq-view .family-asset-category-card:focus-visible,
.app-shell.family-mode #family-asset-iq-view .family-asset-type-button:hover,
.app-shell.family-mode #family-asset-iq-view .family-asset-type-button:focus-visible,
.app-shell.family-mode #family-asset-iq-view .family-asset-type-button.is-active,
.app-shell.family-mode #family-asset-iq-view .family-beneficiary-card:hover,
.app-shell.family-mode #family-asset-iq-view .family-beneficiary-card:focus-visible,
.app-shell.family-mode #family-asset-iq-view .family-beneficiary-card.is-active {
  border-color: var(--paloist-copper);
  background: var(--paloist-cream-light);
  box-shadow: 0 0 0 4px var(--asset-accent-shadow);
}

.app-shell.family-mode #family-asset-iq-view .family-asset-card-image,
.app-shell.family-mode #family-asset-iq-view .family-asset-photo-preview,
.app-shell.family-mode #family-asset-iq-view .family-asset-document-dropzone,
.app-shell.family-mode #family-asset-iq-view .family-library-document-dropzone,
.app-shell.family-mode #family-asset-iq-view .family-estate-document-dropzone,
.app-shell.family-mode #family-asset-iq-view .family-insurance-document-dropzone,
.app-shell.family-mode #family-asset-iq-view .family-opportunity-hint,
.app-shell.family-mode #family-asset-iq-view .family-asset-question-list,
.app-shell.family-mode #family-asset-iq-view .family-asset-field-help,
.app-shell.family-mode #family-asset-iq-view .empty-state {
  border-color: #c7ccfb;
  background: var(--paloist-cream-light);
}

.app-shell.family-mode #family-asset-iq-view .family-asset-photo-preview:hover,
.app-shell.family-mode #family-asset-iq-view .family-asset-photo-preview:focus-visible,
.app-shell.family-mode #family-asset-iq-view .family-asset-document-dropzone:hover,
.app-shell.family-mode #family-asset-iq-view .family-asset-document-dropzone:focus-visible,
.app-shell.family-mode #family-asset-iq-view .family-library-document-dropzone:hover,
.app-shell.family-mode #family-asset-iq-view .family-library-document-dropzone:focus-visible,
.app-shell.family-mode #family-asset-iq-view .family-estate-document-dropzone:hover,
.app-shell.family-mode #family-asset-iq-view .family-estate-document-dropzone:focus-visible,
.app-shell.family-mode #family-asset-iq-view .family-insurance-document-dropzone:hover,
.app-shell.family-mode #family-asset-iq-view .family-insurance-document-dropzone:focus-visible {
  border-color: var(--paloist-copper);
  background: var(--paloist-primary-soft, #eef0fe);
  box-shadow: 0 0 0 4px var(--asset-accent-shadow);
}

.app-shell.family-mode #family-asset-iq-view input,
.app-shell.family-mode #family-asset-iq-view select,
.app-shell.family-mode #family-asset-iq-view textarea,
.council-drawer.asset-council-theme textarea {
  border-color: var(--paloist-line);
  border-radius: 12px;
  color: var(--paloist-charcoal);
  background: #fff;
}

.app-shell.family-mode #family-asset-iq-view input:focus,
.app-shell.family-mode #family-asset-iq-view select:focus,
.app-shell.family-mode #family-asset-iq-view textarea:focus,
.council-drawer.asset-council-theme textarea:focus {
  border-color: var(--paloist-copper);
  box-shadow: 0 0 0 4px var(--asset-accent-shadow);
}

.app-shell.family-mode .asset-council-button,
.app-shell.family-mode #family-asset-iq-view .ghost-button,
.app-shell.family-mode #family-asset-iq-view .family-asset-council-submit,
.app-shell.family-mode #family-asset-iq-view .family-asset-form-actions button[type="submit"],
.council-drawer.asset-council-theme .council-form button,
.council-drawer.asset-council-theme .voice-tool-button {
  border-color: var(--paloist-copper);
  color: var(--paloist-copper-dark);
  background: #fff;
}

.app-shell.family-mode .asset-council-button:hover,
.app-shell.family-mode .asset-council-button:focus-visible,
.app-shell.family-mode #family-asset-iq-view .ghost-button:hover,
.app-shell.family-mode #family-asset-iq-view .ghost-button:focus-visible,
.app-shell.family-mode #family-asset-iq-view .ghost-button.is-active,
.app-shell.family-mode #family-asset-iq-view .family-asset-council-submit,
.app-shell.family-mode #family-asset-iq-view .family-asset-form-actions button[type="submit"],
.council-drawer.asset-council-theme .council-form button,
.council-drawer.asset-council-theme .voice-tool-button:hover,
.council-drawer.asset-council-theme .voice-tool-button:focus-visible,
.council-drawer.asset-council-theme .voice-tool-button.is-active {
  color: #fff;
  background: var(--paloist-copper);
  box-shadow: 0 0 0 4px var(--asset-accent-shadow);
}

.app-shell.family-mode #family-asset-iq-view .success-banner,
.app-shell.family-mode #family-asset-iq-view .family-asset-edit-note {
  border-color: #c7ccfb;
  color: var(--paloist-copper-dark);
  background: #eef0fe;
}

.app-shell.family-mode .family-management-drawer,
.council-drawer.asset-council-theme .drawer-panel {
  border-left: 1px solid var(--paloist-line);
  color: var(--paloist-charcoal);
  background:
    radial-gradient(circle at 100% 0%, rgba(79, 70, 229, 0.08), transparent 28%),
    #f4f5f8;
  box-shadow: -28px 0 60px rgba(20, 23, 40, 0.18);
}

.app-shell.family-mode .family-management-drawer-header,
.council-drawer.asset-council-theme .drawer-header {
  border-bottom-color: var(--paloist-line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.app-shell.family-mode .family-management-drawer .family-asset-intake-panel,
.app-shell.family-mode .family-document-drawer-body,
.app-shell.family-mode .family-protection-drawer-form,
.council-drawer.asset-council-theme .council-form,
.council-drawer.asset-council-theme .council-voice-controls {
  border: 1px solid var(--paloist-line);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.app-shell.family-mode .family-management-drawer .family-asset-intake-panel {
  display: grid;
  gap: 14px;
}

.app-shell.family-mode .family-management-drawer-backdrop,
.council-drawer.asset-council-theme .drawer-overlay {
  background: rgba(20, 23, 40, 0.18);
}

@media (max-width: 1180px) {
  .metrics-grid,
  .dashboard-grid,
  .ibkr-live-summary,
  .ibkr-live-footer,
  .stat-grid,
  .rebalance-layout,
  .settings-layout,
  .health-layout,
  .scenario-lab-layout,
  .trades-layout,
  .approval-workspace,
  .trade-position-panel-header,
  .paper-layout,
  .paper-positions-grid,
  .paper-dashboard-kpi-row,
  .backup-restore-layout,
  .broker-safety-layout,
  .data-management-layout,
  .signal-capability-grid,
  .signal-card-list {
    grid-template-columns: 1fr 1fr;
  }

  .primary-metric,
  .trend-panel {
    grid-column: span 2;
  }

  .approval-workspace {
    grid-template-columns: 1fr;
  }

  #family-asset-iq-view .paloist-mobile-demo-stage {
    grid-template-columns: 1fr;
  }

  #family-asset-iq-view .paloist-mobile-demo-side-panel {
    max-width: 520px;
    width: 100%;
    justify-self: center;
  }

  .paloist-dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paloist-dashboard-main-grid,
  .paloist-dashboard-lower-grid {
    grid-template-columns: 1fr;
  }

  .family-asset-management-panel .family-asset-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    min-height: auto;
    overflow-y: visible;
  }

  .sidebar-brand {
    padding: 16px 18px;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    scrollbar-width: thin;
  }

  .nav-item {
    flex: 0 0 auto;
    padding: 10px 12px;
  }

  #family-asset-iq-view .paloist-mobile-demo-intro {
    display: grid;
  }

  #family-asset-iq-view .paloist-mobile-demo-chip-row {
    justify-content: flex-start;
  }

  #family-asset-iq-view .paloist-phone-shell {
    width: min(100%, 334px);
    min-height: 640px;
  }

  #family-asset-iq-view .paloist-phone-screen {
    min-height: 590px;
    max-height: 590px;
  }

  .sidebar-footer {
    margin-top: 0;
    padding: 12px 18px;
    border-top: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace {
    padding: 20px 18px 32px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .topbar-center,
  .topbar-actions {
    justify-content: stretch;
    justify-items: stretch;
    justify-self: stretch;
    padding-top: 0;
  }

  .topbar-actions {
    justify-items: start;
  }

  .usage-top-button,
  #ask-council-button {
    width: 100%;
  }

  .paloist-dashboard-command,
  .paloist-dashboard-search-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .paloist-dashboard-council-button,
  .paloist-dashboard-go-button {
    width: 100%;
    justify-content: center;
  }

  .paloist-dashboard-metrics,
  .paloist-dashboard-legend,
  .paloist-dashboard-note-grid,
  .paloist-dashboard-two-num {
    grid-template-columns: 1fr;
  }

  .paloist-dashboard-action {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .paloist-dashboard-action .paloist-dashboard-badge {
    grid-column: 2;
    justify-self: start;
  }

  .metrics-grid,
  .dashboard-grid,
  .ibkr-live-summary,
  .ibkr-live-footer,
  .market-cards,
  .trend-insight-strip,
  .market-index-strip,
  .research-symbol-form,
  .stock-detail-metrics,
  .research-metric-grid,
  .stat-grid,
  .paper-dashboard-grid,
  .compact-stat-grid,
  .council-filter-grid,
  .council-review-layout,
  .council-insight-grid,
  .council-session-controls,
  .backup-restore-layout,
  .broker-safety-layout,
  .broker-safety-status-grid,
  .broker-safety-field-grid,
  .family-overview-grid,
  .family-planning-grid,
  .family-opportunity-layout,
  .family-opportunity-run-metrics,
  .family-opportunity-run-detail-grid,
  .family-inheritance-layout,
  .family-inheritance-dashboard-stats,
  .family-inheritance-dashboard-columns,
  .family-estate-layout,
  .family-insurance-layout,
  .family-document-controls-grid,
  .family-document-search-row,
  .family-document-card-grid,
  .family-document-meta-grid,
  .family-report-layout,
  .family-report-control-grid,
  .family-report-meta-grid,
  .family-report-asset-grid,
  .family-profile-grid,
  .family-beneficiary-grid,
  .family-protection-layer-grid,
  .family-protection-layout,
  .family-protection-drawer-grid,
  .family-asset-category-grid,
  .family-management-category-grid,
  .family-management-toolbar,
  .family-asset-layout,
  .family-asset-inventory-layout,
  .family-asset-photo-row,
  .family-asset-document-upload,
  .family-asset-mini-grid,
  .family-asset-card,
  .family-asset-meta-grid,
  .rebalance-layout,
  .rebalance-drift-row,
  .rebalance-drift-metrics,
  .settings-layout,
  .settings-target-row,
  .settings-trade-form,
  .health-hero-grid,
  .health-layout,
  .health-two-column,
  .projection-compare,
  .scenario-summary-grid,
  .scenario-lab-layout,
  .trades-layout,
  .approval-workspace,
  .paper-layout,
  .paper-positions-grid,
  .paper-timeline-meta,
  .paper-dashboard-kpi-row,
  .paper-benchmark-summary,
  .paper-benchmark-dashboard .paper-benchmark-list,
  .paper-benchmark-list,
  .paper-advisor-card-grid,
  .paper-benchmark-values,
  .data-management-layout,
  .data-holding-grid,
  .data-holding-row,
  .data-target-row,
  .signal-capability-grid,
  .signal-card-list,
  .approval-check-list,
  .audit-selected-summary,
  .scenario-preset-list,
  .scenario-result-grid,
  .scenario-assumption-grid,
  .trade-meta-grid,
  .form-row.two-column,
  .usage-summary-grid {
    grid-template-columns: 1fr;
  }

  .primary-metric,
  .trend-panel {
    grid-column: span 1;
  }

  .trade-card header {
    display: grid;
  }

  .family-protection-matrix-row {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .settings-status-row,
  .settings-assignment-row,
  .capability-row,
  .paper-benchmark-card,
  .broker-safety-event > div,
  .rebalance-note,
  .rebalance-move-meta {
    display: grid;
  }

  .panel-header-three-way {
    grid-template-columns: 1fr;
  }

  .panel-header-center-action,
  .panel-header-end-action {
    justify-self: start;
  }

  .family-management-actions {
    justify-content: flex-start;
  }

  .family-management-drawer {
    width: min(100vw, 640px);
    padding: 16px;
  }

  .family-management-drawer-header {
    margin: -16px -16px 16px;
    padding: 16px;
  }

  .paper-hero-actions {
    justify-content: flex-start;
  }

  .signal-intelligence-actions,
  .signal-card-actions {
    justify-content: flex-start;
  }

  .paper-benchmark-card {
    grid-template-columns: 1fr;
  }

  .paper-benchmark-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-status-row em {
    max-width: none;
    text-align: left;
  }

  .council-action-notes-panel {
    position: static;
  }

  .council-session-header,
  .council-note-header {
    display: grid;
  }

  .council-session-actions {
    justify-content: flex-start;
  }

  .approval-order-card header,
  .approval-audit-event > div {
    display: grid;
  }

  .paper-position-card header,
  .paper-advisor-card header,
  .family-asset-card header,
  .family-inheritance-asset-row,
  .family-estate-asset-row,
  .family-estate-analysis-card header,
  .family-insurance-asset-row,
  .family-insurance-analysis-card header,
  .family-document-card header,
  .paper-trade-row,
  .data-transaction-row {
    display: grid;
  }

  .trade-card-status {
    text-align: left;
  }

  .scenario-control-input-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1220px) {
  .app-shell.wealth-studio-preview {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
  }

  .app-shell.wealth-studio-preview .metrics-grid,
  .app-shell.wealth-paper-preview .paper-dashboard-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell.wealth-dashboard-preview #dashboard-view .dashboard-grid,
  .paper-studio-split,
  .app-shell.wealth-paper-preview .paper-layout.paper-utility-grid {
    grid-template-columns: 1fr;
  }

  .app-shell.wealth-dashboard-preview #dashboard-view .trend-panel,
  .app-shell.wealth-dashboard-preview #dashboard-view .market-panel,
  .app-shell.wealth-dashboard-preview #dashboard-view .recommendation-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 840px) {
  .app-shell.wealth-studio-preview {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .app-shell.wealth-studio-preview .sidebar {
    position: static;
    height: auto;
    min-height: auto;
    overflow-y: visible;
    border-radius: 0;
  }

  .app-shell.wealth-studio-preview .workspace {
    padding: 20px 18px 32px;
  }

  .app-shell.wealth-studio-preview .topbar h1 {
    font-size: 38px;
  }

  .app-shell.wealth-studio-preview .page-subtitle {
    font-size: 16px;
  }

  .app-shell.wealth-studio-preview .metrics-grid,
  .app-shell.wealth-paper-preview .paper-dashboard-stat-grid,
  .app-shell.wealth-paper-preview .paper-benchmark-list,
  .app-shell.wealth-paper-preview .paper-trade-row > div {
    grid-template-columns: 1fr;
  }
}

.app-shell.wealth-studio-preview button:not(:disabled),
.app-shell.wealth-studio-preview .nav-item:not(:disabled),
.app-shell.wealth-studio-preview .ghost-button:not(:disabled),
.app-shell.wealth-studio-preview .icon-button:not(:disabled),
.app-shell.wealth-studio-preview select:not(:disabled),
.app-shell.wealth-dashboard-preview #dashboard-view .quote-card,
.app-shell.wealth-dashboard-preview #dashboard-view .market-index-card,
.app-shell.wealth-dashboard-preview #dashboard-view .metric-info-button:not(:disabled) {
  cursor: pointer !important;
}

.app-shell.wealth-studio-preview button:not(:disabled):hover,
.app-shell.wealth-studio-preview button:not(:disabled):focus-visible,
.app-shell.wealth-studio-preview .nav-item:not(:disabled):hover,
.app-shell.wealth-studio-preview .nav-item:not(:disabled):focus-visible,
.app-shell.wealth-studio-preview .ghost-button:not(:disabled):hover,
.app-shell.wealth-studio-preview .ghost-button:not(:disabled):focus-visible,
.app-shell.wealth-studio-preview .icon-button:not(:disabled):hover,
.app-shell.wealth-studio-preview .icon-button:not(:disabled):focus-visible {
  border-color: var(--forest) !important;
  color: var(--forest-dark);
  background: var(--forest-soft);
  box-shadow: 0 0 0 3px rgba(31, 93, 58, 0.12) !important;
}

.app-shell.wealth-studio-preview .ghost-button:not(:disabled):hover,
.app-shell.wealth-studio-preview .ghost-button:not(:disabled):focus-visible {
  color: #fff;
  background: var(--forest);
}

.app-shell.wealth-studio-preview .nav-item:not(:disabled):hover,
.app-shell.wealth-studio-preview .nav-item:not(:disabled):focus-visible {
  transform: translateX(2px);
}

.app-shell.wealth-dashboard-preview #dashboard-view .quote-card:hover,
.app-shell.wealth-dashboard-preview #dashboard-view .quote-card:focus-within,
.app-shell.wealth-dashboard-preview #dashboard-view .market-index-card:hover,
.app-shell.wealth-dashboard-preview #dashboard-view .market-index-card:focus-within {
  border-color: var(--forest) !important;
  background: #fbfdfb;
  box-shadow: 0 0 0 3px rgba(31, 93, 58, 0.1), var(--shadow-soft);
}

.app-shell.wealth-studio-preview button:disabled,
.app-shell.wealth-studio-preview .ghost-button:disabled,
.app-shell.wealth-studio-preview .icon-button:disabled,
.app-shell.wealth-studio-preview select:disabled {
  cursor: not-allowed !important;
}

button:not(:disabled),
button:not(:disabled) *,
[role="button"]:not([aria-disabled="true"]),
[role="button"]:not([aria-disabled="true"]) *,
.nav-item:not(:disabled),
.nav-item:not(:disabled) *,
.ghost-button:not(:disabled),
.ghost-button:not(:disabled) *,
.icon-button:not(:disabled),
.icon-button:not(:disabled) *,
.quote-card,
.quote-card *,
.market-index-card,
.market-index-card *,
.metric-panel,
.metric-panel *,
.ibkr-live-stat,
.ibkr-live-stat *,
.ibkr-live-status,
.ibkr-live-status *,
.trend-insight-card,
.trend-insight-card *,
.advisor-note,
.advisor-note *,
.holding-row,
.holding-row *,
.provider-row,
.provider-row *,
.panel-pill,
.panel-pill *,
.market-driver-tile,
.market-driver-tile *,
.metric-info-button:not(:disabled),
.metric-info-button:not(:disabled) *,
.mini-stat-button,
.mini-stat-button *,
.family-asset-category-card,
.family-asset-category-card *,
.family-asset-type-button,
.family-asset-type-button *,
.family-protection-count-button,
.family-protection-count-button * {
  cursor: pointer !important;
}

button:disabled,
button:disabled *,
[aria-disabled="true"],
[aria-disabled="true"] *,
.is-disabled,
.is-disabled * {
  cursor: not-allowed !important;
}

.is-interactive-control,
.is-interactive-control * {
  cursor: pointer !important;
}

.is-interactive-control:hover,
.is-interactive-control:focus-visible,
.is-interactive-control.is-interactive-hover,
[data-fr33dom-hovered="true"] {
  cursor: pointer !important;
  border-color: var(--forest) !important;
  box-shadow: 0 0 0 3px rgba(31, 93, 58, 0.18), 0 14px 30px rgba(31, 93, 58, 0.12) !important;
  transform: translateY(-1px);
}

.is-interactive-control:hover *,
.is-interactive-control:focus-visible *,
.is-interactive-control.is-interactive-hover *,
[data-fr33dom-hovered="true"] * {
  cursor: pointer !important;
}

.is-disabled-control,
.is-disabled-control * {
  cursor: not-allowed !important;
}

.is-interactive-control.is-interactive-hover {
  border-color: var(--forest) !important;
  box-shadow: 0 0 0 3px rgba(31, 93, 58, 0.12) !important;
}

.ghost-button.is-interactive-control.is-interactive-hover,
.icon-button.is-interactive-control.is-interactive-hover {
  color: #fff;
  background: var(--forest);
}

.nav-item.is-interactive-control.is-interactive-hover {
  color: var(--forest);
  background: var(--forest-soft);
}

.quote-card.is-interactive-control.is-interactive-hover,
.market-index-card.is-interactive-control.is-interactive-hover,
.metric-panel.is-interactive-control.is-interactive-hover,
.ibkr-live-stat.is-interactive-control.is-interactive-hover,
.ibkr-live-status.is-interactive-control.is-interactive-hover,
.trend-insight-card.is-interactive-control.is-interactive-hover,
.advisor-note.is-interactive-control.is-interactive-hover,
.holding-row.is-interactive-control.is-interactive-hover,
.provider-row.is-interactive-control.is-interactive-hover,
.panel-pill.is-interactive-control.is-interactive-hover,
.market-driver-tile.is-interactive-control.is-interactive-hover {
  background: #fbfdfb;
}

button.is-interactive-control:hover,
button.is-interactive-control:focus-visible,
button.is-interactive-control.is-interactive-hover,
.ghost-button.is-interactive-control:hover,
.ghost-button.is-interactive-control:focus-visible,
.ghost-button.is-interactive-control.is-interactive-hover,
.nav-item.is-interactive-control:hover,
.nav-item.is-interactive-control:focus-visible,
.nav-item.is-interactive-control.is-interactive-hover,
[data-fr33dom-hovered="true"].ghost-button,
[data-fr33dom-hovered="true"].nav-item {
  color: #fff !important;
  background: var(--forest) !important;
}
