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

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

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

button {
  cursor: pointer;
}

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

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

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

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

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

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

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

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

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

.sidebar-footer .client-feedback-button,
.sidebar-footer .client-referral-button {
  width: 100%;
}

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

.sidebar-footer .logout-button {
  width: 100%;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

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

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

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

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

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

.topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.view {
  display: none;
}

.view.active {
  display: block;
}

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

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

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

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

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

.client-mode .metric-grid {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
  align-content: stretch;
}

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

.client-mode .net-worth-overview-card {
  background:
    linear-gradient(135deg, rgba(248, 219, 101, 0.32), rgba(255, 255, 255, 0.86) 45%),
    #fff;
}

.client-mode .goal-overview-card {
  background:
    linear-gradient(135deg, rgba(20, 121, 91, 0.12), rgba(255, 255, 255, 0.9) 48%),
    #fff;
}

.client-mode .flames-value-card {
  background:
    linear-gradient(135deg, rgba(200, 41, 30, 0.12), rgba(247, 201, 72, 0.14) 46%, rgba(255, 255, 255, 0.92) 78%),
    #fff;
}

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

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

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

.metric-card {
  padding: 18px;
}

.metric-card strong {
  display: block;
  margin: 6px 0;
  font-size: clamp(1.08rem, 1.6vw, 1.35rem);
  font-weight: 500;
  line-height: 1.1;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.net-worth-equation {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.net-worth-equation span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: #f5f1ea;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.value-checklist {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.value-check-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 7px;
  align-items: center;
  color: var(--ink);
  font-size: 0.72rem;
  line-height: 1.25;
}

.value-check-row span {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  font-size: 0.58rem;
  font-weight: 900;
}

.value-check-row strong {
  font-weight: 450;
}

.value-check-row input {
  margin: 0;
  accent-color: var(--ember);
}

.overview-balance-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.overview-balance-row div {
  padding: 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.overview-balance-row span,
.overview-balance-row b {
  display: block;
}

.overview-balance-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.overview-balance-row b {
  margin-top: 4px;
  font-size: 0.98rem;
  font-weight: 500;
}

.stacked-bar {
  display: flex;
  height: 10px;
  overflow: hidden;
  margin-top: 14px;
  border-radius: 999px;
  background: #eee8df;
}

.stacked-bar span {
  height: 100%;
}

.stacked-bar-assets {
  background: var(--green);
}

.stacked-bar-liabilities {
  background: var(--ember);
}

.active-goal-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.active-goal-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
}

.active-goal-row span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.active-goal-row em,
.active-goal-row b {
  color: var(--ink);
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 450;
}

.active-goal-row b {
  font-weight: 500;
}

.metric-delta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 14px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
}

.client-mode #overview .eyebrow,
.client-mode #overview .metric-delta,
.client-mode #overview .overview-balance-row span,
.client-mode #overview .active-goal-row span,
.client-mode #overview .active-goal-row em,
.client-mode #overview .active-goal-row b,
.client-mode #overview .panel-copy,
.client-mode #overview .chat-message p,
.client-mode #overview .value-check-row strong {
  color: var(--ink);
  font-weight: 400;
}

.client-mode #overview .metric-delta {
  background: #f5f1ea;
}

.content-grid,
.account-layout,
.vault-layout,
.goals-layout,
.budgeting-layout,
.schedule-layout,
.notes-layout {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.two-col {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
}

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

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

.panel-header,
.section-heading {
  justify-content: space-between;
  gap: 16px;
}

.section-heading {
  margin-bottom: 16px;
}

select,
.search-input,
.chat-form input,
.goal-form input,
.goal-form select,
.net-worth-add-form input,
.net-worth-add-form select,
.net-worth-edit-form input,
.net-worth-edit-form select,
.budget-input-grid input,
.profile-form input,
.address-grid input,
textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

select {
  height: 38px;
  padding: 0 10px;
}

.chart {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 280px;
  margin-top: 22px;
  padding: 16px 12px 0;
  border-radius: var(--radius);
  background:
    linear-gradient(to top, rgba(35, 32, 29, 0.08) 1px, transparent 1px) 0 0 /
      100% 25%,
    #fffaf2;
}

.chart-bar {
  position: relative;
  flex: 1;
  min-width: 16px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--gold), var(--amber) 45%, var(--ember));
}

.chart-bar span {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.75rem;
}

.task-list,
.document-list,
.account-list,
.goal-list,
.timeline,
.budget-bars,
.control-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

.task-item,
.doc-row,
.account-row,
.goal-row,
.timeline-item,
.budget-row {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.task-item {
  grid-template-columns: 22px 1fr auto;
  align-items: start;
}

.task-item input {
  margin-top: 2px;
  accent-color: var(--ember);
}

.task-item small,
.doc-row small,
.account-row small,
.timeline-item small,
.panel-copy,
.calendar-chip span {
  color: var(--muted);
  line-height: 1.5;
}

.doc-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.document-table .doc-row {
  grid-template-columns: 1fr 140px 110px auto;
}

.progress-ring {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin: 20px auto 18px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #fff 72%, transparent 73%),
    conic-gradient(var(--ember) 0 74%, #eee6dc 74% 100%);
}

.progress-ring span {
  font-size: 1.65rem;
  font-weight: 900;
}

.calendar-chip {
  display: grid;
  gap: 4px;
  margin: 18px 0;
  padding: 14px;
  border-left: 4px solid var(--ember);
  border-radius: var(--radius);
  background: var(--ember-soft);
}

.full-width {
  width: 100%;
}

.account-layout,
.goals-layout,
.budgeting-layout,
.schedule-layout,
.notes-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

#goals .goals-layout {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.net-worth-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.net-worth-column {
  display: grid;
  gap: 18px;
  align-content: start;
}

.net-worth-section {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.net-worth-section-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  height: 46px;
  padding: 8px;
  overflow: hidden;
}

.net-worth-summary-grid {
  margin-bottom: 16px;
}

.net-worth-summary-card {
  max-width: 720px;
}

.tone-0 .net-worth-section-header {
  background: #d4f1e4;
}

.tone-1 .net-worth-section-header {
  background: #d4eef5;
}

.tone-2 .net-worth-section-header {
  background: #f8edc6;
}

.tone-3 .net-worth-section-header {
  background: #e8e0f5;
}

.tone-4 .net-worth-section-header {
  background: #f6e6c8;
}

.tone-5 .net-worth-section-header {
  background: #f7dac7;
}

.tone-6 .net-worth-section-header {
  background: #dfe9d8;
}

.tone-7 .net-worth-section-header {
  background: #ece8df;
}

.net-worth-title-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
  font-weight: 650;
}

.net-worth-section-total {
  font-weight: 500;
}

.add-mini-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 500;
}

.account-count {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.net-worth-item-list {
  display: grid;
  padding: 8px 14px 14px;
}

.net-worth-item-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
}

.net-worth-item-row:last-child {
  border-bottom: 0;
}

.net-worth-item-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.net-worth-item-name,
.net-worth-item-amount {
  font-weight: 500;
}

.remove-icon-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 900;
}

.remove-icon-button:hover {
  border-color: rgba(184, 38, 43, 0.35);
  color: var(--red);
}

.edit-icon-button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 400;
}

.edit-icon-button:hover {
  border-color: rgba(221, 75, 47, 0.3);
  background: #fff6e6;
}

.empty-state {
  padding: 18px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.net-worth-add-form,
.net-worth-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf7;
}

.net-worth-edit-form {
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.net-worth-add-form label,
.net-worth-edit-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}

.net-worth-add-form input,
.net-worth-add-form select,
.net-worth-edit-form input,
.net-worth-edit-form select {
  min-height: 42px;
  min-width: 0;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 500;
}

.net-worth-add-form button,
.net-worth-edit-form button {
  align-self: end;
}

.net-worth-edit-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.asset-fill,
.liability-fill,
.budget-fill {
  height: 8px;
  border-radius: 999px;
}

.bar-track {
  overflow: hidden;
  margin-top: 8px;
  border-radius: 999px;
  background: #eee8df;
}

.asset-fill {
  background: linear-gradient(90deg, var(--amber), var(--green));
}

.liability-fill {
  background: linear-gradient(90deg, var(--ember), var(--amber));
}

.budget-fill {
  background: linear-gradient(90deg, var(--charcoal), var(--amber));
}

.amount-positive {
  color: var(--green);
  font-weight: 900;
}

.amount-negative {
  color: var(--red);
  font-weight: 900;
}

.vault-layout {
  grid-template-columns: 220px minmax(0, 1fr);
}

.folder-panel {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
}

.folder-item {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 0 12px;
}

.folder-item.active,
.folder-item:hover {
  background: var(--ember-soft);
  color: var(--ink);
}

.search-input {
  min-width: 220px;
  height: 40px;
  padding: 0 12px;
}

.confidence-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.goal-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.goal-form label,
.budget-input-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.goal-form input,
.goal-form select,
.budget-input-grid input {
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 500;
}

.budget-input-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.budget-input-grid small {
  color: #4f555c;
  font-size: 0.76rem;
  line-height: 1.35;
}

.split-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}

.planner-step .retirement-lump-sum-inputs {
  grid-template-columns: minmax(0, 1fr) 64px;
}

.planner-step .retirement-social-security-inputs {
  grid-template-columns: minmax(0, 1fr) 64px;
}

.input-with-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.input-with-suffix input {
  border: 0;
}

.input-with-suffix span {
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.waterfall-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 360px;
  margin-top: 18px;
  padding: 14px;
  overflow-x: auto;
  border-radius: var(--radius);
  background:
    linear-gradient(to top, rgba(35, 32, 29, 0.07) 1px, transparent 1px) 0 0 /
      100% 25%,
    #fffaf2;
}

.waterfall-step {
  display: grid;
  align-content: end;
  gap: 8px;
  min-width: 92px;
  height: 100%;
}

.waterfall-bar-wrap {
  display: flex;
  align-items: end;
  min-height: 250px;
}

.waterfall-bar {
  width: 100%;
  min-height: 8px;
  border-radius: 6px 6px 0 0;
  background: var(--charcoal);
}

.waterfall-bar.positive {
  background: linear-gradient(180deg, var(--green), #5ab994);
}

.waterfall-bar.negative {
  background: linear-gradient(180deg, var(--ember), var(--amber));
}

.waterfall-bar.burn {
  background: linear-gradient(180deg, var(--charcoal), #766f67);
}

.waterfall-label {
  display: grid;
  gap: 3px;
  align-content: start;
  min-height: 70px;
}

.waterfall-label strong {
  min-height: 34px;
  font-size: 0.78rem;
  line-height: 1.25;
}

.waterfall-label span {
  color: var(--muted);
  font-size: 0.78rem;
}

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

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

.budget-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.budget-summary-item strong {
  display: block;
  margin-top: 5px;
}

#budgeting h2,
#budgeting strong,
#budgeting label,
#budgeting input,
#budgeting .confidence-pill,
#budgeting .input-with-suffix span,
#budgeting .budget-summary-item span {
  font-weight: 400;
}

.goal-row {
  grid-template-columns: 1fr;
  padding: 0;
  overflow: hidden;
}

.goal-row.dragging {
  opacity: 0.62;
}

.goal-row.drag-over .goal-row-main {
  background: #fff8eb;
}

.goal-row.inactive {
  border-color: #ddd7cf;
  background: #faf8f5;
}

.goal-row.inactive .goal-row-main {
  opacity: 0.76;
}

.goal-row-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
}

.goal-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.goal-title-edit-form {
  display: grid;
  grid-template-columns: minmax(180px, 320px) auto auto;
  gap: 8px;
  align-items: center;
}

.goal-title-edit-form input {
  min-height: 34px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 400;
}

.goal-title-edit-button {
  min-height: 24px;
  padding: 0 9px;
  font-size: 0.72rem;
}

.goal-duplicate-button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.74rem;
}

.goal-title {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 400;
}

.goal-category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid #e2ded8;
  border-radius: 999px;
  background: #f7f5f1;
  color: #4f555c;
  font-size: 0.72rem;
  font-weight: 400;
}

.goal-row-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.goal-status-toggle {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(20, 121, 91, 0.24);
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  font-size: 0.75rem;
}

.goal-status-toggle.inactive {
  border-color: #dad4cc;
  background: #f4f1eb;
  color: #646b73;
}

.goal-progress-compact {
  display: grid;
  grid-template-columns: auto 96px;
  gap: 10px;
  align-items: center;
  min-width: 152px;
}

.goal-row-delete-button {
  width: 26px;
  height: 26px;
}

.goal-row-delete-button.pending {
  border-color: rgba(200, 41, 30, 0.34);
  background: #fff1ed;
  color: var(--red);
}

.goal-delete-confirm {
  color: var(--red);
  font-size: 0.78rem;
}

.goal-progress-compact span {
  min-width: 38px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 400;
  text-align: right;
}

.goal-mini-meter {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e4de;
}

.goal-mini-meter i {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: var(--progress-color);
}

.goal-drag-handle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: grab;
}

.goal-drag-handle::before {
  content: "";
  width: 14px;
  height: 10px;
  background: repeating-linear-gradient(to bottom, #69717c 0 1px, transparent 1px 4px);
}

.goal-drag-handle:active {
  cursor: grabbing;
}

.goal-drag-handle:hover {
  border-color: rgba(221, 75, 47, 0.3);
  background: #fff6e6;
}

.danger-link {
  color: var(--red);
}

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

.delete-confirm-note {
  margin: -4px 0 12px;
  color: var(--red);
  font-size: 0.82rem;
}

.goal-detail-panel {
  padding: 0;
  border-top: 1px solid var(--line);
  background: #f3f1ef;
}

#goals strong,
#goals b,
#goals h2,
#goals h3,
#goals button {
  font-weight: 400;
}

#goals .goal-form label,
#goals .goal-form input,
#goals .goal-form select {
  font-weight: 400;
}

.goal-planner-shell {
  display: grid;
  grid-template-columns: minmax(290px, 0.46fr) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
}

.goal-planner-main {
  display: grid;
  gap: 14px;
}

.goal-calculator-card,
.goal-tool-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 22, 18, 0.05);
}

.goal-calculator-card {
  align-self: start;
  padding: 16px;
}

.goal-planner-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.goal-planner-heading h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
}

.planner-step-list {
  display: grid;
}

.planner-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) minmax(110px, 0.58fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.planner-step:last-child {
  border-bottom: 0;
}

.planner-step-number {
  display: grid;
  place-items: center;
  align-self: center;
  width: 20px;
  height: 20px;
  color: #2d333a;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.planner-step span,
.planner-step small {
  display: block;
}

.planner-step .planner-step-number {
  display: grid;
  place-items: center;
}

.planner-step span {
  font-size: 0.82rem;
}

.planner-step small {
  margin-top: 3px;
  color: #4f555c;
  font-size: 0.72rem;
  line-height: 1.35;
}

.planner-step input,
.planner-step select,
.planner-progress-values input {
  min-width: 0;
  min-height: 34px;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 400;
}

.goal-progress-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.planner-progress-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 22, 18, 0.05);
}

.payoff-snapshot-card {
  align-content: start;
  min-height: 136px;
  background: linear-gradient(180deg, #fff 0%, #fbfaf7 100%);
}

.payoff-snapshot-card.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background: #edf8f4;
}

.payoff-snapshot-card.warning {
  border-color: rgba(221, 75, 47, 0.2);
  background: #fff3ef;
}

.payoff-snapshot-card strong {
  display: block;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 400;
}

.planner-progress-card > span,
.goal-tool-header span,
.analysis-card > span {
  color: #404852;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.planner-progress-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.64fr);
  gap: 10px;
  align-items: center;
}

.planner-progress-values > span {
  font-size: 0.98rem;
}

.fixed-goal-value {
  display: grid;
  place-items: center end;
  min-height: 34px;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #f6f7f9;
  color: var(--ink);
  padding: 0 10px;
  text-align: right;
}

.planner-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e8ec;
}

.planner-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.planner-meter.cash-flow span {
  background: var(--green);
}

.planner-progress-card small {
  justify-self: end;
  color: #4f555c;
  font-size: 0.74rem;
}

.planner-progress-card .progress-card-note {
  justify-self: start;
  min-height: 16px;
}

.retirement-redirect-note {
  justify-self: start !important;
  padding: 8px 10px;
  border: 1px solid rgba(20, 121, 91, 0.14);
  border-radius: 8px;
  background: #edf8f4;
  color: var(--green) !important;
  line-height: 1.35;
}

.goal-tool-card {
  padding: 16px;
}

.goal-tool-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.planner-settings-form,
.planner-assignment-form {
  display: grid;
  gap: 10px;
}

.planner-settings-form {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.goal-form-note {
  align-self: end;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
  color: #4f555c;
  font-size: 0.78rem;
}

.planner-assignment-forms {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.planner-assignment-form {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.85fr) minmax(0, 0.8fr) auto;
  align-items: end;
}

.planner-account-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.planner-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  min-height: 50px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f1f3f5;
}

.planner-account-row:last-child {
  border-bottom: 0;
}

.planner-account-row.savings-row {
  background: #fff;
}

.planner-account-row span,
.planner-account-row small {
  display: block;
}

.planner-account-row small {
  margin-top: 3px;
  color: #4f555c;
  font-size: 0.72rem;
}

.emergency-funding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.emergency-assignment-card {
  display: grid;
  gap: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, #fbfaf8 100%);
}

.emergency-assignment-card.balance-card {
  border-top: 3px solid #dd4b2f;
}

.emergency-assignment-card.savings-card {
  border-top: 3px solid #e6ab2e;
}

.emergency-assignment-card.retirement-balance-card {
  border-top: 3px solid var(--green);
}

.emergency-assignment-card.retirement-savings-card {
  border-top: 3px solid #e6ab2e;
}

.emergency-assignment-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.emergency-assignment-header span,
.emergency-assignment-total span {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
}

.emergency-assignment-header p,
.emergency-assignment-total small {
  margin: 4px 0 0;
  color: #4f555c;
  font-size: 0.74rem;
  line-height: 1.35;
}

.emergency-assignment-total {
  flex: 0 0 auto;
  min-width: 112px;
  text-align: right;
}

.emergency-assignment-list {
  display: grid;
  gap: 8px;
}

.emergency-assignment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid #e4e0db;
  border-radius: 8px;
  background: #fff;
}

.emergency-assignment-row.savings-row {
  background: #fffaf0;
}

.emergency-assignment-row span,
.emergency-assignment-row small {
  display: block;
}

.emergency-assignment-row small {
  margin-top: 3px;
  color: #606872;
  font-size: 0.72rem;
}

.emergency-assignment-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.emergency-assignment-form label {
  display: grid;
  gap: 6px;
  color: #4f555c;
  font-size: 0.74rem;
}

.emergency-assignment-form input,
.emergency-assignment-form select {
  min-width: 0;
  min-height: 36px;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.retirement-add-balance-button {
  justify-self: start;
  margin-top: 2px;
}

.retirement-add-balance-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.goal-assignment-edit-form {
  margin-top: 8px;
  border-top: 0;
  padding: 10px;
  border: 1px solid #e4e0db;
  border-radius: 8px;
  background: #fff;
}

.assignment-edit-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.retirement-funding-layout {
  display: grid;
  gap: 14px;
}

.retirement-wide-card,
.retirement-savings-card {
  min-width: 0;
}

.retirement-savings-card {
  display: grid;
  gap: 16px;
  overflow: hidden;
  border-top: 3px solid #e6ab2e;
  background: linear-gradient(180deg, #fff 0%, #fffaf0 100%);
}

.retirement-savings-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.retirement-savings-header span,
.retirement-savings-total span {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
}

.retirement-savings-header p,
.retirement-savings-total small {
  margin: 4px 0 0;
  color: #4f555c;
  font-size: 0.74rem;
  line-height: 1.35;
}

.retirement-savings-total {
  min-width: 150px;
  text-align: right;
}

.retirement-savings-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.emergency-savings-wide-card {
  border-top-color: #e6ab2e;
}

.emergency-savings-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.retirement-savings-stats > div,
.retirement-contribution-buckets > div {
  padding: 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.retirement-savings-stats > div.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background: #edf8f4;
}

.retirement-savings-stats > div.warning {
  border-color: rgba(221, 75, 47, 0.2);
  background: #fff3ef;
}

.retirement-savings-stats span,
.retirement-contribution-buckets span {
  display: block;
  color: #4f555c;
  font-size: 0.72rem;
}

.retirement-savings-stats strong,
.retirement-contribution-buckets strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 400;
}

.retirement-contribution-list {
  display: grid;
  gap: 8px;
}

.retirement-contribution-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(120px, 0.7fr) minmax(110px, 0.65fr) minmax(100px, 0.55fr) minmax(110px, 0.6fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #e4e0db;
  border-radius: 8px;
  background: #fff;
}

.retirement-contribution-row select,
.retirement-contribution-row input,
.retirement-contribution-form select,
.retirement-contribution-form input {
  min-width: 0;
  min-height: 36px;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.retirement-contribution-row > span,
.retirement-contribution-row > strong {
  color: #4f555c;
  font-size: 0.78rem;
  font-weight: 400;
}

.retirement-contribution-row > strong {
  color: var(--ink);
  text-align: right;
}

.retirement-contribution-buckets span {
  display: flex;
  gap: 8px;
  align-items: center;
}

.retirement-contribution-buckets i {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.retirement-contribution-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.7fr) minmax(0, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.retirement-contribution-form label {
  display: grid;
  gap: 6px;
  color: #4f555c;
  font-size: 0.74rem;
}

.retirement-withdrawal-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border-top: 3px solid #dd4b2f;
  background: linear-gradient(180deg, #fff 0%, #fff8f4 100%);
}

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

.retirement-withdrawal-card span {
  color: #404852;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.retirement-withdrawal-card strong {
  margin-top: 6px;
  color: var(--ink);
  font-size: 1.35rem;
}

.retirement-withdrawal-card p {
  max-width: 330px;
  margin: 0;
  color: #4f555c;
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: right;
}

.retirement-income-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.income-snapshot-card,
.income-funding-card,
.retirement-income-plan-card,
.income-bucket-card,
.ltc-needs-card,
.withdrawal-strategy-card {
  background: linear-gradient(180deg, #fff 0%, #fbfaf7 100%);
}

.income-snapshot-card {
  align-content: start;
  min-height: 136px;
}

.income-snapshot-card.complete,
.income-funding-card.complete,
.income-plan-stats > div.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background: #edf8f4;
}

.income-snapshot-card.warning,
.income-funding-card.warning,
.income-plan-stats > div.warning {
  border-color: rgba(221, 75, 47, 0.2);
  background: #fff3ef;
}

.income-snapshot-card strong,
.income-funding-line strong,
.income-plan-stats strong,
.income-bucket-grid strong {
  display: block;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 400;
}

.income-snapshot-card small {
  justify-self: start;
  line-height: 1.35;
}

.income-funding-card {
  min-height: 136px;
}

.income-funding-line {
  display: grid;
  gap: 4px;
}

.income-funding-line small {
  justify-self: start;
}

.retirement-income-plan-card {
  display: grid;
  gap: 16px;
  border-top: 3px solid var(--green);
}

.payoff-plan-card,
.payoff-account-card,
.payoff-strategy-card {
  display: grid;
  gap: 14px;
  background: linear-gradient(180deg, #fff 0%, #fbfaf7 100%);
}

.payoff-plan-card {
  border-top: 3px solid var(--green);
}

.payoff-account-card {
  border-top: 3px solid var(--amber);
}

.payoff-strategy-card {
  border-top: 3px solid var(--charcoal);
}

.income-plan-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.income-plan-header span:not(.income-status-pill) {
  display: block;
  color: #404852;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.income-plan-header h3 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 1.35rem;
}

.income-plan-header p {
  max-width: 640px;
  margin: 8px 0 0;
  color: #4f555c;
  font-size: 0.82rem;
  line-height: 1.45;
}

.income-status-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.76rem;
  background: #f3f1ef;
}

.income-status-pill.complete {
  background: #dff3ec;
}

.income-status-pill.warning {
  background: #ffe2d8;
}

.income-plan-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.payoff-plan-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.income-plan-stats > div,
.payoff-plan-stats > div,
.payoff-mini-grid > div {
  padding: 11px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
}

.income-plan-stats span,
.payoff-plan-stats span,
.payoff-mini-grid span,
.income-bucket-grid span {
  display: block;
  color: #4f555c;
  font-size: 0.72rem;
}

.income-plan-stats strong,
.payoff-plan-stats strong,
.payoff-account-row strong,
.payoff-mini-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 400;
}

.payoff-plan-stats > div.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background: #edf8f4;
}

.payoff-plan-stats > div.warning {
  border-color: rgba(221, 75, 47, 0.2);
  background: #fff3ef;
}

.payoff-account-list {
  display: grid;
  gap: 8px;
}

.payoff-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
}

.payoff-account-row span {
  display: block;
  color: var(--ink);
  font-size: 0.84rem;
}

.payoff-account-row small {
  display: block;
  margin-top: 3px;
  color: #4f555c;
  font-size: 0.72rem;
}

.payoff-account-row strong {
  text-align: right;
}

.payoff-strategy-card p {
  margin: 0;
  color: #4f555c;
  font-size: 0.82rem;
  line-height: 1.45;
}

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

.income-lifecycle {
  display: grid;
  gap: 8px;
}

.income-lifecycle-labels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  color: #4f555c;
  font-size: 0.74rem;
}

.income-lifecycle-labels span:nth-child(2) {
  text-align: center;
}

.income-lifecycle-labels span:last-child {
  text-align: right;
}

.income-lifecycle-bar {
  display: flex;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e8ec;
}

.income-lifecycle-bar i,
.income-lifecycle-bar b {
  display: block;
  height: 100%;
}

.income-lifecycle-bar i {
  background: #d6dadf;
}

.income-lifecycle-bar b {
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.income-bucket-card {
  display: grid;
  gap: 14px;
  border-top: 3px solid var(--charcoal);
}

.ltc-needs-card {
  display: grid;
  gap: 14px;
  border-top: 3px solid var(--green);
}

.ltc-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ltc-toggle {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: 999px;
  background: #edf8f4;
  color: var(--green);
  padding: 5px 10px;
  font-size: 0.72rem;
}

.ltc-toggle input {
  accent-color: var(--green);
}

.ltc-philosophy {
  margin: 0;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 8px;
  background: #edf8f4;
  color: #2d333a;
  padding: 11px 12px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.ltc-status-note {
  margin: 0;
  border: 1px solid rgba(20, 121, 91, 0.16);
  border-radius: 8px;
  background: #edf8f4;
  color: #245b49;
  padding: 10px 12px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.ltc-status-note.warning {
  border-color: rgba(221, 75, 47, 0.18);
  background: #fff3ef;
  color: #8c271c;
}

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

.ltc-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 160px;
  gap: 10px;
}

.ltc-shock-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  gap: 10px;
}

.ltc-summary-grid > div,
.ltc-start-field,
.ltc-stage-row,
.ltc-shock-detail > div {
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
}

.ltc-summary-grid > div,
.ltc-shock-detail > div {
  padding: 10px;
}

.ltc-summary-grid span,
.ltc-start-field span,
.ltc-stage-row label,
.ltc-shock-detail span {
  color: #4f555c;
  font-size: 0.72rem;
}

.ltc-summary-grid strong,
.ltc-start-field strong,
.ltc-stage-row strong,
.ltc-shock-detail strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 400;
}

.ltc-summary-grid small,
.ltc-stage-row small,
.ltc-shock-detail small {
  display: block;
  margin-top: 3px;
  color: #4f555c;
  font-size: 0.72rem;
  line-height: 1.35;
}

.ltc-start-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.ltc-control-grid .ltc-start-field {
  grid-template-columns: 1fr;
  align-content: start;
}

.ltc-start-field input,
.ltc-start-field select,
.ltc-stage-row input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #d8dce1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 400;
}

.ltc-stage-list {
  display: grid;
  gap: 8px;
}

.ltc-stage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 76px 94px 110px;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.ltc-stage-row > div > span {
  display: block;
  color: var(--ink);
  font-size: 0.84rem;
}

.ltc-stage-row label {
  display: grid;
  gap: 5px;
}

.ltc-stage-row strong {
  text-align: right;
}

.withdrawal-strategy-card {
  display: grid;
  gap: 14px;
  border-top: 3px solid var(--red);
}

.strategy-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(221, 75, 47, 0.2);
  border-radius: 999px;
  background: #fff4ef;
  color: #8c271c;
  padding: 5px 10px;
  font-size: 0.72rem;
}

.withdrawal-strategy-summary {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 10px;
}

.withdrawal-strategy-summary > div,
.withdrawal-bucket-row,
.withdrawal-account-row {
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
}

.withdrawal-strategy-summary > div {
  padding: 10px;
}

.withdrawal-strategy-summary span,
.withdrawal-account-heading span,
.withdrawal-bucket-row span {
  color: #4f555c;
  font-size: 0.72rem;
}

.withdrawal-strategy-summary strong,
.withdrawal-bucket-row strong,
.withdrawal-bucket-row em,
.withdrawal-account-row strong {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  font-style: normal;
  font-weight: 400;
}

.withdrawal-strategy-summary strong {
  margin-top: 5px;
  line-height: 1.35;
}

.withdrawal-bucket-list,
.withdrawal-account-list {
  display: grid;
  gap: 8px;
}

.withdrawal-bucket-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 120px 42px;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.withdrawal-bucket-row span {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 0.82rem;
}

.withdrawal-bucket-row i {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.withdrawal-bucket-row small,
.withdrawal-account-heading small,
.withdrawal-account-row small,
.withdrawal-shortfall {
  color: #4f555c;
  font-size: 0.74rem;
  line-height: 1.35;
}

.withdrawal-bucket-row strong,
.withdrawal-bucket-row em,
.withdrawal-account-row strong {
  text-align: right;
}

.withdrawal-account-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-top: 2px;
}

.withdrawal-account-heading span {
  color: var(--ink);
  font-size: 0.82rem;
}

.withdrawal-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.withdrawal-account-row span {
  display: block;
  color: var(--ink);
  font-size: 0.84rem;
}

.withdrawal-account-row small {
  display: block;
  margin-top: 3px;
}

.withdrawal-shortfall {
  margin: 2px 0 0;
  border: 1px solid rgba(221, 75, 47, 0.18);
  border-radius: 8px;
  background: #fff3ef;
  padding: 9px 10px;
}

.income-bucket-strip {
  display: flex;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e8ec;
}

.income-bucket-strip i {
  display: block;
  min-width: 4px;
  height: 100%;
}

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

.income-bucket-grid > div {
  padding: 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 8px;
  background: #fff;
}

.income-bucket-grid span {
  display: flex;
  gap: 8px;
  align-items: center;
}

.income-bucket-grid i {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.income-bucket-grid strong {
  margin-top: 5px;
  font-size: 0.92rem;
}

.retirement-tax-bucket-card {
  display: grid;
  gap: 18px;
  border-top: 3px solid var(--charcoal);
  background: linear-gradient(180deg, #fff 0%, #fbfaf7 100%);
}

.retirement-tax-bucket-card .goal-tool-header small {
  color: #4f555c;
  font-size: 0.76rem;
}

.tax-bucket-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.tax-bucket-pie {
  width: 170px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #fff 60%, transparent 61%),
    conic-gradient(var(--bucket-gradient));
  box-shadow: inset 0 0 0 1px rgba(35, 32, 29, 0.06);
}

.tax-bucket-legend {
  display: grid;
  gap: 8px;
}

.tax-bucket-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 110px;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(35, 32, 29, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.tax-bucket-row span {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  color: var(--ink);
  font-size: 0.84rem;
}

.tax-bucket-row i {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.tax-bucket-row strong,
.tax-bucket-row small {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 400;
  text-align: right;
}

.goal-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.analysis-card {
  display: grid;
  gap: 18px;
  min-height: 190px;
}

.donut-row {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.planner-donut {
  width: 126px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #fff 60%, transparent 61%),
    conic-gradient(var(--green) 0 100%);
}

.planner-donut.tax-donut {
  background:
    radial-gradient(closest-side, #fff 60%, transparent 61%),
    conic-gradient(#ffb35c 0 100%);
}

.donut-row span,
.donut-row small {
  display: block;
}

.donut-row small {
  margin-top: 5px;
  color: #4f555c;
}

.goal-assignment-layout {
  display: grid;
  gap: 12px;
}

.goal-assignment-form {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 0.8fr) auto;
  gap: 10px;
  align-items: end;
}

.goal-edit-form,
.goal-savings-assignment-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.goal-assignment-form label,
.goal-edit-form label,
.goal-savings-assignment-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.goal-assignment-form select,
.goal-assignment-form input,
.goal-edit-form select,
.goal-edit-form input,
.goal-savings-assignment-form select,
.goal-savings-assignment-form input {
  min-height: 38px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  font-weight: 400;
}

.planner-settings-form {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.planner-assignment-form,
.goal-savings-assignment-form.planner-assignment-form {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.85fr) minmax(0, 0.8fr) auto;
}

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

.assignment-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.assignment-row strong {
  font-weight: 400;
}

.coverage-card {
  padding: 10px;
  border: 1px solid rgba(35, 32, 29, 0.11);
  border-radius: var(--radius);
  background: #fff;
}

.coverage-card.complete {
  border-color: rgba(20, 121, 91, 0.18);
  background: #edf8f4;
}

.coverage-card span {
  display: block;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 400;
}

.coverage-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-weight: 400;
}

.goal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: #3d4248;
  font-size: 0.86rem;
}

.budget-row {
  grid-template-columns: 1fr 80px;
  align-items: center;
}

.budget-row .bar-track {
  grid-column: 1 / -1;
  margin-top: 0;
}

.month-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.month-strip button,
.time-grid button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-day {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
}

.calendar-day.active {
  border-color: var(--ember);
  background: var(--ember-soft);
  color: var(--ink);
  font-weight: 900;
}

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

textarea {
  width: 100%;
  min-height: 190px;
  padding: 14px;
  resize: vertical;
}

.profile-form {
  display: grid;
  gap: 16px;
}

.profile-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.profile-section-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

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

.profile-grid label,
.kid-grid label,
.address-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}

.profile-grid input,
.kid-grid input,
.address-grid input {
  min-height: 42px;
  min-width: 0;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 400;
}

.dob-age-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 94px;
  gap: 8px;
}

.age-output {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid rgba(20, 121, 91, 0.18);
  border-radius: var(--radius);
  background: #edf8f4;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 400;
}

#profile .eyebrow,
#profile small,
#profile label,
#profile input {
  font-weight: 400;
}

.kids-list {
  display: grid;
  gap: 12px;
}

.kid-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
}

.add-row-button {
  min-height: 44px;
  border: 1px dashed rgba(200, 41, 30, 0.42);
  border-radius: var(--radius);
  background: var(--ember-soft);
  color: var(--ember);
  font-weight: 400;
  text-align: left;
  padding: 0 14px;
}

.profile-section-actions {
  display: flex;
  justify-content: flex-end;
}

.risk-tolerance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(221, 75, 47, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, #fff8f4 100%);
}

.risk-tolerance-row span,
.risk-tolerance-row small {
  display: block;
}

.risk-tolerance-row span {
  color: var(--ink);
  font-size: 0.9rem;
}

.risk-tolerance-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.access-list {
  display: grid;
  gap: 10px;
}

.access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.7fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
}

.access-row span,
.access-row small {
  display: block;
}

.access-row span {
  font-size: 0.9rem;
}

.access-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.wide-field {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.note-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.timeline-item {
  grid-template-columns: 110px 1fr;
}

.chat-window {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: #f5f1ea;
}

.overview-chat-window {
  flex: 1;
  max-height: none;
}

.overview-assistant-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.vault-layout-single {
  grid-template-columns: minmax(0, 1fr);
}

.folder-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 16px;
}

.folder-create-row input {
  min-height: 42px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
}

.vault-folder-grid {
  display: grid;
  gap: 0;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.vault-folder-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 12px 0 var(--indent, 12px);
  text-align: left;
}

.vault-folder-row:hover,
.vault-folder-row.active,
.vault-folder-row.drag-over {
  background: #fff6e6;
}

.vault-folder-row.active {
  box-shadow: inset 4px 0 0 var(--amber);
}

.vault-folder-row:last-child {
  border-bottom: 0;
}

.vault-folder-row span,
.vault-folder-row small {
  display: block;
}

.vault-folder-row span {
  color: var(--ink);
}

.vault-folder-row small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.doc-row[draggable="true"] {
  cursor: grab;
}

.doc-row[draggable="true"]:active {
  cursor: grabbing;
}

.chat-message {
  max-width: 78%;
  padding: 12px;
  border-radius: var(--radius);
  background: #fff;
}

.chat-message p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.chat-message.user {
  justify-self: end;
  background: var(--charcoal);
  color: #fff;
}

.chat-message.user p {
  color: rgba(255, 255, 255, 0.74);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 14px;
}

.chat-form input {
  min-width: 0;
  height: 44px;
  padding: 0 14px;
}

.control-list label {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 38px;
}

.control-list input {
  accent-color: var(--ember);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(21, 21, 21, 0.42);
}

.feedback-modal {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 26px 80px rgba(12, 10, 8, 0.24);
  padding: 20px;
}

.feedback-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.feedback-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.feedback-form select,
.feedback-form textarea {
  color: var(--ink);
  font-weight: 500;
}

.risk-modal {
  width: min(680px, 100%);
}

.risk-form {
  max-height: min(72vh, 720px);
  overflow: auto;
  padding-right: 4px;
}

.risk-question {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
}

.risk-question > span {
  color: var(--ink);
  font-size: 0.9rem;
}

.risk-question label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #4f555c;
  font-size: 0.84rem;
  font-weight: 400;
}

.risk-question input {
  accent-color: var(--ember);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 44px));
  padding: 14px 16px;
  border: 1px solid rgba(20, 121, 91, 0.22);
  border-radius: var(--radius);
  background: #edf8f4;
  color: var(--green);
  box-shadow: var(--shadow);
  font-weight: 800;
}

@media (max-width: 1120px) {
  .metric-grid,
  .three-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-mode .metric-grid {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding: 18px;
  }

  .brand {
    min-height: 54px;
  }

  .brand img {
    width: 190px;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-item {
    gap: 2px;
    justify-items: start;
    min-height: 54px;
  }

  .security-card {
    display: none;
  }

  .workspace {
    padding: 18px;
  }

  .topbar,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions,
  .button-group {
    width: 100%;
  }

  .mode-switch {
    flex: 1;
    width: 100%;
  }

  .metric-grid,
  .account-layout,
  .net-worth-card-grid,
  .goal-planner-shell,
  .goal-progress-cards,
  .payoff-snapshot-grid,
  .retirement-income-snapshot,
  .emergency-funding-grid,
  .goal-analysis-grid,
  .income-plan-stats,
  .payoff-plan-stats,
  .payoff-mini-grid,
  .income-bucket-grid,
  .ltc-summary-grid,
  .ltc-control-grid,
  .ltc-shock-detail,
  .withdrawal-strategy-summary,
  .goals-layout,
  .budgeting-layout,
  .schedule-layout,
  .notes-layout,
  .vault-layout,
  .client-mode .client-overview-hero {
    grid-template-columns: 1fr;
  }

  .document-table .doc-row {
    grid-template-columns: 1fr;
  }

  .search-input {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .nav-list,
  .metric-grid,
  .three-col,
  .time-grid {
    grid-template-columns: 1fr;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline-item,
  .goal-row,
  .account-row,
  .goal-row-main,
  .goal-title-edit-form,
  .planner-step,
  .goal-assignment-edit-form,
  .assignment-edit-actions,
  .planner-settings-form,
  .planner-assignment-form,
  .planner-progress-values,
  .planner-account-row,
  .emergency-assignment-row,
  .emergency-assignment-form,
  .retirement-savings-header,
  .retirement-savings-stats,
  .retirement-contribution-buckets,
  .retirement-contribution-row,
  .retirement-contribution-form,
  .retirement-income-snapshot,
  .income-plan-header,
  .income-plan-stats,
  .payoff-plan-stats,
  .payoff-account-row,
  .payoff-mini-grid,
  .income-lifecycle-labels,
  .income-bucket-grid,
  .ltc-summary-grid,
  .ltc-control-grid,
  .ltc-shock-detail,
  .ltc-start-field,
  .ltc-stage-row,
  .withdrawal-strategy-summary,
  .withdrawal-bucket-row,
  .withdrawal-account-heading,
  .withdrawal-account-row,
  .tax-bucket-layout,
  .tax-bucket-row,
  .risk-tolerance-row,
  .donut-row,
  .access-row,
  .goal-assignment-form,
  .goal-edit-form,
  .goal-savings-assignment-form,
  .goal-coverage-summary,
  .net-worth-item-row,
  .net-worth-add-form,
  .net-worth-edit-form,
  .net-worth-edit-actions,
  .folder-create-row,
  .budget-row,
  .budget-summary,
  .split-input,
  .profile-grid,
  .kid-grid,
  .address-grid,
  .dob-age-field {
    grid-template-columns: 1fr;
  }

  .retirement-withdrawal-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .retirement-withdrawal-card p {
    text-align: left;
  }

  .retirement-savings-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .ltc-header-actions {
    flex-wrap: wrap;
  }

  .retirement-savings-total {
    min-width: 0;
    text-align: left;
  }

  .goal-row-actions {
    justify-content: space-between;
    width: 100%;
  }

  .goal-progress-compact {
    flex: 1;
    grid-template-columns: auto minmax(72px, 1fr);
    min-width: 0;
  }

  .chat-message {
    max-width: 100%;
  }
}
