:root {
  /* Молочно-белый минимализм */
  --bg:          #F5F5F3;
  --bg-app:      #F5F5F3;
  --bg-glow:     none;
  --panel:       #FFFFFF;
  --panel-soft:  #FAFAF8;
  --panel-muted: #F5F5F3;
  --surface:     #FAFAF8;
  --bg-hover:    #F5F5F3;

  /* Текст */
  --ink:         #1A1A1A;
  --ink-soft:    #555555;
  --ink-muted:   #999999;

  /* Границы */
  --line:        #EBEBEB;
  --line-soft:   #F0F0F0;
  --line-strong: #D5D5D5;

  /* Акцент — чёрный */
  --brand:        #1A1A1A;
  --brand-strong: #333333;
  --brand-soft:   #F5F5F3;
  --accent:       #1A1A1A;
  --accent-soft:  #F5F5F3;

  /* Семантические */
  --good:           #1D9E75;
  --warn:           #EF9F27;
  --color-success:  #1D9E75;
  --color-danger:   #E24B4A;
  --color-warning:  #EF9F27;
  --color-info:     #378ADD;

  /* Сайдбар */
  --rail-bg:   #FFFFFF;
  --rail-line: #EBEBEB;

  /* Тени — минималистичные */
  --shadow-xl: 0 8px 32px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.05);
  --shadow-md: 0 2px 8px  rgba(0,0,0,0.04);

  /* Радиусы */
  --radius-xl:        32px;
  --radius-lg:        24px;
  --radius-md:        16px;
  --radius-sm:        12px;
  --border-radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: var(--bg, #F5F5F3);
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

input,
select,
textarea {
  border: 1px solid #EBEBEB;
  background: #FFFFFF;
  color: #1A1A1A;
  border-radius: 8px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #1A1A1A;
  box-shadow: 0 0 0 2px #F5F5F3;
}

::placeholder {
  color: #BBBBBB;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,0.16);
  backdrop-filter: blur(6px);
  z-index: 50;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-card {
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid #EBEBEB;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  padding: 24px;
}
.modal-card .modal-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.auth-card {
  width: min(520px, 100%);
}

.import-card {
  width: min(920px, 100%);
}

#income-modal.is-asset-editor .modal-card {
  width: min(760px, 100%);
}

.modal-head,
.modal-actions,
.modal-actions-right,
.panel-head,
.workspace-header,
.detail-actions,
.toolbar-main,
.toolbar-actions,
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h2,
.panel h3,
.workspace-title h1,
.rail-title,
.inspector h2 {
  margin: 0;
}

.modal-head h2 {
  margin-top: 6px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.modal-step,
.workspace-title p,
.onboarding-copy,
.choice-card p,
.template-card p,
.import-option p,
.comparison-card p,
.detail-hint,
.setting-row span,
.rail-note p {
  color: var(--ink-soft);
}

.onboarding-progress {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}

.progress-dot {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #F0F0F0;
}

.progress-dot.active {
  background: var(--brand);
}

.onboarding-card {
  width: min(920px, 100%);
}

.onboarding-screen {
  display: grid;
  gap: 18px;
}

.onboarding-screen--center {
  min-height: 420px;
  align-content: center;
  text-align: center;
}

.onboarding-screen-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.onboarding-screen-head--stack {
  justify-content: flex-start;
}

.onboarding-screen-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.onboarding-screen-subtitle {
  margin: 6px 0 0;
  max-width: 640px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}

.onboarding-block,
.income-inline-card,
.payout-card,
.flow-scheme,
.onboarding-note-card {
  border: 1px solid #EBEBEB;
  border-radius: 24px;
  background: #FFFFFF;
  box-shadow: 0 12px 28px rgba(24, 28, 38, 0.04);
}

.onboarding-block,
.income-inline-card,
.payout-card,
.onboarding-note-card {
  padding: 18px;
}

.onboarding-block-head,
.payout-card-head,
.distribution-table-head,
.distribution-table-row,
.finish-stats {
  display: grid;
  gap: 12px;
}

.onboarding-block-head {
  margin-bottom: 14px;
}

.onboarding-block-head strong,
.payout-card-head strong,
.onboarding-note-card strong {
  font-size: 16px;
  line-height: 1.3;
}

.onboarding-block-head span,
.payout-card-head span,
.distribution-table-meta span,
.finish-stat span,
.onboarding-note-card span {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.quiz-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #EBEBEB;
  overflow: hidden;
}

.quiz-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7f8d7b 0%, #51685c 100%);
}

.onboarding-quiz-list {
  gap: 12px;
}

.onboarding-question-card {
  gap: 12px;
}

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

.onboarding-question-card > strong {
  font-size: 16px;
  line-height: 1.4;
}

.flow-scheme {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.flow-scheme--timeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.flow-step {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 16px 14px;
  border-radius: 18px;
  background: #f7f8f6;
  border: 1px solid #F0F0F0;
  text-align: left;
}

.flow-step strong {
  font-size: 15px;
  line-height: 1.35;
}

.flow-step span,
.flow-arrow,
.flow-step-number {
  color: var(--ink-soft);
}

.flow-step span {
  font-size: 12px;
  line-height: 1.45;
}

.flow-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(81, 104, 92, 0.08);
  color: #51685c;
  font-size: 12px;
  font-weight: 700;
}

.flow-arrow {
  font-size: 18px;
  line-height: 1;
}

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

.onboarding-note-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setup-step-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  align-items: start;
}

.setup-main-panel {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.setup-catalog-panel {
  display: grid;
  gap: 16px;
}

.setup-catalog-panel {
  padding: 14px;
  border: 1px solid #EBEBEB;
  border-radius: 24px;
  background: #FFFFFF;
  box-shadow: 0 12px 28px rgba(24, 28, 38, 0.04);
}

.setup-catalog-search,
.setup-catalog-list,
.setup-catalog-group,
.setup-catalog-group-items,
.setup-catalog-copy,
.setup-catalog-check,
.setup-drop-head {
  display: grid;
  gap: 8px;
}

.setup-catalog-meta,
.setup-catalog-hint,
.setup-catalog-copy span,
.setup-catalog-group-title {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.setup-catalog-list {
  gap: 14px;
}

.setup-catalog-group-title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.setup-catalog-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #EBEBEB;
  border-radius: 16px;
  background: #FFFFFF;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.setup-catalog-row:hover:not(:disabled) {
  transform: translateY(-1px);
}

.setup-catalog-row.is-placed {
  border-color: rgba(81, 104, 92, 0.24);
  background: rgba(81, 104, 92, 0.05);
}

.setup-catalog-row:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.setup-group-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.2);
}

.setup-group-dot.tone-food { background: #7f8d7b; }
.setup-group-dot.tone-home { background: #8a7b6f; }
.setup-group-dot.tone-transport { background: #5d7a8c; }
.setup-group-dot.tone-life { background: #8c6c7e; }
.setup-group-dot.tone-bills { background: #6b7c68; }
.setup-group-dot.tone-leisure { background: #92745e; }
.setup-group-dot.tone-goals { background: #4a6082; }
.setup-group-dot.tone-family { background: #7f6e8d; }

.setup-catalog-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink);
}

.setup-catalog-check {
  justify-items: end;
}

.setup-catalog-check input {
  margin: 0;
  pointer-events: none;
}

.setup-drop-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.setup-drop-zone {
  display: grid;
  gap: 12px;
  min-height: 240px;
  padding: 16px;
  border: 1px dashed #E0E0E0;
  border-radius: 22px;
  background: #fbfbfa;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.setup-drop-zone.is-savings {
  background: rgba(74, 96, 130, 0.03);
}

.setup-drop-zone.is-over {
  border-color: rgba(81, 104, 92, 0.32);
  background: rgba(81, 104, 92, 0.05);
  box-shadow: inset 0 0 0 1px rgba(81, 104, 92, 0.08);
}

.setup-drop-head strong {
  font-size: 15px;
  line-height: 1.35;
}

.setup-drop-head span,
.setup-drop-empty {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.setup-drop-empty {
  padding-top: 6px;
}

.basket-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #E0E0E0;
  background: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.basket-tag.is-savings {
  border-color: rgba(74, 96, 130, 0.18);
  background: rgba(74, 96, 130, 0.05);
}

.basket-tag-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.basket-tag-remove {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: #EBEBEB;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background 120ms ease, color 120ms ease;
}

.basket-tag-remove:hover {
  background: rgba(176, 102, 68, 0.15);
  color: #b06644;
}

.setup-drop-body {
  display: grid;
  gap: 8px;
  align-content: flex-start;
}

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

.category-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #EBEBEB;
  border-radius: 20px;
  background: #fff;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.category-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(24, 28, 38, 0.05);
}

.category-card.active {
  border-color: rgba(81, 104, 92, 0.24);
  background: rgba(81, 104, 92, 0.04);
}

.category-card.is-savings {
  border-color: rgba(74, 96, 130, 0.18);
  background: rgba(74, 96, 130, 0.04);
}

.category-card-toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.category-card-copy {
  display: grid;
  gap: 4px;
}

.category-card-line,
.matrix-category-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.category-card-copy strong {
  font-size: 15px;
  line-height: 1.35;
}

.category-card-copy span {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.category-card-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #F5F5F3;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.category-group-switch {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.category-group-chip,
.category-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.category-group-chip {
  border: 1px solid #EBEBEB;
  background: #FFFFFF;
  cursor: pointer;
}

.category-group-chip.is-active {
  border-color: rgba(81, 104, 92, 0.28);
  background: rgba(81, 104, 92, 0.1);
  color: #51685c;
}

.category-type-badge {
  background: rgba(74, 96, 130, 0.1);
  color: #4a6082;
}

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

.category-chip,
.frequency-card {
  width: 100%;
  border: 1px solid #EBEBEB;
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.category-chip:hover,
.frequency-card:hover {
  transform: translateY(-1px);
}

.category-chip strong,
.frequency-card {
  font-size: 15px;
  line-height: 1.25;
}

.category-chip span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-soft);
}

.category-chip.active,
.frequency-card.active {
  border-color: rgba(81, 104, 92, 0.28);
  background: rgba(81, 104, 92, 0.06);
}

.income-inline-card {
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: end;
  gap: 10px;
}

.income-inline-note {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 16px;
  background: #f4f5f2;
  color: var(--ink-soft);
  white-space: nowrap;
  font-size: 13px;
}

.payout-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.payout-editor-field input,
.payout-amount-input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.payout-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.payout-editor-status {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.4;
}

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

.onboarding-distribution-wrap {
  overflow-x: auto;
  border: 1px solid #EBEBEB;
  border-radius: 24px;
  background: #FFFFFF;
  box-shadow: 0 12px 28px rgba(24, 28, 38, 0.04);
}

.onboarding-distribution-matrix {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.onboarding-distribution-matrix th,
.onboarding-distribution-matrix td {
  padding: 14px 16px;
  border-bottom: 1px solid #EBEBEB;
  text-align: left;
  vertical-align: middle;
}

.onboarding-distribution-matrix thead th,
.onboarding-distribution-matrix tfoot th {
  background: #f7f8f6;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.onboarding-distribution-matrix tbody tr:last-child td,
.onboarding-distribution-matrix tbody tr:last-child th,
.onboarding-distribution-matrix tfoot tr:last-child td,
.onboarding-distribution-matrix tfoot tr:last-child th {
  border-bottom: 0;
}

.onboarding-distribution-matrix th:first-child,
.onboarding-distribution-matrix td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #FFFFFF;
}

.onboarding-distribution-matrix thead th:first-child,
.onboarding-distribution-matrix tfoot th:first-child {
  z-index: 2;
  background: #f7f8f6;
}

.matrix-head-cell,
.matrix-category-cell {
  display: grid;
  gap: 4px;
}

.matrix-head-cell strong,
.matrix-category-cell strong,
.matrix-row-total {
  font-size: 14px;
  line-height: 1.3;
  color: var(--ink);
}

.matrix-head-cell span,
.matrix-category-cell span {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.matrix-amount-input {
  width: 100%;
  min-width: 108px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #EBEBEB;
  background: #FFFFFF;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.matrix-amount-input:focus {
  outline: none;
  border-color: rgba(81, 104, 92, 0.28);
  box-shadow: 0 0 0 4px rgba(81, 104, 92, 0.1);
}

.matrix-row-total {
  display: inline-flex;
  min-width: 96px;
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
}

.matrix-summary-row td,
.matrix-summary-row th {
  font-variant-numeric: tabular-nums;
}

.matrix-summary-row td {
  font-weight: 700;
}

.matrix-summary-row .is-soft,
.matrix-summary-row .is-warn {
  border-radius: 14px;
  padding: 8px 10px;
}

.payout-blocks {
  display: grid;
  gap: 14px;
}

.payout-card-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  margin-bottom: 12px;
}

.payout-summary,
.payout-card-footer,
.finish-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 14px;
  font-size: 13px;
}

.payout-summary {
  flex-direction: column;
  align-items: flex-end;
}

.payout-summary strong,
.payout-card-footer strong {
  color: var(--ink);
}

.payout-summary.is-soft,
.payout-card-footer.is-soft,
.finish-mark {
  background: rgba(81, 104, 92, 0.08);
  color: #51685c;
}

.payout-summary.is-warn,
.payout-card-footer.is-warn {
  background: rgba(176, 102, 68, 0.08);
  color: var(--warn);
}

.distribution-table {
  border: 1px solid #EBEBEB;
  border-radius: 18px;
  overflow: hidden;
}

.distribution-table-head,
.distribution-table-row {
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  padding: 11px 13px;
}

.distribution-table-head {
  background: #f6f7f4;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.distribution-table-row + .distribution-table-row {
  border-top: 1px solid #EBEBEB;
}

.distribution-table-meta {
  display: grid;
  gap: 3px;
}

.distribution-table-meta strong {
  font-size: 14px;
  line-height: 1.3;
}

.payout-card-footer {
  margin-top: 10px;
}

.finish-mark {
  justify-self: center;
  font-weight: 700;
}

.finish-mark--animated {
  animation: growIn 0.35s ease-out;
}

@keyframes growIn {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.finish-next-step {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(81, 104, 92, 0.07);
  text-align: left;
  display: grid;
  gap: 4px;
}

.finish-next-step strong {
  font-size: 15px;
}

.finish-next-step p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

#finish-start-btn {
  margin-top: 20px;
  width: 100%;
}

.finish-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
}

.finish-stat {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 20px;
  background: #FFFFFF;
  border: 1px solid #EBEBEB;
}

.finish-stat strong {
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.modal-body,
.choice-grid,
.template-grid,
.inline-grid,
.editor-grid,
.analytics-grid,
.settings-grid,
.overview-stats,
.bars,
.radio-group,
.setting-list,
.mapping-list,
.import-grid {
  display: grid;
  gap: 14px;
}

.modal-body {
  min-height: 280px;
}

.intro-flow,
.baskets-grid,
.basket-columns,
.distribution-list,
.income-step-grid,
.income-dates-list,
.category-builder-layout,
.payout-switches {
  display: grid;
  gap: 14px;
}

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

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

.template-grid,
.import-grid,
.analytics-grid,
.settings-grid,
.income-step-grid,
.income-top-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.inline-grid.single {
  grid-template-columns: 1.3fr 1fr auto;
  align-items: end;
}

.custom-category-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.9fr) minmax(180px, 220px) auto;
  gap: 14px;
  align-items: end;
}

.asset-editor-layout {
  display: grid;
  gap: 18px;
  max-width: 100%;
}

.asset-editor-quick,
.asset-editor-form {
  display: grid;
  gap: 14px;
}

.asset-editor-intro {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.asset-editor-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.asset-editor-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
}

.asset-editor-toggle {
  padding: 16px 18px;
}


.choice-card,
.template-card,
.import-option,
.panel {
  background: var(--panel);
  border: 1px solid #EBEBEB;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 14px 36px rgba(24, 28, 38, 0.04);
}

.choice-card,
.template-card {
  cursor: pointer;
}

.builder-head,
.pool-head,
.distribution-row,
.distribution-meta,
.income-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.builder-head {
  align-items: flex-start;
}

.builder-head p,
.pool-head p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.recommendation-copy {
  line-height: 1.5;
}

.recommendation-copy strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.summary-screen {
  display: grid;
  gap: 18px;
  max-width: 980px;
}

#section-analytics .summary-screen,
#analytics-view .summary-screen {
  max-width: 100%;
}

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

.auth-copy {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.45;
  font-size: 14px;
}

.auth-error {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(176, 102, 68, 0.08);
  border: 1px solid rgba(176, 102, 68, 0.12);
  color: var(--warn);
  font-size: 14px;
  line-height: 1.4;
}

.auth-actions {
  align-items: center;
  justify-content: flex-end;
}

.auth-switch-copy {
  color: var(--ink-soft);
  font-size: 14px;
}

.auth-switch-copy:empty {
  display: none;
}

.auth-shell,
.auth-hero,
.auth-mode-switch {
  display: grid;
  gap: 14px;
}

.auth-shell {
  gap: 18px;
}

.auth-hero {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid #EBEBEB;
  background: #FFFFFF;
}

.auth-hero h3 {
  margin: 0;
  font-size: 34px;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.auth-hero p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.45;
}

.auth-mode-switch {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  border-radius: 18px;
  background: #F5F5F3;
}

.auth-mode-pill {
  border: 0;
  min-height: 44px;
  border-radius: 14px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
  cursor: pointer;
}

.auth-mode-pill.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 20px rgba(24, 28, 38, 0.05);
}

.auth-field span {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.auth-field input {
  min-height: 50px;
  border-radius: 16px;
}

.btn-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
}

.summary-screen-head {
  display: grid;
  gap: 4px;
}

.summary-screen-head strong {
  font-size: 18px;
  line-height: 1.25;
}

.summary-hero {
  padding: 24px 26px;
  border: 1px solid #EBEBEB;
  border-radius: 30px;
  background: #FFFFFF;
  box-shadow: var(--shadow-lg);
}

.summary-hero h3 {
  margin: 8px 0 10px;
  font-size: 42px;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.summary-hero p {
  margin: 0;
  max-width: 860px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
}

.summary-helper {
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.summary-note {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 20px;
  background: #FAFAF8;
  border: 1px solid #F0F0F0;
}

.summary-quote {
  display: grid;
  gap: 6px;
}

.summary-quote blockquote {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
}

.summary-quote p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.summary-note strong {
  font-size: 18px;
  line-height: 1.35;
}

.summary-note span {
  color: var(--ink-soft);
  line-height: 1.45;
}

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

.intro-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 28px;
  border-radius: 30px;
  border: 1px solid #EBEBEB;
  background: #FFFFFF;
  box-shadow: var(--shadow-lg);
}

.intro-hero-copy {
  display: grid;
  gap: 8px;
}

.intro-hero-copy h3 {
  margin: 0;
  max-width: 720px;
  font-size: 46px;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.intro-hero-copy p {
  margin: 0;
  max-width: 620px;
  font-size: 17px;
  line-height: 1.48;
  color: var(--ink-soft);
}

.intro-step-card {
  min-height: 156px;
  padding: 22px 22px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(22, 28, 38, 0.06);
  box-shadow: var(--shadow-md);
}

.intro-step-card strong {
  display: block;
  margin-top: 6px;
  font-size: 19px;
  line-height: 1.25;
}

.intro-step-card p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.baskets-grid {
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
}

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

.basket-columns-wide {
  grid-template-columns: 1fr;
  gap: 12px;
}

.category-builder-layout {
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.pool-column,
.basket-card {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--panel);
}

.drop-zone {
  min-height: 180px;
  padding: 10px;
  border-radius: 14px;
  border: 1px dashed rgba(24, 32, 38, 0.16);
  background: rgba(24, 32, 38, 0.02);
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
}

.drop-zone.is-over {
  border-color: var(--brand);
  background: rgba(15, 109, 103, 0.05);
}

.pool-zone {
  margin-bottom: 14px;
  align-content: flex-start;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: grab;
}

.category-pill-copy {
  display: grid;
  gap: 2px;
}

.category-pill-copy strong {
  font-size: 14px;
  line-height: 1.3;
}

.category-pill-copy span {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.35;
}

.category-toggle,
.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-soft);
}

.custom-category-check {
  min-width: 0;
}

.custom-category-check .checkbox-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
  margin-top: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  white-space: nowrap;
  box-sizing: border-box;
}

.custom-category-grid .btn {
  min-width: 140px;
  align-self: end;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 109, 103, 0.08);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}

.investment-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) 110px 150px auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.investment-input {
  width: 100%;
}

.investment-row input,
.investment-row select {
  min-width: 0;
}

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

.asset-add-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed var(--line-strong);
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.asset-add-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(15, 109, 103, 0.08);
  color: var(--brand);
  font-weight: 800;
}

.investment-base-copy {
  align-self: center;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-soft);
  white-space: nowrap;
}

.balance-modal-card {
  max-width: 560px;
}

.category-pill.is-detailed {
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  border-radius: 14px;
  padding: 10px 12px;
}

.pool-zone {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.pill-edit-btn {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 0;
  background: #F5F5F3;
  cursor: pointer;
}

.pill-lock-badge {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #F5F5F3;
  font-size: 12px;
  line-height: 1;
  color: var(--ink-soft);
}

.empty-drop {
  color: var(--ink-soft);
  font-size: 13px;
}

.pool-column-right .drop-zone {
  min-height: 560px;
}

.basket-count {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  background: #F5F5F3;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.builder-head strong,
.pool-head strong {
  font-size: 14px;
  line-height: 1.35;
}

.investments-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px minmax(260px, 0.9fr);
  gap: 12px;
  align-items: end;
  margin: 10px 0 14px;
}

.inline-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(24, 32, 38, 0.04);
  color: var(--ink-soft);
  line-height: 1.45;
}

.fx-note {
  text-align: left;
}

.compact-service-field {
  align-self: stretch;
}

.compact-service-field span {
  font-size: 11px;
}

.compact-service-field select {
  min-height: 44px;
  padding: 10px 12px;
}

.investment-table {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
}

.investment-table-head {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) 110px 150px auto;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(24, 32, 38, 0.03);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.investment-table .detail-hint {
  margin: 0;
  border-radius: 0;
  background: transparent;
}

.builder-head p,
.pool-head p,
.eyebrow {
  font-size: 12px;
}

.distribution-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
  background: var(--panel);
  max-height: 420px;
}

.distribution-topline,
.distribution-actions,
.distribution-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.income-date-row {
  align-items: end;
}

.income-date-row .stack-field {
  flex: 1;
}

.diagnostic-list {
  display: grid;
  gap: 14px;
}

.diagnostic-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.diagnostic-card-head {
  display: grid;
  gap: 6px;
}

.diagnostic-card > strong {
  font-size: 15px;
  line-height: 1.35;
}

.diagnostic-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.diagnostic-multi-copy {
  font-size: 12px;
  color: var(--ink-soft);
}

.diagnostic-count {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 109, 103, 0.08);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}

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

.diagnostic-option {
  position: relative;
  min-height: 0;
  padding: 12px;
}

.diagnostic-option strong {
  font-size: 14px;
  line-height: 1.35;
}

.diagnostic-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.diagnostic-marker {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(24, 32, 38, 0.12);
  background: rgba(24, 32, 38, 0.03);
  color: transparent;
  font-size: 13px;
  font-weight: 800;
}

.diagnostic-option.active {
  border-color: rgba(15, 109, 103, 0.32);
  background: rgba(15, 109, 103, 0.06);
  box-shadow: inset 0 0 0 1px rgba(15, 109, 103, 0.08);
}

.diagnostic-option.active .diagnostic-marker {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.income-summary-panel {
  gap: 12px;
  padding: 18px 20px;
}

.income-summary-total {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.income-summary-panel p {
  margin: 0;
  font-size: 17px;
  color: var(--ink);
}

.income-summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  width: fit-content;
  max-width: 100%;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
}

.income-summary-note,
.income-rule-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
}

.income-rule-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.3;
  color: var(--ink);
}

.income-rule-card p,
.income-summary-note {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.income-form-panel {
  padding: 18px 20px;
}

.income-top-grid {
  margin-bottom: 14px;
  align-items: end;
}

.income-helper.wide {
  max-width: none;
}

.distribution-row {
  display: grid;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  grid-template-columns: minmax(260px, 1.3fr) 160px 160px 200px;
  align-items: center;
}

.distribution-row .stack-field {
  margin: 0;
}

.distribution-head {
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) 160px 160px 200px;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.distribution-meta {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}

.distribution-meta span {
  color: var(--ink-soft);
  font-size: 13px;
}

.distribution-result {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.distribution-topline {
  margin-bottom: 10px;
}

.distribution-actions {
  margin-bottom: 10px;
}

.distribution-footer {
  margin-top: 12px;
  justify-content: flex-end;
}

.distribution-result strong {
  font-size: 16px;
  line-height: 1.2;
}

.distribution-result span {
  color: var(--ink-soft);
  font-size: 12px;
}

.compact-field span {
  display: none;
}

.compact-field input,
.compact-field select {
  width: 100%;
  padding: 8px 10px;
  min-height: 40px;
}

.distribution-badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  font-weight: 600;
}

.distribution-badge-muted {
  color: var(--ink-soft);
  font-weight: 500;
}

.choice-card.active,
.template-card.active {
  background: var(--brand-soft);
  border-color: rgba(15, 109, 103, 0.32);
}

.compact-preview-grid .template-card {
  padding: 12px;
  min-height: 0;
}

.compact-preview-grid .template-card p {
  margin: 8px 0 0;
  line-height: 1.35;
  font-size: 14px;
}

.preview-state {
  font-weight: 700;
  color: var(--brand);
}

.preview-table-panel {
  padding: 12px;
}

.preview-table-wrap {
  overflow: auto;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
}

.preview-table th,
.preview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #F0F0F0;
  text-align: left;
  vertical-align: top;
}

.preview-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.preview-table th small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: normal;
}

.preview-row-label {
  display: grid;
  gap: 3px;
}

.preview-row-label span {
  font-size: 12px;
  color: var(--ink-soft);
}

.choice-card input {
  display: none;
}

.plan-category-toggle {
  display: grid;
  gap: 6px;
}

.plan-category-toggle.is-compact {
  padding: 14px 16px;
}

.stack-field {
  display: grid;
  gap: 8px;
}

.stack-field span {
  font-size: 13px;
  font-weight: 700;
}

.stack-field input,
.stack-field select,
.search-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #FFFFFF;
}

.stack-field input:focus,
.stack-field select:focus,
.search-input:focus {
  outline: none;
  border-color: #1A1A1A;
  box-shadow: 0 0 0 2px #F5F5F3;
}

.btn,
.chip-btn,
.field-chip,
.save-state,
.status-chip {
  border-radius: 8px;
}

.btn,
.chip-btn {
  border: 1px solid #EBEBEB;
  background: #FFFFFF;
  padding: 10px 15px;
  cursor: pointer;
  box-shadow: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn:hover,
.chip-btn:hover {
  transform: none;
  box-shadow: none;
  background: #F5F5F3;
}

.btn-primary {
  background: #1A1A1A;
  border-color: #1A1A1A;
  color: #fff;
  box-shadow: none;
}

.btn-primary:hover {
  background: #333333;
  border-color: #333333;
}

.btn-ghost {
  background: transparent;
  border: 1px solid #EBEBEB;
  color: #555555;
}

.btn-ghost:hover {
  background: #F5F5F3;
}

.btn.small {
  padding: 8px 10px;
}

.chip-group {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 14px;
  background: #F5F5F3;
}

.chip-btn.active {
  background: var(--panel);
}

.field-chip,
.save-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #FFFFFF;
  border: 1px solid #EBEBEB;
}

.header-meta {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.available-now-card {
  display: grid;
  gap: 4px;
  min-width: 290px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid #EBEBEB;
  background: #FFFFFF;
  box-shadow: 0 14px 28px rgba(24, 28, 38, 0.06);
}

.available-now-card span {
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.available-now-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.available-now-label .help-dot {
  width: 16px;
  height: 16px;
  font-size: 10px;
}

.available-now-card strong {
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.header-income-btn {
  white-space: nowrap;
}

.field-chip select {
  border: 0;
  background: transparent;
}

.save-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
}

.rail-save-state {
  margin-top: 10px;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #999999;
  box-shadow: none;
}

.rail-save-state .save-dot {
  background: #BBBBBB;
  opacity: 1;
}

.rail-save-state #save-copy {
  font-size: 12px;
  line-height: 1;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  gap: 22px;
  padding: 22px;
  transition: grid-template-columns 180ms ease;
}

.app-shell.app-locked {
  filter: blur(1px);
  pointer-events: none;
  user-select: none;
}

.app-shell.rail-collapsed {
  grid-template-columns: 84px minmax(0, 1fr);
}

.rail {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: calc(100vh - 44px);
  padding: 20px 12px;
  border: none;
  border-right: 1px solid #EBEBEB;
  border-radius: 0;
  background: #FFFFFF;
  color: #1A1A1A;
  box-shadow: none;
  overflow: hidden;
  transition: padding 180ms ease;
}

.rail::before {
  display: none;
}

.rail-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 24px;
  padding: 8px 12px;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  position: relative;
  z-index: 1;
}

.rail-brand-copy {
  min-width: 0;
}

.rail-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #1A1A1A;
}

.rail-title-compact {
  display: none;
}

.rail-nav {
  display: grid;
  gap: 2px;
  position: relative;
  z-index: 1;
  min-height: 0;
}

.rail-link {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  margin: 0 4px;
  cursor: pointer;
  color: #999999;
  font-size: 13px;
  font-weight: 400;
  transition: background 120ms ease, color 120ms ease;
}

.rail-link-label {
  display: block;
  font-weight: 400;
}

.rail-link-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 0;
  background: transparent;
  font-size: 15px;
  line-height: 1;
  box-shadow: none;
}

.rail-link.active {
  background: #F5F5F3;
  border: none;
  color: #1A1A1A;
  font-weight: 500;
  box-shadow: none;
}

.rail-link.active .rail-link-label {
  font-weight: 500;
}

.rail-link:hover {
  background: #F5F5F3;
  color: #555555;
  transform: none;
}

.app-shell.rail-collapsed .rail {
  padding: 18px 10px;
}

.app-shell.rail-collapsed .rail-link-label {
  display: none;
}

.app-shell.rail-collapsed .rail-brand {
  padding: 10px;
  align-items: center;
}

.app-shell.rail-collapsed .rail-title-full {
  display: none;
}

.app-shell.rail-collapsed .rail-title-compact {
  display: block;
  text-align: center;
}

.app-shell.rail-collapsed .rail-link {
  display: grid;
  place-items: center;
  padding: 12px;
  grid-template-columns: 1fr;
}

.workspace {
  min-width: 0;
  padding: 28px 30px 30px;
  border: none;
  border-radius: 0;
  background: #FAFAF8;
  box-shadow: none;
}

.workspace.is-home-screen {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 44px);
  padding: 18px 20px 16px;
  overflow: visible;
}

.workspace-header {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid #EBEBEB;
  align-items: flex-start;
}



.workspace-title {
  display: grid;
  gap: 5px;
}

.rail-toggle-icon {
  display: inline-grid;
  gap: 4px;
  width: 38px;
  padding: 8px 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  cursor: pointer;
  box-shadow: 0 8px 18px transparent;
}

.rail-toggle-icon--rail {
  width: 40px;
  background: #FFFFFF;
}

.app-shell.rail-collapsed .rail-toggle-icon--rail {
  align-self: center;
}

.rail-save-state {
  margin-top: auto;
  align-self: flex-start;
}

.app-shell.rail-collapsed .rail-save-state {
  display: none;
}

.rail-toggle-icon span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.workspace-title h1 {
  margin-top: 6px;
  font-size: 46px;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.workspace-title p {
  margin: 6px 0 0;
  max-width: 760px;
  line-height: 1.45;
  font-size: 15px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.workspace.is-home-screen .screen.active {
  flex: 1 1 auto;
  min-height: auto;
}

/* .home-screen base styles now in HOME SCREEN section at bottom */
.home-screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: auto;
  min-height: auto;
}

.home-check-item span,
.home-health-card small,
.home-waiting-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.35;
}

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

.home-health-grid.compact {
  align-self: stretch;
}

.home-compact-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid #EBEBEB;
  background: #FFFFFF;
  box-shadow: 0 6px 14px rgba(24, 28, 38, 0.025);
}

.home-compact-main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  flex: 1;
  min-width: 0;
  align-items: start;
}

.home-compact-item,
.home-compact-meta {
  display: grid;
  gap: 3px;
}

.home-compact-item span,
.home-compact-meta span {
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-compact-item strong,
.home-compact-meta strong {
  font-size: 14px;
  line-height: 1.15;
}

.home-compact-meta strong {
  font-size: 13px;
}

.home-compact-item small {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.2;
}

.home-compact-meta small {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.25;
}

.home-compact-status strong {
  font-size: 13px;
}

.home-compact-side {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: auto;
}

.home-compact-side .btn {
  padding: 8px 12px;
}

.home-success-banner {
  margin-top: 8px;
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.streak-copy {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.home-success-banner--complete {
  display: flex;
  align-items: center;
  gap: 14px;
}

.success-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(15, 109, 103, 0.08);
  font-size: 28px;
}

.home-success-banner p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  line-height: 1.4;
}

.home-question-card {
  display: grid;
  gap: 10px;
}

.home-question-card strong {
  font-size: 18px;
  line-height: 1.3;
}

.home-health-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #EBEBEB;
  background: rgba(255, 255, 255, 0.85);
}

.home-health-card span {
  font-size: 11px;
  color: var(--ink-soft);
}

.home-health-card strong,
.home-success {
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  gap: 10px;
  align-items: start;
}

.home-grid.is-secondary {
  grid-template-columns: 1fr;
}

.home-panel {
  display: grid;
  gap: 10px;
}

.home-panel.is-muted {
  background: #FFFFFF;
}

.home-checklist,
.home-balance-list {
  display: grid;
  gap: 12px;
}

.home-action-sheet {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: 0 12px 26px rgba(24, 28, 38, 0.04);
}

.home-action-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-action-topline strong {
  font-size: 14px;
  line-height: 1.2;
}

.home-action-topline .status-chip {
  padding: 6px 9px;
  font-size: 12px;
}

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

.budget-summary-item {
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(24, 32, 38, 0.04);
}

.budget-summary-item span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.budget-summary-item strong {
  display: block;
  font-size: 17px;
  line-height: 1.1;
}

.budget-summary-item.is-danger strong {
  color: #c04d38;
}

.budget-summary-item.is-good strong {
  color: var(--good);
}

.budget-validation-banner {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(192, 77, 56, 0.18);
  background: rgba(192, 77, 56, 0.08);
  color: #8f3a2c;
  font-size: 13px;
  line-height: 1.35;
}

.budget-validation-banner.is-hidden {
  display: none;
}

.salary-plan-table {
  display: grid;
  gap: 4px;
}

.salary-plan-head,
.salary-plan-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(145px, 175px) minmax(185px, 220px);
  gap: 4px;
  align-items: stretch;
}

.salary-plan-col,
.salary-plan-cell {
  min-width: 0;
}

.salary-plan-col {
  padding: 5px 7px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.salary-plan-col-transfer,
.salary-plan-cell-transfer {
  background: rgba(31, 147, 96, 0.1);
}

.salary-plan-col-balance,
.salary-plan-cell-balance {
  background: #F5F5F3;
}

.salary-plan-section-title {
  margin-top: 2px;
  padding: 0 2px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.salary-plan-row {
  border-radius: 8px;
}

.salary-plan-cell {
  padding: 6px 7px;
  border-radius: 8px;
  border: 1px solid #F0F0F0;
  background: rgba(255, 255, 255, 0.9);
}

.salary-plan-cell-category {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.salary-plan-cell-category strong {
  font-size: 14px;
  line-height: 1.15;
}

.salary-plan-cell-category span {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.1;
}

.salary-plan-cell-transfer,
.salary-plan-cell-balance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.salary-plan-amount {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.salary-plan-check {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.salary-plan-check input {
  width: 14px;
  height: 14px;
}

.salary-plan-balance input {
  width: 100%;
  min-width: 0;
  padding: 5px 6px;
  border-radius: 8px;
  border: 1px solid #E0E0E0;
  background: #fff;
  font-size: 13px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

.salary-plan-balance input::-webkit-outer-spin-button,
.salary-plan-balance input::-webkit-inner-spin-button,
#editor-plan-input::-webkit-outer-spin-button,
#editor-plan-input::-webkit-inner-spin-button,
#editor-fact-input::-webkit-outer-spin-button,
#editor-fact-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#editor-plan-input,
#editor-fact-input {
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

.salary-plan-cell-balance.is-inactive {
  visibility: hidden;
}

.salary-plan-check-wrap {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.salary-plan-check-label {
  font-size: 10px;
  line-height: 1;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-check-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #FAFAF8;
}

.home-check-item input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.home-check-item strong,
.home-waiting-card strong {
  display: block;
  margin-bottom: 0;
  font-size: 13px;
}

.home-success {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(31, 147, 96, 0.08);
  color: var(--good);
  border: 1px solid rgba(31, 147, 96, 0.14);
  display: none;
}

.home-success.is-visible {
  display: block;
}

.home-waiting-card {
  padding: 10px 12px;
  border-radius: 12px;
  background: #FAFAF8;
  border: 1px solid rgba(22, 28, 38, 0.06);
}

.home-waiting-card p {
  margin-top: 6px;
}

.table-toolbar {
  margin-bottom: 10px;
  align-items: flex-start;
}

.toolbar-main,
.toolbar-actions {
  flex-wrap: wrap;
}

.toolbar-actions {
  justify-content: flex-end;
}

.table-status {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.health-strip {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(200px, 260px) minmax(0, 1fr) minmax(240px, 320px);
  gap: 12px;
  align-items: stretch;
  width: 100%;
}

.health-level,
.health-progress,
.next-step-card,
.milestone-inline {
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(24, 32, 38, 0.07);
  background: #FFFFFF;
  box-shadow: 0 12px 30px rgba(23, 26, 33, 0.05);
}

.health-level {
  display: grid;
  gap: 4px;
}

.health-level small,
.health-progress small,
.next-step-card small,
.milestone-inline small {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.health-level strong {
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.health-progress {
  display: grid;
  gap: 8px;
  align-content: start;
}

.health-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #F0F0F0;
  overflow: hidden;
}

.health-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f6d67 0%, #74b5ae 100%);
}

.health-indicators {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.indicator-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(24, 32, 38, 0.035);
  border: 1px solid #F5F5F3;
}

.indicator-label {
  min-width: 0;
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.indicator-value {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.indicator-good {
  color: var(--good);
}

.indicator-warn {
  color: var(--warn);
}

.indicator-muted {
  color: var(--ink-soft);
}

.next-step-card {
  display: grid;
  gap: 6px;
  align-content: start;
}

.next-step-card strong {
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.milestone-inline {
  display: grid;
  gap: 10px;
  align-content: start;
}

.unlock-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.unlock-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 109, 103, 0.08);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.status-chip {
  padding: 7px 10px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  font-size: 13px;
}

.good {
  color: var(--good);
}

.danger {
  color: var(--warn);
}

.muted {
  color: #98a2aa;
}

.table-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0;
  gap: 14px;
  align-items: start;
}

.table-layout.has-detail {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.grid-frame,
.inspector {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-md);
}

.grid-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.grid-caption strong {
  font-size: 13px;
}

.table-wrap {
  max-height: calc(100vh - 230px);
  overflow-x: auto;
  overflow-y: auto;
  position: relative;
  border-radius: 26px;
}

.budget-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

.budget-table th,
.budget-table td {
  position: relative;
  padding: 6px 8px;
  max-width: 220px;
  white-space: nowrap;
  border-bottom: 1px solid #F5F5F3;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.budget-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(248, 248, 252, 0.98);
  border-bottom: 1px solid var(--line-strong);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.budget-table thead th small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: normal;
  text-transform: none;
}

.budget-table th:first-child,
.budget-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 380px;
  min-width: 380px;
  max-width: 380px;
  background: var(--surface);
  border-right: 1px solid #F5F5F3;
  background-clip: padding-box;
  box-shadow: 14px 0 18px -16px rgba(21, 24, 33, 0.28);
  overflow: hidden;
}

.budget-table thead th:first-child {
  z-index: 4;
}

.budget-table th:nth-child(2),
.budget-table td:nth-child(2) {
  width: 190px;
  min-width: 190px;
  max-width: 190px;
}

.budget-table th:nth-child(3),
.budget-table td:nth-child(3),
.budget-table th:nth-child(4),
.budget-table td:nth-child(4),
.budget-table th:nth-child(5),
.budget-table td:nth-child(5) {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  position: static;
  z-index: auto;
}

.budget-table thead th.period-past,
.budget-table td.period-past {
  background: rgba(31, 147, 96, 0.1);
}

.budget-table thead th.period-next,
.budget-table td.period-next {
  background: rgba(144, 197, 255, 0.18);
}

.budget-table thead th.period-today,
.budget-table td.period-today {
  background: rgba(91, 133, 255, 0.22);
}

.budget-table thead th.period-future,
.budget-table td.period-future {
  background: rgba(21, 24, 33, 0.045);
}

.budget-table thead th.is-overloaded {
  background: rgba(176, 102, 68, 0.12);
}

.group-row td {
  font-weight: 700;
  background: rgba(246, 247, 251, 0.98);
  border-top: 1px solid var(--line-strong);
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.group-row td:first-child {
  background: rgba(246, 247, 251, 0.98);
  z-index: 3;
}

.total-row td {
  background: rgba(15, 109, 103, 0.04);
  font-weight: 700;
}

.total-row td:first-child {
  background: rgba(15, 109, 103, 0.04);
}

.table-row {
  cursor: pointer;
}

.table-row:hover td {
  background: rgba(24, 32, 38, 0.02);
}

.table-row:hover td:first-child {
  background: rgba(24, 32, 38, 0.02);
}

.table-row.is-selected td {
  background: rgba(15, 109, 103, 0.05);
}

.table-row.is-selected td:first-child {
  background: rgba(15, 109, 103, 0.05);
}

.child-row td {
  color: var(--ink-soft);
  background: rgba(24, 32, 38, 0.02);
}

.child-row td:first-child {
  background: rgba(24, 32, 38, 0.02);
}

.row-label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.row-label-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.row-name {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-subcopy {
  font-size: 10px;
  color: var(--ink-soft);
  line-height: 1.2;
  white-space: normal;
}

.row-add-btn {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(77, 95, 138, 0.08);
  color: #4e6087;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.row-indent {
  width: 24px;
  height: 1px;
  display: block;
}

.row-label.child .row-name {
  font-weight: 600;
}

.row-label.child {
  grid-template-columns: 18px minmax(0, 1fr);
}

.row-cell {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  overflow: hidden;
  background: inherit;
}

.cell-value {
  display: block;
  width: 100%;
  min-width: 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-value-muted {
  color: var(--ink-soft);
}

.period-head-label {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  color: var(--ink);
  text-transform: none;
  letter-spacing: normal;
}

.is-selected-col {
  box-shadow: inset 0 0 0 1px rgba(46, 89, 201, 0.14);
}

.period-cell,
.summary-cell {
  display: grid;
  gap: 4px;
}

.period-cell small,
.summary-cell small {
  font-size: 10px;
  color: var(--ink-soft);
  line-height: 1.2;
}

.period-cell.is-done .cell-value {
  color: var(--good);
  font-weight: 700;
}

.period-cell.is-current {
  padding: 2px 0;
}

.summary-cell strong {
  font-size: 13px;
}

.year-plan-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  flex-wrap: nowrap;
  overflow-x: auto;
}

.year-plan-current,
.year-plan-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}

.year-plan-inline-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: fit-content;
  flex: 0 0 auto;
  white-space: nowrap;
}

.year-plan-help-dot {
  flex: 0 0 auto;
}

.year-plan-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 0 2px;
}

.year-plan-footer-actions.is-table-mode {
  padding-top: 14px;
}

.year-plan-actions {
  justify-content: flex-end;
  flex: 0 0 auto;
  white-space: nowrap;
}

.year-plan-actions .btn {
  padding: 8px 12px;
}

.year-plan-help-dot.is-bottom::after {
  left: 50%;
  right: auto;
  bottom: calc(100% + 8px);
  width: min(280px, calc(100vw - 32px));
  transform: translateX(-50%) translateY(4px);
}

.year-plan-help-dot.is-bottom::before {
  left: 50%;
  right: auto;
  bottom: calc(100% + 2px);
  transform: translateX(-50%) rotate(45deg);
}

.year-plan-help-dot.is-bottom:hover::after,
.year-plan-help-dot.is-bottom:hover::before,
.year-plan-help-dot.is-bottom:focus-visible::after,
.year-plan-help-dot.is-bottom:focus-visible::before {
  transform: translateX(-50%) translateY(0);
}

.year-plan-nav-compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.year-plan-selected-period {
  min-width: 76px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
  padding: 0 4px;
}

.year-period-pill {
  flex: 0 0 auto;
  display: grid;
  gap: 2px;
  min-width: 64px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid #F0F0F0;
  background: rgba(248, 248, 252, 0.72);
  color: #607084;
  cursor: pointer;
  text-align: left;
}

.year-period-pill small {
  font-size: 9px;
  color: var(--ink-soft);
}

.year-period-pill.is-selected {
  border-color: rgba(54, 87, 170, 0.28);
  background: rgba(54, 87, 170, 0.07);
  color: var(--ink);
}

.year-period-pill.is-current {
  background: rgba(54, 87, 170, 0.09);
}

.year-period-pill.is-next {
  background: rgba(33, 107, 104, 0.07);
}

.inspector {
  display: none;
  padding: 16px;
}

.inspector.is-open {
  display: block;
}

.inspector h2 {
  margin-top: 8px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.inspector p {
  line-height: 1.45;
}

.detail-meta {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.table-wrap.is-overview-wrap {
  max-height: none;
  overflow-x: hidden;
  overflow-y: visible;
  padding: 8px 0 0;
  background: transparent;
}

.table-wrap.is-overview-wrap {
  border-radius: 0;
}

.table-wrap.is-overview-wrap,
.table-wrap.is-overview-wrap + .budget-table {
  box-shadow: none;
}

.grid-frame:has(.table-wrap.is-overview-wrap) {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.year-plan-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
  gap: 16px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.year-plan-panel-main,
.year-plan-panel-side,
.year-plan-panel-assets {
  min-width: 0;
  width: 100%;
}

.year-plan-panel-assets {
  grid-column: 1 / -1;
}

.year-plan-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #F0F0F0;
  box-shadow: var(--shadow-md);
}

.year-plan-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.year-plan-panel-head > div {
  min-width: 0;
}

.year-plan-panel-head .btn {
  flex: 0 0 auto;
  max-width: 220px;
  white-space: normal;
}

.year-plan-panel-head.is-compact strong {
  font-size: 18px;
}

.year-plan-panel-head strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.year-plan-muted {
  display: block;
  margin-top: 6px;
  max-width: 54ch;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.year-plan-group-stack,
.year-plan-category-list,
.year-plan-table-body,
.year-plan-legend {
  display: grid;
  gap: 8px;
}

.year-plan-group-card,
.year-plan-visual-card,
.year-plan-side-footer,
.year-plan-table-shell {
  padding: 14px;
  border-radius: 20px;
  background: #FAFAF8;
  border: 1px solid rgba(23, 26, 36, 0.05);
}

.year-plan-group-head,
.year-plan-side-footer,
.year-plan-legend-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.year-plan-group-head span,
.year-plan-group-head small,
.year-plan-category-head small,
.year-plan-side-footer small,
.year-plan-donut-center small,
.year-plan-legend-meta small,
.year-plan-income-meta span {
  color: var(--ink-soft);
}

.year-plan-category-list {
  margin-top: 12px;
}

.year-plan-table-shell {
  display: grid;
  gap: 8px;
  min-width: 0;
  overflow: visible;
  padding: 10px 10px 12px;
}

.year-plan-table-footer {
  display: flex;
  justify-content: flex-end;
  padding: 8px 6px 0;
}

.year-plan-table-footer .btn {
  width: fit-content;
}

.year-plan-table-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 8px 10px;
  border-bottom: 1px solid #F0F0F0;
}

.year-plan-table-summary-copy {
  display: grid;
  gap: 2px;
}

.year-plan-table-summary-copy span,
.year-plan-table-summary-item small {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.year-plan-table-summary-copy strong {
  font-size: 22px;
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.year-plan-table-summary-copy small {
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-soft);
}

.year-plan-table-head,
.year-plan-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.78fr) repeat(var(--year-plan-payout-count, 2), minmax(0, 0.8fr));
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.year-plan-table-head > div,
.year-plan-table-row > div {
  min-width: 0;
  overflow: hidden;
}

.year-plan-table-head {
  padding: 2px 6px 10px;
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-items: start;
}

.year-plan-table-head small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  text-transform: none;
  letter-spacing: normal;
}

.year-plan-table-group + .year-plan-table-group {
  margin-top: 2px;
}

.year-plan-group-head {
  padding: 2px 8px 6px;
}

.year-plan-group-head strong {
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.year-plan-group-head small {
  font-size: 12px;
  line-height: 1.35;
}

.year-plan-table-row {
  padding: 9px 6px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1px solid rgba(23, 26, 36, 0.05);
}

.year-plan-table-row.is-pocket {
  background: rgba(246, 248, 251, 0.96);
  border-style: dashed;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.year-plan-table-row.is-income {
  background: rgba(238, 244, 247, 0.92);
}

.year-plan-table-row.is-pocket .year-plan-value-static {
  color: var(--ink);
}

.year-plan-table-category strong,
.year-plan-value-btn strong {
  font-size: 13px;
  line-height: 1.24;
  letter-spacing: -0.01em;
  font-weight: 600;
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.year-plan-table-category small,
.year-plan-breakdown-row span {
  color: var(--ink-soft);
  font-size: 12px;
}

.year-plan-table-category {
  min-width: 0;
}

.year-plan-table-value {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.year-plan-value-static {
  color: rgba(31, 41, 55, 0.68);
  font-size: 13px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.year-plan-value-strong {
  color: var(--ink);
  font-weight: 600;
}

.year-plan-basket-switch,
.year-plan-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.year-plan-basket-switch {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.year-plan-basket-switch::-webkit-scrollbar {
  display: none;
}

.year-plan-basket-tab {
  border: 1px solid #EBEBEB;
  background: rgba(248, 248, 252, 0.84);
  border-radius: 16px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.year-plan-basket-tab span {
  font-size: 13px;
  color: var(--ink-soft);
}

.year-plan-basket-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  text-align: left;
}

.year-plan-basket-tab.is-active {
  background: rgba(24, 62, 94, 0.08);
  border-color: rgba(24, 62, 94, 0.18);
}

.year-plan-visual-card {
  display: grid;
  gap: 14px;
}

.year-plan-breakdown {
  display: grid;
  gap: 10px;
}

.year-plan-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1px solid rgba(23, 26, 36, 0.05);
}

.year-plan-visual-total {
  font-size: 20px;
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.year-plan-visual-top {
  display: block;
}

.year-plan-donut {
  width: min(210px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 4px;
  border-radius: 50%;
  position: relative;
}

.year-plan-donut::after {
  content: "";
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
}

.year-plan-donut-center {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  gap: 3px;
  text-align: center;
  padding: 36px;
}

.year-plan-donut-center span {
  max-width: 110px;
  margin: 0 auto;
  font-size: 11px;
  line-height: 1.22;
  color: var(--ink-soft);
}

.year-plan-donut-center strong {
  font-size: 20px;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.year-plan-donut-center small {
  font-size: 11px;
  line-height: 1.2;
  color: var(--ink-soft);
}

.year-plan-breakdown-row strong {
  font-size: 13px;
  font-weight: 600;
}

.year-plan-legend-row {
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(23, 26, 36, 0.05);
}

.year-plan-legend-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.year-plan-legend-main,
.year-plan-legend-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.year-plan-legend-meta {
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.year-plan-legend-footnote {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.year-plan-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.year-plan-column-head {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}

.year-plan-column-head span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.year-plan-column-head-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.year-plan-column-head-actions .btn.small {
  width: 100%;
  min-width: 0;
  justify-content: center;
  padding: 7px 8px;
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.year-plan-column-error {
  min-height: 16px;
  color: #9b5538;
  font-size: 11px;
  line-height: 1.28;
  text-transform: none;
  letter-spacing: normal;
}

.year-plan-value-input {
  width: 100%;
  max-width: 112px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #EBEBEB;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.year-plan-value-input:focus {
  outline: none;
  border-color: rgba(24, 62, 94, 0.26);
  box-shadow: 0 0 0 3px rgba(24, 62, 94, 0.08);
}

.year-plan-value-input.has-error {
  border-color: rgba(176, 102, 68, 0.35);
  box-shadow: 0 0 0 3px rgba(176, 102, 68, 0.08);
}

.year-plan-category-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  position: relative;
  overflow: visible;
}

.year-plan-pocket-help {
  width: 18px;
  height: 18px;
  font-size: 11px;
  position: relative;
  z-index: 3;
}

.year-plan-pocket-help::after {
  left: 50%;
  right: auto;
  bottom: calc(100% + 8px);
  width: min(240px, calc(100vw - 48px));
  transform: translateX(-50%) translateY(4px);
  z-index: 60;
}

.year-plan-pocket-help::before {
  left: 50%;
  right: auto;
  bottom: calc(100% + 2px);
  transform: translateX(-50%) rotate(45deg);
  z-index: 59;
}

.year-plan-capital-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.year-plan-capital-item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(248, 249, 252, 0.92);
  border: 1px solid #F0F0F0;
}

.year-plan-capital-item span {
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-soft);
}

.year-plan-capital-item strong {
  font-size: 22px;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.year-plan-assets-summary {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #FAFAF8;
  border: 1px solid rgba(23, 26, 36, 0.05);
}

.year-plan-assets-summary span {
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.year-plan-assets-summary strong {
  font-size: 20px;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.year-plan-assets-list {
  display: grid;
  gap: 8px;
}

.year-plan-asset-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: #FAFAF8;
  border: 1px solid rgba(23, 26, 36, 0.05);
}

.year-plan-asset-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.year-plan-asset-main,
.year-plan-asset-meta {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.year-plan-asset-main strong,
.year-plan-asset-meta strong {
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.year-plan-asset-main span {
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.year-plan-asset-meta {
  justify-items: end;
}

.year-plan-asset-actions {
  display: flex;
  gap: 8px;
}

.year-plan-asset-actions .btn {
  min-height: 42px;
  padding: 0 18px;
  font-size: 15px;
}

/* ── Asset savings goal ── */
.asset-goal-add-link {
  all: unset;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-muted);
  padding: 2px 0;
}
.asset-goal-add-link:hover { color: var(--ink); text-decoration: underline; }

.asset-goal-view { display: flex; flex-direction: column; gap: 6px; }
.asset-goal-track {
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.asset-goal-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}
.asset-goal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}
.asset-goal-actions { display: flex; gap: 4px; }
.asset-goal-icon-btn {
  all: unset;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-muted);
  padding: 2px 5px;
  border-radius: 4px;
}
.asset-goal-icon-btn:hover { background: var(--line-soft); color: var(--ink); }

.asset-goal-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.asset-goal-input {
  flex: 1;
  min-width: 100px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
}
.asset-goal-input:focus {
  outline: none;
  border-color: var(--ink);
}
.asset-goal-edit .btn.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.year-plan-color-dot.color-1 { background: #183e5e; }
.year-plan-color-dot.color-2 { background: #2e5f86; }
.year-plan-color-dot.color-3 { background: #4d86a8; }
.year-plan-color-dot.color-4 { background: #73a5be; }
.year-plan-color-dot.color-5 { background: #9bc4cf; }
.year-plan-color-dot.color-6 { background: #bfdce0; }

.year-overview-workspace,
.history-grid,
.period-group-stack,
.period-category-list,
.history-period-list,
.history-category-list {
  display: grid;
  gap: 14px;
}

.year-overview-panel {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #F0F0F0;
}

.year-overview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.period-rail-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.year-overview-head strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.15;
}

.year-overview-muted {
  display: block;
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 12px;
}

.period-rail {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding-bottom: 2px;
}

.period-rail-item {
  flex: 0 0 auto;
  min-width: 96px;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid #F0F0F0;
  background: rgba(248, 248, 252, 0.9);
  cursor: pointer;
  text-align: left;
}

.period-rail-item span {
  font-weight: 700;
}

.period-rail-item small {
  font-size: 11px;
  color: var(--ink-soft);
}

.period-rail-item.is-selected {
  border-color: rgba(54, 87, 170, 0.24);
  background: rgba(54, 87, 170, 0.08);
}

.period-rail-item.is-done {
  background: rgba(31, 147, 96, 0.08);
}

.period-rail-item.is-deviation {
  background: rgba(176, 102, 68, 0.1);
}

.period-rail-item.is-current {
  background: rgba(54, 87, 170, 0.1);
}

.period-rail-item.is-planned {
  background: rgba(15, 109, 103, 0.07);
}

.period-group-card {
  padding: 14px;
  border-radius: 18px;
  background: #FAFAF8;
  border: 1px solid rgba(23, 26, 36, 0.05);
}

.period-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.period-group-head span {
  color: var(--ink-soft);
  font-size: 12px;
}

.period-category-row,
.history-period-card,
.history-category-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto 120px auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(23, 26, 36, 0.05);
}

.period-category-row:first-child,
.history-period-card:first-child,
.history-category-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.period-category-main,
.period-category-current,
.history-period-metric {
  display: grid;
  gap: 4px;
}

.period-category-main small,
.period-category-current small,
.history-period-metric span,
.history-category-row small {
  color: var(--ink-soft);
  font-size: 11px;
}

.period-category-current {
  min-width: 120px;
  justify-items: end;
  text-align: right;
}

.period-category-trend,
.history-category-trend {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 44px;
}

.trend-bar {
  width: 10px;
  border-radius: 999px 999px 4px 4px;
  background: rgba(54, 87, 170, 0.22);
}

.trend-bar.is-current {
  background: rgba(15, 109, 103, 0.7);
}

.period-category-actions {
  display: inline-flex;
  gap: 8px;
}

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

.history-period-card {
  grid-template-columns: minmax(0, 1fr) repeat(3, minmax(90px, auto));
}

.history-period-metric {
  justify-items: end;
  text-align: right;
}

.history-period-metric.is-negative strong {
  color: var(--warn);
}

.history-category-row {
  grid-template-columns: minmax(0, 1fr) 140px;
}

.detail-item,
.detail-hint,
.setting-row,
.mapping-item,
.comparison-card,
.stat-card {
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(24, 32, 38, 0.04);
}

.detail-hint.wide {
  grid-column: span 2;
}

.comparison-card p {
  line-height: 1.45;
}

.detail-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--ink-soft);
}

.detail-label-with-help {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}

.help-dot {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.help-dot::after {
  content: attr(data-tooltip);
  position: absolute;
  right: -8px;
  bottom: calc(100% + 10px);
  width: 220px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(24, 32, 38, 0.96);
  color: #fff;
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  box-shadow: 0 10px 20px rgba(24, 32, 38, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 30;
}

.help-dot::before {
  content: "";
  position: absolute;
  right: 3px;
  bottom: calc(100% + 4px);
  width: 8px;
  height: 8px;
  background: rgba(24, 32, 38, 0.96);
  transform: rotate(45deg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 29;
}

.help-dot:hover::after,
.help-dot:hover::before,
.help-dot:focus-visible::after,
.help-dot:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}

.mini-chart {
  min-height: 120px;
  display: flex;
  align-items: end;
  gap: 6px;
  margin-bottom: 14px;
}

.mini-bar {
  flex: 1;
  min-width: 14px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #0f6d67, #7fb8b1);
}

.mini-bar.active {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
}

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

.detail-actions {
  margin-top: 14px;
}

.analytics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (min-width: 1280px) {
  .analytics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analytics-panel-wide { grid-column: span 3; }
}

.analytics-panel {
  display: grid;
  gap: 18px;
  align-content: start;
}

.analytics-panel-wide {
  grid-column: span 2;
}

.health-shell {
  display: grid;
  gap: 28px;
}

.health-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #F0F0F0;
}

.health-tab {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #63727c;
  font: inherit;
  cursor: pointer;
}

.health-tab.is-active {
  background: #F5F5F3;
  border-color: #F0F0F0;
  color: #182026;
}

.health-content,
.health-section,
.health-card-stack,
.health-progress-meta,
.health-trend-list,
.health-point-list,
.health-factor-list {
  display: grid;
  gap: 16px;
}

.health-hero,
.health-action,
.health-progress-shell,
.health-progress-grid,
.health-split {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
}

.health-hero-copy h2,
.health-section h3,
.health-action-copy h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

.health-hero-copy h2 {
  font-size: 40px;
  line-height: 0.96;
}

.health-section h3,
.health-action-copy h3 {
  font-size: 28px;
  line-height: 1;
}

.health-hero-copy p,
.health-action-copy p,
.health-progress-summary p,
.health-compact-card small,
.health-factor-main p,
.health-factor-meta small {
  margin: 0;
  color: #56656f;
  line-height: 1.45;
}

.health-index-card,
.health-action-effect,
.health-progress-summary,
.health-factor-row,
.health-column,
.health-compact-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(24, 32, 38, 0.07);
}

.health-hero-copy,
.health-factor-row,
.health-column,
.health-progress-shell,
.health-compact-card {
  background: rgba(248, 249, 252, 0.9);
}

.health-index-card,
.health-action-effect {
  background: linear-gradient(180deg, rgba(234, 242, 240, 0.98) 0%, rgba(225, 236, 233, 0.96) 100%);
}

.health-index-card span,
.health-action-effect span,
.health-compact-card span,
.health-factor-meta span {
  font-size: 13px;
  color: #66757f;
}

.health-index-card strong {
  display: block;
  margin-top: 8px;
  font-size: 52px;
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.health-index-card small {
  display: block;
  margin-top: 8px;
  color: #56656f;
}

.health-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.health-factor-row {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.75fr);
  align-items: start;
}

.health-factor-top,
.health-trend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.health-factor-top strong,
.health-progress-summary strong,
.health-action-effect strong,
.health-compact-card strong {
  font-size: 22px;
  line-height: 1.1;
}

.health-factor-score {
  padding: 6px 10px;
  border-radius: 999px;
  background: #F5F5F3;
  font-size: 13px;
}

.health-factor-score.tone-good {
  background: rgba(15, 109, 103, 0.11);
  color: #0f6d67;
}

.health-factor-score.tone-warn {
  background: rgba(176, 123, 47, 0.14);
  color: #9a6925;
}

.health-factor-score.tone-muted {
  background: rgba(109, 122, 132, 0.12);
  color: #5e6a73;
}

.health-point {
  padding: 14px 15px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid #F5F5F3;
}

.health-progress-shell,
.health-progress-grid {
  background: #FAFAF8;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid #F5F5F3;
}

.health-progress-chart {
  display: flex;
  align-items: end;
  gap: 14px;
  min-height: 210px;
}

.health-progress-chart.is-large {
  min-height: 260px;
}

.health-bar-col {
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.health-bar-track {
  display: flex;
  align-items: end;
  justify-content: center;
  width: 100%;
  min-height: 160px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(24, 32, 38, 0.04) 0%, #F0F0F0 100%);
  padding: 12px;
}

.health-bar-track span {
  display: block;
  width: 100%;
  border-radius: 14px;
  background: linear-gradient(180deg, #183e5e 0%, #4f8fb7 100%);
}

.health-bar-col strong {
  font-size: 20px;
  line-height: 1;
}

.health-bar-col small {
  color: #6b7983;
  font-size: 12px;
}

.health-trend-row {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid #F5F5F3;
}

.scorecard-shell {
  display: grid;
  gap: 18px;
}

.scorecard-main,
.scorecard-secondary {
  display: grid;
  gap: 18px;
}

.scorecard-main {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.95fr);
}

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

.scorecard-rating,
.scorecard-factors,
.scorecard-compare,
.scorecard-trend {
  padding: 24px;
  border-radius: 26px;
  border: 1px solid rgba(24, 32, 38, 0.07);
}

.scorecard-rating {
  background: linear-gradient(180deg, rgba(250, 247, 241, 0.98) 0%, rgba(244, 240, 231, 0.95) 100%);
}

.scorecard-factors,
.scorecard-compare,
.scorecard-trend {
  background: rgba(248, 249, 252, 0.94);
}

.scorecard-value {
  font-size: 84px;
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.scorecard-rating-row,
.scorecard-baseline,
.scorecard-factor-row,
.scorecard-trend-footer,
.scorecard-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.scorecard-baseline {
  margin-top: 10px;
  align-items: baseline;
}

.scorecard-baseline span,
.scorecard-side-head small,
.scorecard-trend-point small {
  color: #66757f;
  font-size: 13px;
}

.scorecard-copy {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  max-width: 560px;
}

.scorecard-copy strong,
.scorecard-side-head strong,
.scorecard-factor-main strong,
.scorecard-trend-point strong {
  font-size: 22px;
  line-height: 1.1;
}

.scorecard-copy p,
.scorecard-compare-item,
.scorecard-trend-footer span {
  margin: 0;
  color: #56656f;
  line-height: 1.45;
}

.scorecard-factor-list,
.scorecard-compare-list,
.scorecard-trend-line {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.scorecard-factor-row,
.scorecard-compare-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid #F5F5F3;
}

.scorecard-compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.scorecard-compare-head span {
  font-size: 13px;
  color: #66757f;
}

.scorecard-compare-track {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  background: #F0F0F0;
  overflow: hidden;
}

.scorecard-compare-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #183e5e 0%, #4f8fb7 100%);
}

.scorecard-factor-main {
  display: grid;
  gap: 4px;
}

.scorecard-factor-main span {
  font-size: 13px;
  color: #66757f;
}

.scorecard-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(24, 32, 38, 0.07);
  font-size: 12px;
  text-transform: lowercase;
}

.scorecard-tag.tone-good {
  background: rgba(15, 109, 103, 0.11);
  color: #0f6d67;
}

.scorecard-tag.tone-warn {
  background: rgba(176, 123, 47, 0.14);
  color: #9a6925;
}

.scorecard-tag.tone-muted {
  background: rgba(109, 122, 132, 0.12);
  color: #5e6a73;
}

.scorecard-trend-line {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  min-height: 180px;
}

.scorecard-trend-point {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.scorecard-trend-bar {
  width: 100%;
  min-height: 120px;
  display: flex;
  align-items: end;
  padding: 10px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(24, 32, 38, 0.04) 0%, #F0F0F0 100%);
}

.scorecard-trend-bar span {
  display: block;
  width: 100%;
  border-radius: 12px;
  background: linear-gradient(180deg, #183e5e 0%, #4f8fb7 100%);
}

.finance-hub {
  display: grid;
  gap: 26px;
}

.finance-section {
  display: grid;
  gap: 16px;
}

.finance-kicker,
.finance-hero-fact span,
.finance-next-step span,
.finance-insight-lead span,
.finance-benchmark-panel span,
.finance-stage-card span,
.finance-action-column span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #66757f;
}

.finance-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.finance-section-head h3 {
  margin: 6px 0 0;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.finance-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.finance-hero-main,
.finance-hero-fact,
.finance-next-step,
.finance-insight-lead,
.finance-insight-mini,
.finance-benchmark-panel,
.finance-stage-card,
.finance-action-column,
.finance-footer-point {
  border-radius: 28px;
  border: 1px solid rgba(24, 32, 38, 0.07);
}

.finance-hero-main {
  padding: 30px;
  background: linear-gradient(180deg, rgba(250, 247, 241, 0.98) 0%, rgba(241, 236, 226, 0.95) 100%);
}

.finance-hero-score {
  margin-top: 10px;
  font-size: 104px;
  line-height: 0.88;
  letter-spacing: -0.09em;
}

.finance-hero-status {
  margin-top: 12px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.finance-hero-copy,
.finance-hero-summary p,
.finance-next-step p,
.finance-insight-lead p,
.finance-insight-mini p,
.finance-benchmark-panel p,
.finance-benchmark-panel small,
.finance-stage-card p,
.finance-action-column li,
.finance-footer-point p,
.finance-hero-fact small {
  margin: 0;
  color: #55636d;
  line-height: 1.5;
}

.finance-hero-copy {
  margin-top: 18px;
  max-width: 720px;
  font-size: 17px;
}

.finance-hero-summary {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(24, 32, 38, 0.09);
  display: grid;
  gap: 8px;
}

.finance-hero-summary strong {
  font-size: 32px;
  line-height: 1;
}

.finance-hero-side,
.finance-hero-facts,
.finance-insight-side,
.finance-footer-points {
  display: grid;
  gap: 14px;
}

.finance-hero-fact,
.finance-insight-mini,
.finance-benchmark-panel,
.finance-stage-card,
.finance-action-column,
.finance-footer-point {
  padding: 20px 22px;
  background: rgba(248, 249, 252, 0.94);
}

.finance-hero-fact strong,
.finance-next-step strong,
.finance-insight-mini strong,
.finance-benchmark-panel strong,
.finance-stage-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.08;
}

.finance-next-step {
  padding: 22px 24px;
  background: linear-gradient(180deg, rgba(228, 239, 236, 0.98) 0%, rgba(216, 232, 227, 0.95) 100%);
}

.finance-next-step strong {
  font-size: 28px;
}

.finance-insights {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 18px;
}

.finance-insight-lead {
  padding: 26px 28px;
  background: #FAFAF8;
}

.finance-insight-lead strong {
  display: block;
  margin-top: 10px;
  font-size: 38px;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.finance-insight-lead p {
  margin-top: 14px;
  font-size: 17px;
}

.finance-insight-lead small {
  display: block;
  margin-top: 18px;
  color: #5f6b74;
  line-height: 1.45;
}

.finance-benchmarks {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) repeat(2, minmax(280px, 0.92fr));
  gap: 16px;
}

.finance-benchmark-panel {
  display: grid;
  gap: 14px;
}

.finance-benchmark-panel strong {
  font-size: 30px;
}

.finance-threshold-track,
.finance-percentile-line {
  height: 12px;
  border-radius: 999px;
  background: #F0F0F0;
  overflow: hidden;
}

.finance-threshold-fill,
.finance-percentile-line span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #183e5e 0%, #4f8fb7 100%);
}

.finance-threshold-steps {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.finance-threshold-step {
  display: grid;
  gap: 4px;
  color: #7a8790;
}

.finance-threshold-step strong {
  font-size: 18px;
  line-height: 1;
}

.finance-threshold-step small {
  font-size: 12px;
}

.finance-threshold-step.is-active {
  color: #172026;
}

.finance-crowd {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.finance-crowd span {
  aspect-ratio: 1;
  border-radius: 999px;
  background: #F0F0F0;
}

.finance-crowd span.is-active {
  background: linear-gradient(180deg, #183e5e 0%, #4f8fb7 100%);
}

.finance-journey-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.finance-journey-node {
  min-height: 110px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(246, 247, 250, 0.9);
  border: 1px solid #F5F5F3;
  display: grid;
  align-content: start;
  gap: 10px;
  color: #738089;
}

.finance-journey-node span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F0F0F0;
  font-size: 12px;
}

.finance-journey-node strong {
  font-size: 15px;
  line-height: 1.25;
}

.finance-journey-node.is-done {
  background: rgba(231, 239, 235, 0.94);
  color: #203037;
}

.finance-journey-node.is-current {
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.98) 0%, rgba(248, 244, 235, 0.95) 100%);
  border-color: rgba(24, 62, 94, 0.14);
  color: #172026;
}

.finance-journey-node.is-near {
  transform: translateY(-4px);
}

.finance-journey-focus {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.finance-stage-card.current {
  background: linear-gradient(180deg, rgba(227, 239, 235, 0.98) 0%, rgba(217, 231, 226, 0.95) 100%);
}

.finance-stage-card.next {
  background: rgba(248, 249, 252, 0.94);
}

.finance-action-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.finance-action-column ul {
  margin: 16px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.finance-action-column--muted {
  background: rgba(243, 245, 248, 0.88);
}

.finance-footer {
  display: grid;
  gap: 14px;
}

.finance-footer-points {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-footer-point {
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(245, 246, 249, 0.98) 0%, rgba(239, 241, 246, 0.95) 100%);
}

@media (max-width: 1160px) {
  .finance-hero,
  .finance-insights,
  .finance-benchmarks,
  .finance-journey-focus,
  .finance-action-matrix,
  .finance-footer-points {
    grid-template-columns: 1fr;
  }

  .finance-journey-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .finance-hero-main,
  .finance-hero-fact,
  .finance-next-step,
  .finance-insight-lead,
  .finance-insight-mini,
  .finance-benchmark-panel,
  .finance-stage-card,
  .finance-action-column,
  .finance-footer-point {
    padding: 18px;
    border-radius: 22px;
  }

  .finance-section-head {
    align-items: stretch;
  }

  .finance-section-head h3,
  .finance-hero-status {
    font-size: 24px;
  }

  .finance-hero-score {
    font-size: 72px;
  }

  .finance-insight-lead strong {
    font-size: 30px;
  }

  .finance-benchmark-panel strong,
  .finance-hero-summary strong,
  .finance-next-step strong {
    font-size: 24px;
  }

  .finance-journey-strip {
    grid-template-columns: 1fr 1fr;
  }

  .finance-threshold-steps {
    flex-wrap: wrap;
  }
}

.analytics-hero,
.analytics-growth-summary,
.analytics-snowman-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.analytics-hero-copy,
.analytics-snowman-copy,
.analytics-question-card,
.analytics-reference-card,
.analytics-note-card,
.analytics-benchmark-card,
.analytics-education-card,
.analytics-stage-card,
.analytics-score-card,
.analytics-progress-card,
.analytics-mini-stat {
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(23, 31, 39, 0.07);
}

.analytics-hero-copy,
.analytics-snowman-copy,
.analytics-reference-card,
.analytics-question-card {
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.98) 0%, rgba(248, 244, 235, 0.95) 100%);
}

.analytics-score-card,
.analytics-progress-card {
  background: linear-gradient(180deg, rgba(230, 241, 238, 0.98) 0%, rgba(214, 233, 229, 0.95) 100%);
}

.analytics-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #66757f;
}

.analytics-hero h4,
.analytics-growth-summary h4,
.analytics-snowman-copy h4,
.analytics-question-card h4 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.analytics-hero p,
.analytics-growth-summary p,
.analytics-snowman-copy p,
.analytics-question-card p,
.analytics-reference-card p,
.analytics-benchmark-card p,
.analytics-education-card p,
.analytics-stage-card small,
.analytics-progress-card small {
  margin: 0;
  color: #56656f;
  line-height: 1.45;
}

.analytics-score-card span,
.analytics-progress-head span,
.analytics-benchmark-meta span,
.analytics-question-head small {
  font-size: 13px;
  color: #66757f;
}

.analytics-score-card strong {
  display: block;
  margin-top: 10px;
  font-size: 40px;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.analytics-score-card small,
.analytics-reference-meta,
.analytics-source {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #6b7983;
  line-height: 1.4;
}

.analytics-signal-grid,
.analytics-dual-grid,
.analytics-education-grid,
.analytics-stage-list,
.analytics-mini-stats,
.analytics-benchmark-list {
  display: grid;
  gap: 12px;
}

.analytics-signal-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.analytics-dual-grid,
.analytics-mini-stats,
.analytics-benchmark-list,
.analytics-education-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-signal-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: #FAFAF8;
  border: 1px solid rgba(22, 28, 38, 0.06);
}

.analytics-signal-head,
.analytics-progress-head,
.analytics-question-head,
.analytics-stage-head,
.analytics-benchmark-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.analytics-signal-head span,
.analytics-signal-card p,
.analytics-note-row,
.analytics-bullet,
.analytics-mini-stat span {
  font-size: 14px;
}

.analytics-signal-head strong,
.analytics-progress-head strong,
.analytics-stage-head strong,
.analytics-mini-stat strong,
.analytics-question-head strong {
  font-size: 18px;
  line-height: 1.2;
}

.analytics-signal-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(23, 31, 39, 0.08);
  overflow: hidden;
}

.analytics-signal-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7a96a5, #afc1cc);
}

.analytics-signal-fill.tone-good {
  background: linear-gradient(90deg, #0f6d67, #6dbeb0);
}

.analytics-signal-fill.tone-warn {
  background: linear-gradient(90deg, #b07b2f, #e1bf78);
}

.analytics-signal-fill.tone-muted {
  background: linear-gradient(90deg, #6d7a84, #c1cad1);
}

.analytics-signal-card.tone-good {
  background: linear-gradient(180deg, rgba(236, 247, 243, 0.96) 0%, rgba(228, 241, 236, 0.94) 100%);
}

.analytics-signal-card.tone-warn {
  background: linear-gradient(180deg, rgba(251, 245, 232, 0.96) 0%, rgba(248, 239, 220, 0.94) 100%);
}

.analytics-signal-card.tone-muted {
  background: linear-gradient(180deg, rgba(244, 246, 248, 0.96) 0%, rgba(238, 241, 244, 0.94) 100%);
}

.analytics-note-card,
.analytics-benchmark-card,
.analytics-education-card,
.analytics-stage-card,
.analytics-mini-stat {
  background: rgba(248, 249, 252, 0.92);
}

.analytics-note-card {
  display: grid;
  gap: 10px;
}

.analytics-note-row,
.analytics-bullet {
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(22, 28, 38, 0.05);
  color: #243039;
}

.analytics-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 109, 103, 0.08);
  color: #0f6d67;
  font-size: 13px;
  font-weight: 600;
}

.analytics-benchmark-card strong,
.analytics-education-card strong,
.analytics-reference-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.15;
}

.analytics-stage-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-stage-card {
  display: grid;
  gap: 12px;
}

.analytics-stage-card.is-current {
  background: linear-gradient(180deg, rgba(235, 246, 243, 0.98) 0%, rgba(224, 241, 236, 0.96) 100%);
  border-color: rgba(15, 109, 103, 0.18);
}

.analytics-bullet-list,
.analytics-capital-ledger,
.analytics-answer-list,
.analytics-learning-actions {
  display: grid;
  gap: 10px;
}

.analytics-snowman-card {
  align-items: center;
}

.analytics-snowman-figure {
  display: grid;
  place-items: center;
  min-height: 180px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.96), rgba(228, 239, 247, 0.9) 60%, rgba(211, 228, 236, 0.95)),
    linear-gradient(180deg, #eef4f8, #dce9f0);
  font-size: 92px;
}

.analytics-progress-card,
.analytics-mini-stat,
.analytics-question-card {
  display: grid;
  gap: 12px;
}

.finance-section--snowman {
  margin-bottom: 18px;
}

.snowman-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 24px;
  border: 1px solid rgba(23, 31, 39, 0.08);
  background: linear-gradient(180deg, rgba(248, 251, 253, 0.98) 0%, rgba(239, 246, 249, 0.96) 100%);
}

.snowman-face {
  flex: 0 0 auto;
  font-size: 2rem;
  line-height: 1;
}

.snowman-info {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.snowman-info strong {
  font-size: 28px;
  line-height: 1;
}

.snowman-info p,
.snowman-progress-wrap small,
.snowman-factors {
  color: var(--ink-soft);
}

.snowman-progress-wrap {
  display: grid;
  gap: 8px;
  flex: 1 1 240px;
  min-width: 220px;
}

.snowman-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(23, 31, 39, 0.08);
  overflow: hidden;
}

.snowman-progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7a96a5, #afc1cc);
}

.snowman-factors {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.analytics-answer-option {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(23, 31, 39, 0.08);
  background: #FFFFFF;
  color: #1e2830;
  font: inherit;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.analytics-answer-option:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 109, 103, 0.26);
}

.analytics-answer-option.is-selected {
  border-color: rgba(31, 94, 135, 0.3);
  background: rgba(226, 236, 245, 0.95);
}

.analytics-answer-option.is-correct {
  border-color: rgba(15, 109, 103, 0.32);
  background: rgba(227, 244, 239, 0.95);
}

.analytics-answer-result {
  display: grid;
  gap: 8px;
  padding: 15px 16px;
  border-radius: 18px;
  background: rgba(235, 246, 243, 0.92);
  border: 1px solid rgba(15, 109, 103, 0.12);
}

.analytics-answer-result.is-neutral {
  background: rgba(244, 246, 248, 0.95);
  border-color: rgba(23, 31, 39, 0.08);
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

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

.settings-grid--clean {
  grid-template-columns: minmax(0, 720px);
}

.admin-settings-layout {
  display: grid;
  gap: 18px;
  max-width: 920px;
}

.admin-settings-header {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(24, 32, 38, 0.03);
  border: 1px solid #F5F5F3;
}

.admin-settings-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.admin-settings-header p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

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

.stat-value {
  display: block;
  margin-top: 5px;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.03em;
}

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

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

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f5e87, #8ab8d3);
}

.bar-fill.is-negative {
  background: linear-gradient(90deg, #97553a, #d39d84);
}

.comparison-pairs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.comparison-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 26px;
  border-radius: 28px;
  background: #FFFFFF;
  border: 1px solid #EBEBEB;
  box-shadow: var(--shadow-lg);
}

.comparison-head h4 {
  margin: 4px 0 0;
  font-size: 44px;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.benchmark-bars {
  display: block;
}

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

.benchmark-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 18px;
  background: #FFFFFF;
  border: 1px solid #F5F5F3;
}

.benchmark-stat span {
  font-size: 14px;
  color: var(--ink-soft);
}

.benchmark-stat strong {
  font-size: 18px;
  line-height: 1.2;
}

.benchmark-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.benchmark-label {
  font-size: 16px;
  line-height: 1.2;
  color: #182026;
}

.benchmark-track {
  height: 14px;
  border-radius: 999px;
  background: #EBEBEB;
  overflow: hidden;
}

.benchmark-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7f61ff, #b39dff);
}

.benchmark-fill.is-capital {
  background: linear-gradient(90deg, #1b8572, #7fd2c4);
}

.benchmark-value {
  display: grid;
  justify-items: end;
  min-width: 110px;
}

.benchmark-value strong {
  font-size: 18px;
  line-height: 1.1;
}

.benchmark-value span {
  font-size: 13px;
  line-height: 1.2;
  color: #6d7b86;
}

.benchmark-copy {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #F0F0F0;
}

.benchmark-copy strong {
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.benchmark-copy p {
  margin: 0;
  font-size: 16px;
  line-height: 1.42;
  color: #495864;
}

.benchmark-copy small,
.empty-copy {
  font-size: 13px;
  line-height: 1.45;
  color: #6d7b86;
}

.radio-group {
  gap: 10px;
}

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

.settings-hint {
  padding: 0 4px;
  background: transparent;
  border: 0;
}

.testing-tools,
.testing-result,
.testing-credentials,
.testing-summary-list {
  display: grid;
  gap: 12px;
}

.admin-tools {
  display: grid;
  gap: 14px;
}

.admin-block {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #F5F5F3;
  background: rgba(24, 32, 38, 0.03);
}

.admin-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-block-head strong {
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

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

.testing-credentials--compact,
.testing-summary-list--compact {
  gap: 8px;
}

.testing-tools-actions,
.testing-summary-row,
.testing-summary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.testing-credential-card,
.testing-summary-row {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(22, 28, 38, 0.06);
  background: #FAFAF8;
}

.testing-credential-card--compact,
.testing-summary-list--compact .testing-summary-row {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.testing-credential-card {
  display: grid;
  gap: 6px;
}

.testing-credential-card span,
.testing-summary-copy span {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
}

.testing-credential-card code {
  width: fit-content;
  padding: 6px 8px;
  border-radius: 10px;
  background: #F5F5F3;
  font-size: 13px;
}

.testing-summary-row {
  justify-content: space-between;
}

.testing-summary-copy {
  display: grid;
  gap: 4px;
}

.testing-summary-list--compact .testing-summary-copy strong,
.testing-credential-card--compact strong {
  font-size: 14px;
  line-height: 1.3;
}

#section-admin-settings .btn.small {
  padding: 6px 10px;
}

#section-admin-settings .detail-hint {
  padding: 0;
  background: transparent;
  border: 0;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(24, 32, 38, 0.04);
}

.setting-row,
.mapping-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.setting-row {
  padding: 16px 18px;
  border-radius: 18px;
  background: #FAFAF8;
  border: 1px solid rgba(22, 28, 38, 0.06);
}

.setting-row--wrap {
  align-items: start;
  flex-wrap: wrap;
}

.setting-row--comfortable {
  min-height: 72px;
}

.setting-inline-select select {
  min-width: 110px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

.setting-inline-select--wide {
  width: min(100%, 320px);
}

.setting-inline-select--wide select {
  width: 100%;
  white-space: normal;
}

#section-settings .panel {
  box-shadow: none;
}

#section-settings .panel-head {
  margin-bottom: 10px;
}

#section-settings .panel-head h3 {
  font-size: 18px;
  line-height: 1.2;
}

#section-settings .setting-row span {
  font-size: 15px;
  color: var(--ink);
}

#section-settings .setting-row strong {
  font-size: 15px;
  font-weight: 600;
}

#section-settings .btn {
  width: fit-content;
}

.mapping-item.match {
  background: rgba(15, 109, 103, 0.08);
}

.mapping-item.review {
  background: rgba(198, 177, 141, 0.18);
}

.import-mapping {
  margin-top: 18px;
}

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

  .rail {
    position: static;
    height: auto;
  }

  .table-layout,
  .table-layout.has-detail,
  .analytics-grid,
  .settings-grid,
  .health-strip,
  .history-grid,
  .home-grid,
  .home-compact-main,
  .home-health-grid,
  .template-grid,
  .import-grid,
  .baskets-grid,
  .basket-columns,
  .intro-flow,
  .income-step-grid,
  .category-builder-layout,
  .basket-columns-wide,
  .payout-switches {
    grid-template-columns: 1fr;
  }

  .overview-stats,
  .comparison-cards,
  .inline-grid,
  .choice-grid,
  .custom-category-grid,
  .asset-editor-inline,
  .editor-grid,
  .distribution-row,
  .distribution-head,
  .investments-topline,
  .asset-suggestions,
  .investment-row,
  .investment-table-head,
  .scorecard-main,
  .scorecard-secondary,
  .health-hero,
  .health-action,
  .health-progress-shell,
  .health-progress-grid,
  .health-split,
  .health-factor-row,
  .analytics-signal-grid,
  .analytics-dual-grid,
  .analytics-education-grid,
  .analytics-stage-list,
  .analytics-mini-stats,
  .analytics-benchmark-list,
  .analytics-hero,
  .analytics-growth-summary,
  .analytics-snowman-card,
  .year-plan-visual-top,
  .year-plan-category-head,
  .year-plan-group-head,
  .year-plan-side-footer,
  .period-category-row,
  .history-period-card,
  .history-category-row,
  .finish-stats,
  .income-inline-card,
  .distribution-table-head,
  .distribution-table-row,
  .category-chip-grid,
  .frequency-grid,
  .onboarding-note-grid,
  .onboarding-note-grid--compact,
  .setup-category-grid,
  .setup-drop-grid,
  .payout-editor-grid,
  .setup-step-layout {
    grid-template-columns: 1fr;
  }

  .analytics-panel-wide {
    grid-column: span 1;
  }

  .onboarding-distribution-matrix {
    min-width: 680px;
  }

  .scorecard-trend-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inspector {
    display: none !important;
  }
}

@media (max-width: 820px) {
  .workspace {
    padding: 16px;
  }

  .workspace-header,
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .header-meta {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .available-now-card {
    min-width: 0;
  }

  .intro-hero {
    display: grid;
    grid-template-columns: 1fr;
  }

  .intro-hero-copy h3 {
    font-size: 36px;
  }

  .salary-plan-head,
  .salary-plan-row {
    grid-template-columns: 1fr;
  }

  .budget-summary-strip {
    grid-template-columns: 1fr;
  }

  .salary-plan-col-transfer,
  .salary-plan-col-balance {
    display: none;
  }

  .salary-plan-cell-balance.is-inactive {
    display: none;
  }

  .home-compact-header,
  .home-compact-side,
  .year-plan-panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .home-compact-main {
    grid-template-columns: 1fr;
  }

  .summary-hero h3,
  .comparison-head h4 {
    font-size: 42px;
  }

  .onboarding-screen-title {
    font-size: 30px;
  }

  .flow-scheme {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .flow-scheme--timeline {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .category-card-toggle {
    flex-direction: column;
    align-items: stretch;
  }

  .category-card-state {
    width: fit-content;
  }

  .payout-editor-footer {
    align-items: stretch;
  }

  .onboarding-distribution-matrix th,
  .onboarding-distribution-matrix td {
    padding: 12px;
  }

  .onboarding-distribution-matrix th:first-child,
  .onboarding-distribution-matrix td:first-child {
    min-width: 168px;
  }

  .payout-card-head {
    grid-template-columns: 1fr;
  }

  .payout-summary {
    align-items: flex-start;
  }

  .workspace-title h1 {
    font-size: 44px;
  }

  .header-income-btn {
    width: 100%;
    justify-content: center;
  }

  .health-level strong,
  .benchmark-copy strong {
    font-size: 20px;
  }

  .toolbar-actions,
  .toolbar-main {
    width: 100%;
  }

  .search-input {
    max-width: none;
  }

  .insight-split,
  .inline-grid.single,
  .custom-category-grid {
    grid-template-columns: 1fr;
  }

  .year-plan-strip {
    display: none;
  }

  .year-plan-basket-switch,
  .period-category-actions,
  .period-rail-nav,
  .year-plan-actions {
    flex-wrap: wrap;
  }

  .year-plan-actions {
    flex-wrap: nowrap;
  }

  .year-plan-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .year-plan-panel,
  .year-plan-group-card,
  .year-plan-visual-card,
  .year-plan-side-footer,
  .year-plan-table-shell {
    padding: 14px;
  }

  .year-plan-donut {
    width: min(220px, 100%);
  }

  .year-plan-table-head {
    display: none;
  }

  .year-plan-table-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .year-plan-table-summary,
  .year-plan-capital-strip {
    grid-template-columns: 1fr;
  }

  .year-plan-table-value,
  .year-plan-table-total {
    justify-content: flex-start;
  }

  .budget-table th:first-child,
  .budget-table td:first-child {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
  }
}

@media (max-width: 1180px) {
  .year-plan-builder {
    grid-template-columns: 1fr;
  }

  .year-plan-panel-side {
    order: 2;
  }
}

/* ============================================================
   ONBOARDING REDESIGN — overrides & new components
   ============================================================ */

/* --- Modal shell --- */
.onboarding-card {
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.onboarding-card .modal-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.modal-head h2 {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
  color: #1A1A1A;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #999999;
}

.modal-step {
  font-size: 12px;
  color: #999999;
}

/* --- Progress dots --- */
.onboarding-progress {
  display: flex;
  gap: 5px;
  padding: 0 24px 4px;
  margin: 0;
}

.progress-dot {
  flex: 1;
  height: 3px;
  border-radius: 100px;
  background: #EBEBEB;
  transition: background 0.2s;
}

.progress-dot.active {
  background: #1A1A1A;
}

/* --- Body & screen reset --- */
.onboarding-screen {
  display: grid;
  gap: 16px;
}

.onboarding-screen-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1A1A1A;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.onboarding-screen-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: #999999;
  line-height: 1.5;
  max-width: 560px;
}

/* --- Buttons --- */
.btn-primary {
  background: #1A1A1A;
  border: none;
  color: #fff;
  padding: 11px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  box-shadow: none;
}

.btn-primary:hover {
  background: #4A5CE4;
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: default;
}

.btn-ghost {
  background: transparent;
  border: 1px solid #EBEBEB;
  color: #999999;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-ghost:hover {
  border-color: #C4C6D0;
  color: #1A1A1A;
}

.btn-ghost:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ============================================================
   STEP 1: Quiz carousel
   ============================================================ */
.ob-quiz {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0;
}

.quiz-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 2rem;
}

.quiz-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EBEBEB;
  transition: all 0.2s;
}

.quiz-dot.done {
  background: #1A1A1A;
}

.quiz-dot.active {
  width: 22px;
  border-radius: 100px;
  background: #1A1A1A;
}

.quiz-card {
  width: 100%;
  max-width: 480px;
}

.quiz-q-num {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #999999;
  margin-bottom: 0.75rem;
}

.quiz-q-title {
  font-size: 20px;
  font-weight: 700;
  color: #1A1A1A;
  margin: 0 0 1.5rem;
  line-height: 1.35;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid #EBEBEB;
  background: #FFFFFF;
  font-size: 15px;
  font-weight: 500;
  color: #1A1A1A;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.quiz-option:hover {
  border-color: #CCCCCC;
  background: #F5F5F3;
}

.quiz-option.is-selected {
  border: 1.5px solid #1A1A1A;
  background: #F5F5F3;
  color: #1A1A1A;
}

/* ============================================================
   STEP 2: Explain
   ============================================================ */
@keyframes explainFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ob-explain {
  padding: 0.25rem 0;
}

.explain-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 9px;
  margin: .5rem 0;
}

.explain-card {
  border-radius: 16px;
  padding: 18px 16px 16px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: explainFadeUp .4s ease forwards;
  transition: transform .15s;
}

.explain-card:hover { transform: translateY(-2px); }

.ec-1 { background: #F5F5F3; border: 1px solid #EBEBEB; animation-delay: .05s; }
.ec-2 { background: #E6F1FB; border: 1px solid #85B7EB; animation-delay: .15s; }
.ec-3 { background: #E1F5EE; border: 1px solid #9FE1CB; animation-delay: .25s; }
.ec-4 { background: #FEF3E2; border: 1px solid #F5C842; animation-delay: .35s; }

.ec-bg {
  position: absolute;
  right: -6px;
  bottom: -14px;
  font-size: 76px;
  font-weight: 800;
  line-height: 1;
  opacity: .1;
  pointer-events: none;
  user-select: none;
}

.ec-1 .ec-bg { color: #1A1A1A; }
.ec-2 .ec-bg { color: #0C447C; }
.ec-3 .ec-bg { color: #085041; }
.ec-4 .ec-bg { color: #92540A; }

.ec-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 11px;
  font-size: 17px;
}

.ec-1 .ec-icon { background: #D5D3F9; }
.ec-2 .ec-icon { background: #B5D4F4; }
.ec-3 .ec-icon { background: #C2EDD9; }
.ec-4 .ec-icon { background: #FDDEA0; }

.ec-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.ec-1 .ec-title { color: #2D2580; }
.ec-2 .ec-title { color: #0C447C; }
.ec-3 .ec-title { color: #075E3E; }
.ec-4 .ec-title { color: #7A4409; }

.ec-text {
  font-size: 12px;
  line-height: 1.55;
  position: relative;
  z-index: 1;
}

.ec-1 .ec-text { color: #534AB7; }
.ec-2 .ec-text { color: #185FA5; }
.ec-3 .ec-text { color: #0F6E56; }
.ec-4 .ec-text { color: #92540A; }

.ec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
  position: relative;
  z-index: 1;
}

.ec-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 100px;
  background: #fff;
  border: 1px solid #85B7EB;
  color: #185FA5;
  font-weight: 500;
}

.explain-footer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: #FAFAF8;
  border-radius: 10px;
  font-size: 13px;
  color: #999999;
  line-height: 1.5;
  margin-top: 4px;
}

/* ============================================================
   STEP 3: Setup
   ============================================================ */

/* Subtitle in modal header */
.onboarding-subtitle {
  font-size: 12px;
  color: #999999;
  line-height: 1.45;
  margin: 2px 0 0;
}

/* Layout */
.ob-setup-layout {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  align-items: start;
}

/* Панель категорий */
.ob-cat-panel {
  background: var(--panel);
  border: 1px solid rgba(23,26,36,.08);
  border-radius: 14px;
  overflow: hidden;
}

.ob-cat-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(23,26,36,.08);
}

.ob-cat-title {
  font-size: 13px;
  font-weight: 600;
  color: #1A1A1A;
  margin-bottom: 8px;
}

/* Слоты */
.ob-slot-row {
  display: flex;
  gap: 3px;
  align-items: center;
}

.ob-slot {
  width: 18px;
  height: 6px;
  border-radius: 100px;
  background: rgba(23,26,36,.08);
  transition: background .2s;
  flex-shrink: 0;
}

.ob-slot.filled { background: #1A1A1A; }

.ob-slot-locked {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #FAFAF8;
  border: 1px solid rgba(23,26,36,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  margin-right: 1px;
}

.ob-slot-label {
  font-size: 11px;
  color: #999999;
  margin-left: 6px;
  white-space: nowrap;
}

.ob-slot-label b {
  color: #1A1A1A;
  font-weight: 600;
}

/* Плитки */
.ob-tiles {
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ob-tile-locked {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(23,26,36,.08);
  background: #FAFAF8;
  cursor: default;
  user-select: none;
  font-size: 14px;
  font-weight: 500;
  color: #999999;
  opacity: .6;
}

.ob-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(23,26,36,.08);
  background: var(--panel);
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}

.ob-tile:hover {
  border-color: #1A1A1A;
  background: #F5F5F3;
}

.ob-tile.on {
  background: #F5F5F3;
  border-color: #1A1A1A;
}

.ob-tile.on .ob-tile-name {
  color: #1A1A1A;
  font-weight: 600;
}

.ob-tile.maxed:not(.on) {
  opacity: .28;
  pointer-events: none;
}

.ob-tile-cb {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid rgba(23,26,36,.12);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  transition: all .15s;
}

.ob-tile.on .ob-tile-cb {
  background: #1A1A1A;
  border-color: #1A1A1A;
}

.ob-tile-name {
  font-size: 14px;
  font-weight: 500;
  color: #6f7b8b;
  white-space: nowrap;
}

/* Добавить категорию */
.ob-cat-footer {
  padding: 10px 14px;
  border-top: 1px solid rgba(23,26,36,.08);
}

.ob-add-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1.5px dashed rgba(23,26,36,.12);
  background: transparent;
  cursor: pointer;
  transition: all .15s;
  width: 100%;
  font-size: 13px;
  color: #999999;
  font-family: inherit;
}

.ob-add-btn:hover {
  border-color: #1A1A1A;
  background: #F5F5F3;
}

.ob-add-plus {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FAFAF8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1;
}

.ob-add-wrap {
  display: none;
  gap: 6px;
  align-items: center;
}

.ob-add-input {
  flex: 1;
  padding: 8px 11px;
  border: 1.5px solid #1A1A1A;
  border-radius: 9px;
  font-size: 13px;
  background: #fff;
  color: #1A1A1A;
  outline: none;
  font-family: inherit;
}

.ob-add-ok {
  padding: 8px 14px;
  border-radius: 9px;
  background: #1A1A1A;
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.ob-add-cancel {
  padding: 8px;
  border: none;
  background: transparent;
  font-size: 16px;
  color: #999999;
  cursor: pointer;
  font-family: inherit;
}

/* Правая колонка */
.ob-setup-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ob-freq {
  background: var(--panel);
  border: 1px solid rgba(23,26,36,.08);
  border-radius: 12px;
  padding: 12px 13px;
}

.ob-freq-title {
  font-size: 12px;
  font-weight: 600;
  color: #999999;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}

.ob-fq {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(23,26,36,.08);
  background: transparent;
  font-size: 13px;
  color: #999999;
  cursor: pointer;
  text-align: left;
  font-weight: 500;
  transition: all .12s;
  margin-bottom: 5px;
  font-family: inherit;
}

.ob-fq:last-child { margin-bottom: 0; }

.ob-fq:hover {
  border-color: #1A1A1A;
  color: #1A1A1A;
}

.ob-fq.on {
  background: #F5F5F3;
  border-color: #1A1A1A;
  color: #1A1A1A;
}

/* legacy basket-tag used in distribution step */
.basket-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 10px;
  background: #fff;
  border: 1px solid #EBEBEB;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: #1A1A1A;
  cursor: grab;
  user-select: none;
}

.basket-tag.is-savings {
  border-color: #9FE1CB;
  color: #0F6E56;
}

.basket-tag-remove {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #999999;
  cursor: pointer;
  border: none;
  background: transparent;
  line-height: 1;
  flex-shrink: 0;
  padding: 0;
}

.basket-tag-remove:hover {
  background: #FCEBEB;
  color: #A32D2D;
}

.category-type-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 100px;
  background: #E1F5EE;
  color: #085041;
  border: 1px solid #9FE1CB;
}

/* ============================================================
   STEP 4: Distribution — CSS polish
   ============================================================ */
.income-inline-card {
  background: #fff;
  border: 1px solid #EBEBEB;
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: none;
}

.income-inline-card .stack-field span {
  font-size: 13px;
  font-weight: 600;
  color: #999999;
  margin-bottom: 6px;
  display: block;
}

#onboarding-income-input {
  font-size: 24px;
  font-weight: 700;
  color: #1A1A1A;
  border: none;
  outline: none;
  width: 100%;
  background: transparent;
  font-family: inherit;
}

.income-inline-note {
  font-size: 12px;
  color: #999999;
  margin-top: 4px;
}

.dist-progress-wrap {
  height: 6px;
  background: #EBEBEB;
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 6px;
}

.dist-progress-bar {
  height: 100%;
  background: #1A1A1A;
  border-radius: 100px;
  transition: width 0.3s ease;
}

.dist-progress-bar.is-over {
  background: #E24B4A;
}

.dist-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999999;
  margin-bottom: 1rem;
}

#dist-fill-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1.5px dashed #EBEBEB;
  background: #F5F5F3;
  color: #1A1A1A;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1.25rem;
  transition: background 0.15s;
  font-family: inherit;
}

#dist-fill-btn:hover {
  background: #e0dff8;
}

.payout-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.payout-amount-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #EBEBEB;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-align: right;
  background: #fff;
  color: #1A1A1A;
  outline: none;
  font-family: inherit;
}

.payout-amount-input:focus {
  border-color: #1A1A1A;
}

.dist-group {
  margin-bottom: 1.25rem;
}

.dist-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.75rem;
}

.dist-group-head strong {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #999999;
}

.dist-group-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dist-group-dot--fixed { background: #1A1A1A; }
.dist-group-dot--comfort { background: #1D9E75; }
.dist-group-dot--savings { background: #EF9F27; }

.dist-group-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dist-card {
  background: #fff;
  border: 1px solid #EBEBEB;
  border-radius: 12px;
  padding: 12px 14px;
}

.dist-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.dist-card-title strong {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
}

.dist-card-inputs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.dist-input-wrap {
  flex: 1;
}

.dist-input-label {
  font-size: 11px;
  color: #999999;
  display: block;
  margin-bottom: 3px;
}

.dist-amount-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #EBEBEB;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  background: #fff;
  color: #1A1A1A;
  outline: none;
  font-family: inherit;
}

.dist-amount-input:focus {
  border-color: #1A1A1A;
  box-shadow: 0 0 0 2px #F5F5F3;
}

.dist-pct-hint {
  font-size: 11px;
  color: #999999;
  display: block;
  text-align: right;
  margin-top: 2px;
  height: 14px;
}

.dist-card-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid #EBEBEB;
}

.dist-card-total span {
  font-size: 12px;
  color: #999999;
}

.dist-card-total strong {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
}

.dist-pocket-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #E1F5EE;
  border-radius: 10px;
  border: 1px solid #9FE1CB;
  margin-top: 0.5rem;
}

.dist-pocket-left strong {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
  display: block;
}

.dist-pocket-left span {
  font-size: 12px;
  color: #999999;
}

.dist-pocket-amount {
  font-size: 18px;
  font-weight: 700;
  color: #1D9E75;
}

.dist-pocket-amount.is-warn {
  color: #E24B4A;
}

#distribution-helper-copy {
  font-size: 12px;
  color: #999999;
  margin-top: 0.75rem;
  padding: 10px 14px;
  background: #FAFAF8;
  border-radius: 8px;
  border: none;
  box-shadow: none;
}

#distribution-helper-copy.is-warn {
  color: #A32D2D;
  background: #FCEBEB;
}

#distribution-helper-copy.is-soft {
  color: #085041;
  background: #E1F5EE;
}

/* ============================================================
   STEP 5: Finish
   ============================================================ */
.ob-finish {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0;
}

.finish-snowman {
  font-size: 72px;
  margin-bottom: 1.25rem;
  line-height: 1;
}

.finish-title {
  font-size: 22px;
  font-weight: 700;
  color: #1A1A1A;
  margin: 0 0 0.5rem;
  max-width: 360px;
  letter-spacing: -0.01em;
}

.finish-text {
  font-size: 15px;
  color: #999999;
  line-height: 1.6;
  margin: 0 0 1.5rem;
  max-width: 400px;
}

.finish-next {
  background: #FAFAF8;
  border: 1px solid #EBEBEB;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 1.5rem;
  text-align: left;
  width: 100%;
  max-width: 420px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.finish-next-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1A1A1A;
  white-space: nowrap;
  padding-top: 2px;
  flex-shrink: 0;
}

.finish-next-content strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #1A1A1A;
  margin-bottom: 3px;
}

.finish-next-content p {
  font-size: 13px;
  color: #999999;
  line-height: 1.4;
  margin: 0;
}

.finish-cta-btn {
  padding: 13px 32px;
  font-size: 15px;
}

/* ============================================================
   Mobile: onboarding
   ============================================================ */
@media (max-width: 600px) {
  #onboarding-modal {
    display: flex !important;
    overflow: hidden;
    padding: 0;
    z-index: 200;
  }
  #onboarding-modal.is-open { display: flex !important; }
  .onboarding-card {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .onboarding-card .modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: none;
    min-height: 0;
    padding-bottom: 24px;
  }
  .quiz-q-title { font-size: 17px; }
  .finish-snowman { font-size: 56px; }
  .dist-card-inputs { flex-direction: column; }
}

/* Tooltip help button */
.tooltip-wrap { position: relative; display: inline-flex; align-items: center; }
.help-btn { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line);
  background: transparent; font-size: 11px; font-weight: 700; color: var(--ink-soft);
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.help-btn:hover { border-color: #1A1A1A; color: #1A1A1A; }
.tooltip-box { display: none; position: absolute; right: 0; top: 28px;
  background: #1A1A1A; color: #fff; font-size: 12px; line-height: 1.5;
  border-radius: 9px; padding: 9px 12px; width: 200px; z-index: 100; }
.tooltip-box::before { content: ''; position: absolute; top: -5px; right: 7px;
  width: 10px; height: 10px; background: #1A1A1A; transform: rotate(45deg); border-radius: 2px; }
.tooltip-wrap:hover .tooltip-box { display: block; }


/* ============================================================
   STEP 4: Distribution (new layout)
   ============================================================ */

/* Row 1: Income + Frequency pills */
.dist-row1 {
  display: flex;
  align-items: stretch;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.dist-r1-left,
.dist-r1-right {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  flex: 1;
}

.dist-r1-divider {
  width: 1px;
  background: var(--line);
  flex-shrink: 0;
  align-self: stretch;
}

.dist-r1-label {
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  flex-shrink: 0;
}

#dist-income-input {
  flex: 1;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  border: none;
  outline: none;
  background: transparent;
  min-width: 0;
  font-family: inherit;
}

.dist-help {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.dist-help:hover { border-color: #1A1A1A; color: #1A1A1A; }

.dist-tooltip {
  display: none;
  position: absolute;
  right: 0;
  top: 26px;
  background: #1A1A1A;
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
  border-radius: 10px;
  padding: 9px 12px;
  width: 200px;
  z-index: 10;
  white-space: normal;
}

.dist-tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 8px;
  width: 10px;
  height: 10px;
  background: #1A1A1A;
  transform: rotate(45deg);
  border-radius: 2px;
}

.dist-help:hover .dist-tooltip,
.dist-help:focus-within .dist-tooltip { display: block; }

.dist-tt-row + .dist-tt-row {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 4px;
  padding-top: 6px;
}

.dist-freq-pill {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .12s;
  font-family: inherit;
}

.dist-freq-pill:hover { border-color: #1A1A1A; color: #1A1A1A; }
.dist-freq-pill.on { background: #F5F5F3; border-color: #1A1A1A; color: #1A1A1A; font-weight: 700; }

/* Row 2: Payout inputs */
.dist-row2 {
  display: grid;
  gap: 8px;
}

.dist-pi-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dist-pi-label {
  font-size: 11px;
  color: var(--ink-soft);
}

.dist-pi-inp {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  background: var(--panel);
  color: var(--ink);
  outline: none;
  font-family: inherit;
}

.dist-pi-inp:focus { border-color: #1A1A1A; }

.dist-pi-split-col {
  justify-content: flex-end;
}

.dist-split-btn {
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.dist-split-btn:hover { border-color: var(--line-strong); color: var(--ink); }

.dist-row2-status {
  font-size: 11px;
  text-align: right;
  min-height: 16px;
}

.dist-row2-status.ok { color: #1D9E75; }
.dist-row2-status.err { color: #E24B4A; }

/* Payout day inputs (distribution step) */
.dist-payout-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
}
.dist-payout-day-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dist-payout-day-label {
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.dist-payout-day-input {
  width: 72px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  background: var(--panel);
  color: var(--ink);
  text-align: center;
}
.dist-payout-day-input:focus {
  outline: none;
  border-color: var(--ink-soft);
}

/* Row 3: Progress + AI button */
.dist-row3 {
  display: flex;
  align-items: stretch;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.dist-prog {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 14px;
  gap: 4px;
}

.dist-prog-track {
  height: 7px;
  background: var(--line);
  border-radius: 100px;
  overflow: hidden;
}

.dist-prog-fill {
  height: 100%;
  background: #7F77DD;
  border-radius: 100px;
  transition: width .25s;
}

.dist-prog-fill.over { background: #E24B4A; }

.dist-prog-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-soft);
}

.dist-prog-pocket {
  font-weight: 600;
  color: #1D9E75;
}

.dist-prog-pocket.over { color: #E24B4A; }

.dist-r3-divider {
  width: 1px;
  background: var(--line);
  flex-shrink: 0;
  align-self: stretch;
}

.dist-ai-btn {
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #1A1A1A;
  padding: 0 20px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
  transition: background .15s;
}

.dist-ai-btn:hover { background: #F5F5F3; }

/* Error banner */
.dist-err-banner {
  padding: 10px 14px;
  background: #FCEBEB;
  border: 1px solid #F09595;
  border-radius: 9px;
  font-size: 12px;
  color: #A32D2D;
  line-height: 1.4;
}

/* Table */
.dist-cat-table { width: 100%; border-collapse: collapse; }

.dist-cat-table thead th {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.dist-cat-table thead th:first-child { text-align: left; }
.dist-cat-table thead th.dist-th-accent { color: #1A1A1A; }

.dist-th-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: 0;
}

.dist-cat-row td { padding: 6px 10px; border-bottom: 1px solid var(--line); }
.dist-cat-row:last-child td { border-bottom: none; }
.dist-cat-row:hover td { background: var(--panel-soft); }

.dist-cat-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.de-cat-name-row { display: flex; align-items: center; gap: 6px; }
.dist-cat-row.is-tracked > td:first-child { background: rgba(127,119,221,0.04); }
.dm-cat-goal-section { margin-top: 6px; }
.dist-amt-cell { text-align: right; min-width: 80px; }

.dist-amount-input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  background: var(--panel);
  color: var(--ink);
  outline: none;
  font-family: inherit;
  -webkit-appearance: none;
}

.dist-amount-input:focus { border-color: #1A1A1A; box-shadow: 0 0 0 2px #F5F5F3; }
.dist-amount-input.has-val { border-color: #EBEBEB; background: rgba(238,237,254,.08); }
.dist-amount-input.is-err { border-color: #E24B4A !important; background: #FCEBEB !important; color: #A32D2D !important; }

.dist-pct-hint {
  font-size: 10px;
  color: var(--ink-soft);
  text-align: right;
  margin-top: 2px;
  height: 13px;
}

.dist-cat-total { font-size: 13px; font-weight: 600; color: #1A1A1A; text-align: right; white-space: nowrap; }
.dist-cat-total.zero { color: var(--ink-soft); font-weight: 400; }

/* Pocket row */
.dist-pocket-row td {
  padding: 8px 10px;
  background: rgba(225,245,238,.06);
  border-top: 2px solid rgba(159,225,203,.5);
}

.dist-pocket-name {
  font-size: 14px;
  font-weight: 600;
  color: #0F6E56;
}

.dist-pocket-cell {
  font-size: 13px;
  font-weight: 600;
  color: #0F6E56;
  text-align: right;
}

.dist-pocket-total {
  font-size: 15px;
  font-weight: 700;
  color: #0F6E56;
  text-align: right;
  white-space: nowrap;
}

.tooltip-row + .tooltip-row { border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 4px; padding-top: 6px; }

/* ============================================================
   HOME SCREEN (dashboard)
   ============================================================ */

.home-screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 32px;
  width: 100%;
  box-sizing: border-box;
}

/* ── Topbar ───────────────────────────────────────────────── */
.home-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-topbar-greet {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
}

.home-topbar-month {
  font-size: 11px;
  color: var(--ink-muted, #b0b4c0);
  margin-top: 2px;
}

.home-topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.home-btn-ghost {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  transition: all .12s;
  white-space: nowrap;
}

.home-btn-ghost:hover { border-color: #1A1A1A; color: #1A1A1A; }

.home-btn-primary {
  padding: 8px 14px;
  border: none;
  border-radius: 9px;
  background: #1A1A1A;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s;
  white-space: nowrap;
}

.home-btn-primary:hover { background: #4B5EE0; }

/* ── Snowman card ─────────────────────────────────────────── */
.home-snowman-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--panel);
}

.home-snowman-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.home-snowman-face {
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.08));
}

.home-streak-squares {
  display: flex;
  gap: 4px;
}

.home-sq {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
}

.home-sq.done  { background: #E1F5EE; color: #0F6E56; }
.home-sq.skip  { background: #FCEBEB; color: #A32D2D; }
.home-sq.cur   { background: #F5F5F3; color: #1A1A1A; border: 1.5px solid #1A1A1A; }
.home-sq.empty { background: var(--surface, #FAFAF8); color: var(--ink-muted, #B0B4C0); }

.home-streak-label {
  font-size: 10px;
  color: var(--ink-muted, #B0B4C0);
  text-align: center;
  white-space: nowrap;
}

.home-snowman-body {
  flex: 1;
  min-width: 0;
}

.home-snow-badge {
  display: inline-block;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  margin-bottom: 6px;
}

.home-snow-badge.badge-grey   { background: #F0F0F4; color: #6B7280; }
.home-snow-badge.badge-green  { background: #E1F5EE; color: #0F6E56; }
.home-snow-badge.badge-yellow { background: #FAEEDA; color: #854F0B; }
.home-snow-badge.badge-orange { background: #FAECE7; color: #993C1D; }
.home-snow-badge.badge-red    { background: #FCEBEB; color: #A32D2D; }

.home-snow-title {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 4px;
}

.home-snow-text {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0 0 12px;
}

.home-snow-dots {
  display: flex;
  gap: 8px;
}

.home-dot-wrap {
  position: relative;
}

.home-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  cursor: default;
}

.home-dot.dot-on   { background: #1D9E75; border: 1.5px solid #1D9E75; }
.home-dot.dot-warn { background: #EF9F27; border: 1.5px solid #EF9F27; }
.home-dot.dot-off  { background: var(--surface, #FAFAF8); border: 1.5px solid var(--line); }

.home-dot-tip {
  display: none;
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: #1A1A1A;
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 7px;
  z-index: 10;
  pointer-events: none;
}

.home-dot-wrap:hover .home-dot-tip { display: block; }

/* ── Metrics ──────────────────────────────────────────────── */
.home-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-metric-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--panel);
}

.home-metric-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
}

.home-metric-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 4px;
}

.home-metric-cur {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}

.home-metric-sub {
  font-size: 11px;
  color: var(--ink-soft);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-metric-sub.pos { color: #1D9E75; }
.home-metric-sub.neg { color: #E24B4A; }

.home-metric-bar {
  height: 3px;
  background: var(--line);
  border-radius: 100px;
  overflow: hidden;
}

.home-metric-fill {
  height: 100%;
  border-radius: 100px;
  transition: width .3s;
}

.home-metric-help {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.home-metric-tip {
  display: none;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1A1A1A;
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
  padding: 8px 11px;
  border-radius: 9px;
  width: 220px;
  z-index: 20;
  pointer-events: none;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.home-metric-help:hover .home-metric-tip { display: block; }

/* ── Payout card ──────────────────────────────────────────── */
.home-payout-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel);
}

.home-payout-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #F5F5F3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.home-payout-body {
  flex: 1;
  min-width: 0;
}

.home-payout-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.home-payout-title.is-missed { color: #E24B4A; }

.home-payout-sub {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.home-payout-amt {
  text-align: right;
  flex-shrink: 0;
}

.home-payout-sum {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}

.home-payout-date {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 1px;
}

.home-payout-cta {
  flex-shrink: 0;
}

/* ── Bottom row ───────────────────────────────────────────── */
.home-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* Health card */
.home-health-card2 {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--panel);
}

.home-card-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted, #B0B4C0);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}

.home-health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.home-health-row.no-border { border-bottom: none; }

.home-health-lbl {
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 5px;
}

.home-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.home-badge.badge-green  { background: #E1F5EE; color: #0F6E56; }
.home-badge.badge-yellow { background: #FAEEDA; color: #854F0B; }
.home-badge.badge-red    { background: #FCEBEB; color: #A32D2D; }

/* Insight card */
.home-insight-card {
  background: #F5F5F3;
  border: 1px solid #EBEBEB;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.hi-eyebrow { color: #534AB7; }

.home-insight-text {
  font-size: 14px;
  color: #26215C;
  line-height: 1.55;
  flex: 1;
}

.home-insight-source {
  font-size: 10px;
  color: #1A1A1A;
  margin-top: 8px;
}

.home-insight-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.home-insight-dots {
  display: flex;
  gap: 5px;
}

.home-idot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #EBEBEB;
  cursor: pointer;
  transition: background .15s;
}

.home-idot.on { background: #534AB7; }
.home-idot:hover { background: #1A1A1A; }

.home-insight-nav {
  display: flex;
  gap: 5px;
}

.home-inav-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #EBEBEB;
  background: transparent;
  color: #534AB7;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}

.home-inav-btn:hover { background: #534AB7; color: #fff; border-color: #534AB7; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .home-screen { padding: 16px 14px; }
  .home-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-bottom  { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .home-metrics { grid-template-columns: 1fr; }
  .home-topbar  { flex-direction: column; align-items: flex-start; }
  .home-snowman-card { flex-direction: column; }
}



/* ============================================================
   ANNUAL PLAN SCREEN
   ============================================================ */

.annual-screen {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
}

/* ── Head ─────────────────────────────────────────────────── */
.annual-head { display: none; }

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

.annual-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.annual-tab {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all .12s;
}

.annual-tab.on {
  background: #F5F5F3;
  color: #1A1A1A;
  font-weight: 600;
}

.annual-tab:hover:not(.on) { background: var(--surface, #FAFAF8); }

.annual-add-btn {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  transition: all .12s;
  white-space: nowrap;
}

.annual-add-btn:hover { border-color: #1A1A1A; color: #1A1A1A; }

/* ── Metrics ──────────────────────────────────────────────── */
.annual-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.annual-metric-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--panel);
}

.annual-metric-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.annual-metric-help {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 9px;
  color: var(--ink-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.annual-metric-help:hover .annual-metric-tip { display: block; }
.annual-metric-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: normal;
  width: 200px;
  z-index: 100;
  pointer-events: none;
}

.annual-metric-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 4px;
}

.annual-metric-sub {
  font-size: 11px;
  color: var(--ink-soft);
}

/* YTD progress inside metric cards */
.annual-metric-card--progress { display: flex; flex-direction: column; }
.annual-ytd-block { margin-top: auto; padding-top: 10px; }
.annual-ytd-bar-wrap { margin-bottom: 5px; }
.annual-ytd-bar-bg {
  position: relative;
  height: 6px;
  background: var(--line);
  border-radius: 100px;
  overflow: hidden;
}
/* Ghost line: where we "should" be by date */
.annual-ytd-bar-year {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--line-soft, #E8E8E8);
  border-right: 2px solid var(--ink-muted);
  box-sizing: border-box;
  border-radius: 0;
  pointer-events: none;
}
/* Actual fill */
.annual-ytd-bar-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: #7F77DD;
  border-radius: 100px;
  transition: width 0.4s ease;
}
.annual-ytd-bar-fill--savings { background: #1D9E75; }
.annual-ytd-bar-fill--savings.is-over { background: #EF9F27; }
.annual-ytd-pct.is-over { color: #EF9F27; }
.annual-ytd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.annual-ytd-received {
  font-size: 11px;
  color: var(--ink-soft);
}
.annual-ytd-pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}

/* ── Body: table full-width + cards row below ─────────────── */
.annual-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  align-items: start;
}

/* ── Overview Table ───────────────────────────────────────── */
.annual-plan-table-wrap {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
}

.annual-plan-table {
  width: 100%;
  border-collapse: collapse;
}

.annual-plan-table thead th {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.annual-plan-table thead th:first-child { text-align: left; }

.annual-group-row td {
  padding: 8px 14px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted, #B0B4C0);
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--surface, #FAFAF8);
}

.annual-cat-row td { padding: 7px 14px; border-bottom: 1px solid var(--line); }
.annual-cat-row:last-child td { border-bottom: none; }
.annual-cat-row:hover td { background: var(--panel-soft); }


.annual-cat-name {
  font-size: 14px;
  color: var(--ink);
  text-align: left;
}

.annual-cat-amt {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
}

.annual-cat-pct {
  font-size: 12px;
  color: var(--ink-soft);
  text-align: right;
  min-width: 44px;
}

.annual-pocket-row td {
  padding: 9px 14px;
  background: rgba(225,245,238,.08);
  border-top: 2px solid rgba(159,225,203,.5);
  font-weight: 600;
  color: #0F6E56;
}

.annual-pocket-row .annual-cat-name { color: #0F6E56; }

/* ── Sidebar: horizontal row of cards ────────────────────── */
.annual-sidebar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
  width: 100%;
}
.annual-sidebar-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--panel);
}

.annual-sidebar-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted, #B0B4C0);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}

.annual-savings-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.annual-savings-row:last-of-type { border-bottom: none; }
.annual-savings-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.annual-savings-name {
  font-size: 13px;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.annual-savings-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  border-bottom: 1px dashed var(--line);
}
.annual-savings-value:hover { color: #7F77DD; border-bottom-color: #7F77DD; }
.annual-savings-edit {
  display: flex;
  align-items: center;
  gap: 4px;
}
.annual-savings-input {
  width: 90px;
  padding: 3px 6px;
  border: 1px solid #7F77DD;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  background: var(--panel);
  color: var(--ink);
  font-family: inherit;
  text-align: right;
}
.annual-savings-input:focus { outline: none; }
.annual-savings-save {
  background: #7F77DD;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.annual-savings-cancel {
  background: transparent;
  color: var(--ink-muted);
  border: none;
  padding: 3px 5px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.annual-savings-goal-track {
  height: 4px;
  background: var(--line);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 3px;
}
.annual-savings-goal-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.3s ease;
}
.annual-savings-goal-meta {
  font-size: 11px;
  color: var(--ink-muted);
}

.annual-asset-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.annual-asset-name {
  flex: 1;
  font-size: 13px;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.annual-asset-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.annual-asset-edit {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color .12s;
}

.annual-asset-edit:hover { color: #1A1A1A; }

.annual-asset-total {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

.annual-asset-total strong { color: var(--ink); }

.annual-empty-note {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 8px 0;
}

.annual-add-asset-btn {
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  transition: all .12s;
}

.annual-add-asset-btn:hover { border-color: #1A1A1A; color: #1A1A1A; }

/* ── Dates Tab ────────────────────────────────────────────── */
.annual-dates-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-x: auto;
  background: var(--panel);
}

.annual-dates-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.annual-dt-cat-th {
  min-width: 140px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  left: 0;
  background: var(--panel);
  z-index: 2;
}

.annual-dt-year-th {
  min-width: 90px;
  text-align: right;
  font-size: 11px;
  font-weight: 600;
  color: #1A1A1A;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.annual-dt-period-th {
  min-width: 110px;
  text-align: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.annual-dt-period-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.annual-dt-period-date {
  font-size: 11px;
  color: var(--ink);
  font-weight: 500;
  margin-top: 1px;
}

.annual-dt-period-amt {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
}

/* Period tone classes */
.annual-dt-today .annual-dt-period-label { color: #1A1A1A; }
.annual-dt-today { background: rgba(91,110,245,.04); }
.annual-dt-next { background: rgba(91,110,245,.02); }
.annual-dt-past { background: var(--surface, #FAFAF8); }
.annual-dt-past .annual-dt-period-label { color: var(--ink-soft); }

.annual-dt-distribute-btn {
  display: block;
  margin: 5px auto 0;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #EBEBEB;
  background: #F5F5F3;
  font-size: 11px;
  font-weight: 600;
  color: #1A1A1A;
  cursor: pointer;
  font-family: inherit;
  transition: all .12s;
}

.annual-dt-distribute-btn:hover { background: #534AB7; color: #fff; border-color: #534AB7; }

.annual-dt-cat-row td { border-bottom: 1px solid var(--line); }
.annual-dt-cat-row:last-child td { border-bottom: none; }
.annual-dt-cat-row:hover td { background: var(--panel-soft); }

.annual-dt-cat-name {
  font-size: 13px;
  color: var(--ink);
  padding: 7px 14px;
  position: sticky;
  left: 0;
  background: var(--panel);
  z-index: 1;
}

.annual-dt-cell {
  text-align: center;
  padding: 5px 8px;
}

.annual-dt-cell.is-done .annual-dt-val {
  color: #1D9E75;
  font-weight: 600;
}

.annual-dt-input {
  width: 90px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  background: var(--panel);
  color: var(--ink);
  outline: none;
  font-family: inherit;
  -webkit-appearance: none;
}

.annual-dt-input:focus { border-color: #1A1A1A; box-shadow: 0 0 0 2px #F5F5F3; }

.annual-dt-pocket-cell {
  font-size: 13px;
  font-weight: 600;
  color: #0F6E56;
  text-align: center;
}

.annual-dt-total {
  font-size: 13px;
  font-weight: 600;
  color: #1A1A1A;
  text-align: right;
  padding: 7px 14px;
  white-space: nowrap;
}

.annual-dt-pocket-row td {
  padding: 9px 8px;
  font-weight: 600;
  color: #0F6E56;
  background: rgba(225,245,238,.08);
  border-top: 2px solid rgba(159,225,203,.5);
}

.annual-dt-pocket-row .annual-dt-cat-name {
  color: #0F6E56;
  background: rgba(225,245,238,.08);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .annual-screen { padding: 16px 14px; }
  .annual-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .annual-body { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .annual-metrics { grid-template-columns: 1fr 1fr; }
  .annual-head { justify-content: flex-start; flex-wrap: wrap; }
}


/* ============================================================
   DISTRIBUTE MODAL
   ============================================================ */

.dist-modal-card {
  width: 560px;
  max-width: 96vw;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* ── Modal head ───────────────────────────────────────────── */
.dm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.dm-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted, #B0B4C0);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}

.dm-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 2px;
}

.dm-subtitle {
  font-size: 14px;
  color: var(--ink-soft);
}

.dm-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: color .12s;
  line-height: 1;
}

.dm-close:hover { color: var(--ink); }

/* ── Steps ────────────────────────────────────────────────── */
.dm-steps {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.dm-step {
  border-bottom: 1px solid var(--line);
}

.dm-step:last-child { border-bottom: none; }

.dm-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  cursor: pointer;
  transition: background .12s;
}

.dm-step-head:hover { background: var(--surface, #FAFAF8); }

.dm-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  flex-shrink: 0;
  transition: all .15s;
}

.dm-step-num.done {
  background: #1D9E75;
  border-color: #1D9E75;
  color: #fff;
}

.dm-step.is-open .dm-step-num {
  background: #1A1A1A;
  border-color: #1A1A1A;
  color: #fff;
}

.dm-step-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.dm-step.is-done .dm-step-title { color: var(--ink-soft); }

.dm-step-chevron {
  font-size: 11px;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.dm-step-body {
  padding: 0 24px 20px;
}

/* ── Step 1: Categories ───────────────────────────────────── */
.dm-cat-list { margin-bottom: 14px; }

.dm-cat-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.dm-cat-row:last-child { border-bottom: none; }

.dm-cat-row-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dm-cat-name {
  flex: 1;
  font-size: 14px;
  color: var(--ink);
}

.dm-cat-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dm-tracked-btn {
  all: unset;
  cursor: pointer;
  font-size: 15px;
  padding: 3px 5px;
  border-radius: 6px;
  opacity: 0.28;
  transition: opacity 0.15s, background 0.15s;
}
.dm-tracked-btn:hover { opacity: 0.6; background: var(--line-soft); }
.dm-tracked-btn.is-active { opacity: 1; background: var(--line-soft); }

.dm-cat-goal-section {
  padding: 0 0 2px 2px;
}

.dm-goal-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dm-goal-input {
  flex: 1;
  min-width: 90px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.dm-goal-input:focus { border-color: var(--ink); }
.dm-goal-edit .btn.small { min-height: 32px; padding: 0 12px; font-size: 12px; }

.dm-goal-view { display: flex; flex-direction: column; gap: 4px; }
.dm-goal-track {
  height: 3px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.dm-goal-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.dm-goal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-soft);
}
.dm-goal-btns { display: flex; gap: 2px; }

.dm-cat-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dm-cat-input {
  width: 100px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  background: var(--panel);
  color: var(--ink);
  outline: none;
  font-family: inherit;
}

.dm-cat-input:focus { border-color: #1A1A1A; box-shadow: 0 0 0 2px #F5F5F3; }

.dm-cat-pct {
  font-size: 11px;
  color: var(--ink-soft);
  min-width: 30px;
  text-align: right;
}

.dm-pocket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.dm-pocket-row strong {
  font-size: 15px;
  font-weight: 700;
  color: #1D9E75;
}

/* ── Step 2: Savings ──────────────────────────────────────── */
.dm-savings-list { margin-bottom: 14px; }

.dm-savings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.dm-savings-row:last-child { border-bottom: none; }

.dm-savings-name {
  flex: 1;
  font-size: 14px;
  color: var(--ink);
  min-width: 0;
}

.dm-savings-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.dm-savings-planned-lbl {
  font-size: 11px;
  color: var(--ink-soft);
}

.dm-savings-input {
  width: 110px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  background: var(--panel);
  color: var(--ink);
  outline: none;
  font-family: inherit;
}

.dm-savings-input:focus { border-color: #1A1A1A; box-shadow: 0 0 0 2px #F5F5F3; }

/* ── Step 3: Assets ───────────────────────────────────────── */
.dm-assets-list { margin-bottom: 14px; }

.dm-asset-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.dm-asset-row:last-child { border-bottom: none; }

.dm-asset-name {
  flex: 1;
  font-size: 14px;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-asset-input {
  width: 110px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  background: var(--panel);
  color: var(--ink);
  outline: none;
  font-family: inherit;
}

.dm-asset-input:focus { border-color: #1A1A1A; box-shadow: 0 0 0 2px #F5F5F3; }

.dm-asset-cur {
  font-size: 11px;
  color: var(--ink-soft);
  min-width: 28px;
  flex-shrink: 0;
}

/* ── Confirm / Finish buttons ─────────────────────────────── */
.dm-confirm-btn {
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  border: 1.5px solid #EBEBEB;
  background: #F5F5F3;
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  margin-top: 8px;
}

.dm-confirm-btn:hover { background: #534AB7; color: #fff; border-color: #534AB7; }

.dm-finish-copy {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 14px;
}

.dm-finish-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  background: #1D9E75;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}

.dm-finish-btn:hover { background: #178b64; }

.dm-empty-step {
  font-size: 14px;
  color: var(--ink-soft);
  padding: 12px 0;
}



/* ============================================================
   CAPITAL SCREEN
   ============================================================ */

.capital-screen {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
  box-sizing: border-box;
}

/* ── Header ───────────────────────────────────────────────── */
.cap-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted, #B0B4C0);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.cap-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
}

.cap-subtitle {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 8px;
  max-width: 580px;
}

.cap-methodology-note {
  font-size: 12px;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--border-radius-md);
  padding: 10px 14px;
  line-height: 1.6;
}

/* ── Section blocks ───────────────────────────────────────── */
.cap-section { display: flex; flex-direction: column; gap: 16px; }

.cap-section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted, #B0B4C0);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.cap-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: -8px 0 0;
}

.cap-section-sub {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-top: -4px;
}

/* ── Dynamics card ────────────────────────────────────────── */
.capital-dynamics {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cap-card-head { }

.cap-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.cap-card-sub {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.cap-dyn-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.cap-dyn-metric {
  background: var(--surface, #FAFAF8);
  border-radius: 10px;
  padding: 12px 14px;
}

.cap-dyn-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 5px;
}

.cap-dyn-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 4px;
}

.cap-dyn-hint {
  font-size: 11px;
  color: var(--ink-soft);
}

.cap-dyn-hint.pos { color: #1D9E75; }
.cap-dyn-hint.warn { color: #EF9F27; }
.cap-dyn-hint.neg { color: #E24B4A; }

.cap-chart-wrap {
  min-height: 80px;
}

.cap-chart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

.cap-chart-empty-icon { font-size: 28px; }

/* ── Tools grid ───────────────────────────────────────────── */
.cap-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.cap-tool-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cap-tool-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.cap-tool-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.cap-tool-text {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
  flex: 1;
}

.cap-tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cap-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
}

.cap-tag-green  { background: #E1F5EE; color: #0F6E56; }
.cap-tag-blue   { background: #E6F1FB; color: #1B5EA8; }
.cap-tag-yellow { background: #FAEEDA; color: #854F0B; }

/* ── Yield comparison ─────────────────────────────────────── */
.cap-yield-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  background: var(--panel);
}

.cap-yield-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.cap-yield-row.no-border { border-bottom: none; }

.cap-yield-name {
  font-size: 13px;
  color: var(--ink);
  width: 180px;
  flex-shrink: 0;
}

.cap-yield-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--line);
  border-radius: 100px;
  overflow: hidden;
}

.cap-yield-bar {
  height: 100%;
  border-radius: 100px;
  transition: width .4s;
}

.cap-yield-pct {
  width: 50px;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  flex-shrink: 0;
}

.cap-yield-note {
  width: 130px;
  font-size: 11px;
  color: var(--ink-soft);
  flex-shrink: 0;
}

/* ── Fraud block ──────────────────────────────────────────── */
.capital-fraud {
  background: #FCEBEB;
  border: 1px solid #F09595;
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cap-fraud-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.cap-fraud-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F09595;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.cap-fraud-title {
  font-size: 16px;
  font-weight: 700;
  color: #501313;
}

.cap-fraud-sub {
  font-size: 12px;
  color: #791F1F;
  margin-top: 3px;
}

.cap-fraud-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.cap-fraud-card {
  background: rgba(255,255,255,.6);
  border-radius: 10px;
  padding: 12px 14px;
}

.cap-fraud-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #501313;
  margin-bottom: 5px;
}

.cap-fraud-card-text {
  font-size: 12px;
  color: #791F1F;
  line-height: 1.55;
}

.cap-fraud-rule {
  background: rgba(255,255,255,.7);
  border-radius: 10px;
  padding: 12px 16px;
}

.cap-fraud-rule-title {
  font-size: 13px;
  font-weight: 700;
  color: #A32D2D;
  margin-bottom: 5px;
}

.cap-fraud-rule-text {
  font-size: 13px;
  color: #501313;
  line-height: 1.6;
}

/* ── When to start ────────────────────────────────────────── */
.cap-when-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.cap-when-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cap-when-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cap-when-badge-red    { background: #FCEBEB; color: #A32D2D; }
.cap-when-badge-yellow { background: #FAEEDA; color: #854F0B; }
.cap-when-badge-green  { background: #E1F5EE; color: #0F6E56; }
.cap-when-badge-purple { background: #F5F5F3; color: #1A1A1A; }

.cap-when-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.cap-when-text {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ── Empty state ──────────────────────────────────────────── */
.cap-empty-state {
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.cap-empty-icon { font-size: 36px; }

.cap-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.cap-empty-sub {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 380px;
}

.cap-empty-btn { margin-top: 6px; }

/* ── Distribution charts ──────────────────────────────────── */
.cap-dist-section { display: flex; flex-direction: column; gap: 16px; }

.cap-dist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.cap-dist-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 28px 20px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cap-dist-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-muted);
}

.cap-dist-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cap-dist-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.cap-dist-headline {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
}

.cap-dist-empty {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 20px 0;
}

/* ── Country comparison ───────────────────────────────────── */
.cap-countries-section { display: flex; flex-direction: column; gap: 14px; }

.cap-countries-list {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}

.cap-country-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.cap-country-row:last-child { border-bottom: none; }

.cap-country-flag { font-size: 18px; flex-shrink: 0; }

.cap-country-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 130px;
  flex-shrink: 0;
}

.cap-country-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.cap-country-sub {
  font-size: 11px;
  color: var(--ink-muted);
}

.cap-country-elite {
  font-size: 11px;
  color: var(--ink-soft);
  font-style: italic;
  flex: 1;
}

.cap-country-people {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.cap-person-icon {
  display: inline-block;
  width: 9px;
  height: 13px;
  border-radius: 2px;
  background: var(--line);
  flex-shrink: 0;
}

.cap-person-icon.active { background: #1A1A1A; }

.cap-country-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
  flex-shrink: 0;
  white-space: nowrap;
}

.cap-cbadge-red    { background: #FCEBEB; color: #A32D2D; }
.cap-cbadge-yellow { background: #FAEEDA; color: #854F0B; }
.cap-cbadge-blue   { background: #E6F1FB; color: #1B5EA8; }
.cap-cbadge-green  { background: #E1F5EE; color: #0F6E56; }
.cap-cbadge-purple { background: #F5F5F3; color: #1A1A1A; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .capital-screen { padding: 16px 14px; }
  .cap-tools-grid { grid-template-columns: 1fr; }
  .cap-fraud-grid { grid-template-columns: repeat(2, 1fr); }
  .cap-dyn-metrics { grid-template-columns: 1fr; }
  .cap-dist-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .cap-tools-grid { grid-template-columns: 1fr; }
  .cap-fraud-grid { grid-template-columns: 1fr; }
  .cap-when-grid { grid-template-columns: 1fr; }
  .cap-yield-name { width: 100px; font-size: 11px; }
  .cap-yield-note { display: none; }
  .cap-country-info { width: 90px; }
  .cap-country-name { font-size: 12px; }
}



/* ============================================================
   SETTINGS SCREEN
   ============================================================ */

.settings-screen {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.settings-header { margin-bottom: 4px; }

.settings-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted, #B0B4C0);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.settings-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}

.settings-subtitle {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
}

/* ── Section card ─────────────────────────────────────────── */
.settings-sec {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.settings-sec-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface, #FAFAF8);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 11px;
}

/* ── Row ──────────────────────────────────────────────────── */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}

.settings-row:last-of-type { border-bottom: none; }

.settings-row-label {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
}

.settings-row-sub {
  font-size: 11px;
  color: var(--ink-muted, #B0B4C0);
  margin-top: 2px;
  line-height: 1.4;
}

.settings-value-text {
  font-size: 13px;
  color: var(--ink-soft);
}

.settings-hint {
  font-size: 11px;
  color: var(--ink-muted, #B0B4C0);
  padding: 10px 20px;
  background: var(--surface, #FAFAF8);
  border-top: 1px solid var(--line);
  line-height: 1.55;
}

.settings-hint-link {
  color: #1A1A1A;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}

.settings-hint-link:hover { text-decoration: underline; }

/* ── Controls ─────────────────────────────────────────────── */
.settings-input {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
  color: var(--ink);
  background: var(--panel);
  outline: none;
  font-family: inherit;
  min-width: 180px;
  transition: border-color .12s;
}

.settings-input:focus { border-color: #1A1A1A; box-shadow: 0 0 0 2px #F5F5F3; }

.settings-input-day {
  width: 70px;
  min-width: unset;
  text-align: center;
}

.settings-select {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
  color: var(--ink);
  background: var(--panel);
  outline: none;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .12s;
  max-width: 280px;
}

.settings-select:focus { border-color: #1A1A1A; }

/* ── Frequency pills ──────────────────────────────────────── */
.freq-pills { display: flex; gap: 5px; }

.freq-pill {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--panel);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  font-family: inherit;
}

.freq-pill.active {
  background: #F5F5F3;
  border-color: #1A1A1A;
  color: #1A1A1A;
  font-weight: 600;
}

.freq-pill:hover:not(.active) { border-color: #EBEBEB; color: var(--ink); }

/* ── Toggle ───────────────────────────────────────────────── */
.settings-toggle {
  width: 36px;
  height: 20px;
  border-radius: 100px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
}

.settings-toggle.on { background: #1A1A1A; }

.settings-toggle::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.settings-toggle.on::after { transform: translateX(16px); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-danger {
  padding: 7px 14px;
  border-radius: 9px;
  border: 1px solid #F09595;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: #A32D2D;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: background .12s;
}

.btn-danger:hover { background: #FCEBEB; }

.btn-settings-ghost {
  padding: 7px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: background .12s;
}

.btn-settings-ghost:hover { background: var(--surface, #FAFAF8); }

/* ── Subscription section ─────────────────────────────────── */
.sub-wrapper {
  opacity: 0.55;
  pointer-events: none;
  position: relative;
}

.sub-coming-badge {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 10px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--surface, #FAFAF8);
  color: var(--ink-muted, #B0B4C0);
  border: 1px solid var(--line);
  z-index: 1;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 20px;
}

.plan-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}

.plan-card.current { border-color: #1A1A1A; background: rgba(91,110,245,.03); }

.plan-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 8px;
}

.plan-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}

.plan-price {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.plan-features {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 2px;
}

.plan-feat {
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-feat::before {
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  width: 12px;
}

.plan-feat.available { color: var(--ink); }
.plan-feat.available::before { content: '✓'; color: #1D9E75; }
.plan-feat.locked { color: var(--ink-muted, #B0B4C0); }
.plan-feat.locked::before { content: '–'; color: var(--ink-muted, #B0B4C0); }

.plan-btn-primary {
  width: 100%;
  padding: 9px;
  border-radius: 9px;
  border: none;
  background: #1A1A1A;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  font-family: inherit;
  transition: background .12s;
}

.plan-btn-primary:hover { background: #4A5CE0; }

.plan-btn-ghost {
  width: 100%;
  padding: 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 12px;
  font-family: inherit;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .settings-screen { padding: 16px 14px; }
  .plan-grid { grid-template-columns: 1fr; }
  .settings-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .settings-select { max-width: 100%; width: 100%; }
}

/* ── Change Password Modal ─────────────────────────────────── */
.change-pwd-card {
  max-width: 480px;
  width: 100%;
}
.change-pwd-card .modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 28px 8px;
}

/* ── Auth extras — forgot password link ────────────────────── */
.auth-forgot-link {
  display: block;
  background: none;
  border: none;
  padding: 0;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-muted);
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-forgot-link:hover { color: var(--ink); }

.auth-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--ink-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-link:hover { color: var(--ink); }

.auth-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 16px;
  text-align: center;
}
.auth-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #E1F5EE;
  color: #0F6E56;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink, #1a1a1a);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 9999;
}
.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Confirm Modal ──────────────────────────────────────────── */
.mf-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.mf-confirm-overlay--visible { opacity: 1; }
.mf-confirm-dialog {
  background: #fff;
  border-radius: 16px;
  padding: 24px 24px 20px;
  width: 340px;
  max-width: calc(100vw - 32px);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  transform: scale(0.96);
  transition: transform 0.18s ease;
}
.mf-confirm-overlay--visible .mf-confirm-dialog { transform: scale(1); }
.mf-confirm-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.mf-confirm-body {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 20px;
}
.mf-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.mf-confirm-cancel {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
}
.mf-confirm-cancel:hover { background: var(--surface); }
.mf-confirm-ok {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.mf-confirm-ok:hover { opacity: 0.88; }
.mf-confirm-ok--danger { background: #E24B4A; }
.mf-confirm-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.mf-confirm-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mf-confirm-field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}
.mf-confirm-field-input {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
}
.mf-confirm-field-input:focus { border-color: var(--accent, #5C6BFF); }

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 64px 24px;
  min-height: 320px;
}

.es-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 4px;
}

.es-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.es-sub {
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 360px;
  line-height: 1.55;
}

.es-btn {
  margin-top: 8px;
}

/* ── Mobile bottom nav ──────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--rail-bg);
  border-top: 1px solid var(--rail-line);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.mobile-nav .rail-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 8px;
  grid-template-columns: none;
  color: #BBBBBB;
  font-size: 10px;
  border: none;
  background: transparent;
  margin: 0;
}

.mobile-nav .rail-link.active {
  color: #1A1A1A;
  background: transparent;
  box-shadow: none;
  font-weight: 500;
}

.mobile-nav .rail-link:hover {
  transform: none;
  background: #F5F5F3;
  color: #555555;
}

.mobile-nav .rail-link-icon {
  width: 24px;
  height: 24px;
  font-size: 16px;
  background: none;
  box-shadow: none;
}

.mobile-nav-label {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

/* ── Responsive: 768px ──────────────────────────────────────── */
@media (max-width: 768px) {
  .mobile-nav {
    display: grid;
  }

  .rail {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding: 12px 12px calc(72px + env(safe-area-inset-bottom));
    gap: 12px;
  }

  .workspace-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0 12px;
  }

  .header-meta {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .available-now-card {
    flex: 1;
    min-width: 140px;
  }

  .header-income-btn {
    flex: 1;
  }

  /* Home screen */
  .home-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .home-topbar-actions {
    display: flex;
    gap: 8px;
    width: 100%;
  }

  .home-topbar-actions .home-btn-ghost,
  .home-topbar-actions .home-btn-primary {
    flex: 1;
    text-align: center;
    justify-content: center;
  }

  .home-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .home-snowman-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .home-bottom {
    grid-template-columns: 1fr;
  }

  /* Annual screen */
  .annual-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .annual-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .annual-body {
    flex-direction: column;
  }

  .annual-sidebar {
    grid-template-columns: 1fr;
  }

  /* Capital screen */
  .cap-kpi-row {
    grid-template-columns: 1fr 1fr;
  }

  /* Distribute modal */
  .dist-modal-card {
    max-height: 95vh;
    border-radius: 20px 20px 0 0;
    margin: auto 0 0;
  }

  /* Onboarding modal — handled by 600px fullscreen rule */

  /* Settings */
  .setting-list {
    gap: 12px;
  }
}

/* ── Responsive: Confirm modal full-width on mobile ─────────── */
@media (max-width: 480px) {
  .mf-confirm-dialog {
    width: calc(100vw - 24px);
    max-height: 85vh;
    padding: 20px 16px 16px;
    border-radius: 14px;
  }
}

/* ── Responsive: 480px ──────────────────────────────────────── */
@media (max-width: 480px) {
  .modal-backdrop {
    display: block !important;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    padding: 0;
  }
  .modal-backdrop.is-open {
    display: block !important;
  }
  .modal-card {
    max-height: none;
    border-radius: 20px 20px 0 0;
    margin: 40px 0 0;
    width: 100%;
    flex-shrink: 0;
  }
  .modal-card .modal-body {
    overflow-y: visible;
    max-height: none;
  }

  .home-metrics {
    grid-template-columns: 1fr;
  }

  .annual-metrics {
    grid-template-columns: 1fr;
  }

  .cap-kpi-row {
    grid-template-columns: 1fr;
  }

  .home-payout-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .home-payout-amt {
    width: 100%;
  }

  .home-payout-cta {
    width: 100%;
    justify-content: center;
  }

  .annual-plan-table-wrap {
    overflow-x: auto;
  }

  .modal-card {
    border-radius: 20px 20px 0 0;
    margin: auto 0 0;
  }
}


/* ── Setup step: pocket label bold, min-4 hint, payout days ───── */
.ob-tile-pocket .ob-pocket-label {
  font-weight: 600;
  color: var(--ink);
}
.ob-min4-hint {
  font-size: 12px;
  color: var(--ink-muted);
  padding: 6px 0 2px;
  text-align: center;
  transition: color .2s;
}
.ob-min4-hint.ob-min4-ok {
  color: #22c55e;
  font-weight: 500;
}
.ob-payout-days {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ob-payout-days-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ob-payout-day-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ob-payout-day-label {
  font-size: 12px;
  color: var(--ink-soft);
}
.ob-payout-day-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink);
  background: var(--white, #fff);
  text-align: right;
}
.ob-payout-day-input:focus {
  outline: none;
  border-color: var(--accent, #1A1A1A);
}

/* ── Distribution step: hint text, label wrap, clear button ─────── */
.dist-step-hint {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 12px;
  line-height: 1.5;
}
.dist-r1-label-wrap {
  white-space: normal;
  line-height: 1.4;
  max-width: 120px;
}
.dist-income-input,
.dist-amount-input {
  text-align: right;
}
#dist-income-input {
  text-align: right;
}
.dist-clear-row {
  margin-top: 8px;
}
.dist-clear-btn {
  display: inline-block;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.dist-clear-btn:hover {
  border-color: var(--accent, #1A1A1A);
  color: var(--accent, #1A1A1A);
}

/* ── Finish step: snowman block + checklist ─────────────────────── */
.ob-finish {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
}
.finish-snowman-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.finish-snowman {
  width: 72px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.finish-snowman svg { display: block; }
.finish-snowman-badge {
  background: #E1F5EE;
  color: #0F6E56;
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 500;
}
.finish-snowman-text {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 340px;
  margin: 0 auto;
  text-align: center;
}
.finish-checklist {
  background: var(--white, #fff);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.finish-checklist-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}
.finish-cl-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--line);
  cursor: pointer;
}
.finish-cl-item:last-child { border-bottom: none; }
.finish-cl-done { cursor: default; }
.finish-cl-item:not(.finish-cl-done):hover .cl-check.todo {
  border-color: #1A1A1A;
}
.cl-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cl-check.done {
  background: #1D9E75;
}
.cl-check.todo {
  border: 1.5px solid var(--line);
  transition: border-color .15s;
}
.cl-content {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.cl-main {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
}
.cl-main.done-text {
  color: var(--ink-muted);
  text-decoration: line-through;
}
.finish-cl-done .cl-main {
  color: var(--ink-muted);
  text-decoration: line-through;
}
.cl-sub {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.cl-badge-done {
  background: #E1F5EE;
  color: #0F6E56;
  border-radius: 100px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}
.finish-cl-btn {
  font-size: 11px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.finish-cl-btn:hover {
  border-color: var(--accent, #1A1A1A);
  color: var(--accent, #1A1A1A);
}
.finish-footer {
  display: flex;
  gap: 8px;
}
.finish-cta-btn {
  flex: 1;
}

/* ── Home: restart onboarding link ─────────────────────────────── */
.home-restart-ob-link {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: transparent;
  border: none;
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
  cursor: pointer;
  padding: 4px 0;
}
.home-restart-ob-link:hover {
  color: var(--accent, #1A1A1A);
  text-decoration: underline;
}

/* ── Home: VIP snowman decoration ──────────────────────────────── */
.home-snowman-vip {
  position: relative;
}
.home-snowman-vip::after {
  content: '★';
  position: absolute;
  top: -4px;
  right: -6px;
  font-size: 11px;
  color: #F6C344;
  line-height: 1;
}

/* ── Home: tasks block ──────────────────────────────────────────── */
.home-tasks-block {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #E8EAF0);
  border-radius: 12px;
  padding: 14px 16px 8px;
  margin-bottom: 12px;
}
.home-task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border, #E8EAF0);
}
.home-task-item:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}
.home-task-text {
  flex: 1;
  min-width: 0;
}
.home-task-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}
.home-task-sub {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 1px;
}
.home-task-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.home-task-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent, #1A1A1A);
  background: color-mix(in srgb, var(--accent, #1A1A1A) 8%, transparent);
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.home-task-btn:hover {
  background: color-mix(in srgb, var(--accent, #1A1A1A) 14%, transparent);
}
.home-task-dismiss {
  font-size: 11px;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 5px;
  line-height: 1;
  opacity: 0.5;
}
.home-task-dismiss:hover {
  opacity: 1;
}

/* ── Home: health card free capital row ─────────────────────────── */
.home-health-row .home-metric-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--ink-muted);
  font-size: 9px;
  color: var(--ink-muted);
  cursor: default;
  position: relative;
  vertical-align: middle;
  margin-left: 4px;
}
.home-health-row .home-metric-tip {
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  right: unset;
  top: unset;
}

/* ── Annual plan: table header with "Изменить распределение" ── */
.annual-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.annual-table-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted, #B0B4C0);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.annual-edit-dist-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent, #1A1A1A);
  background: color-mix(in srgb, var(--accent, #1A1A1A) 8%, transparent);
  border: none;
  border-radius: 7px;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.annual-edit-dist-btn:hover {
  background: color-mix(in srgb, var(--accent, #1A1A1A) 14%, transparent);
}

/* ── Annual plan: debt sidebar card ─────────────────────────── */
.annual-debt-card { }
.annual-debt-value { color: #C0392B !important; }

/* ── Annual plan: tracked-balance marker ─────────────────────── */
.annual-tracked-mark {
  position: relative;
  display: inline-block;
  margin-left: 5px;
  font-size: 12px;
  cursor: default;
  vertical-align: middle;
  opacity: 0.7;
}

/* ── Asset editor: reserve checkbox ─────────────────────────── */
.asset-reserve-row {
  margin: 12px 0 4px;
}
.asset-reserve-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
}
.asset-reserve-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent, #1A1A1A);
  cursor: pointer;
  flex-shrink: 0;
}
.asset-reserve-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--ink-muted);
  font-size: 10px;
  color: var(--ink-muted);
  cursor: default;
  position: relative;
  flex-shrink: 0;
  margin-top: 1px;
}
.asset-reserve-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: var(--ink, #1B1D23);
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: normal;
  width: 260px;
  z-index: 200;
  pointer-events: none;
}
.asset-reserve-help:hover .asset-reserve-tip { display: block; }

/* ── Distribution editor modal ───────────────────────────────── */
.dist-editor-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}
.dist-editor-modal {
  background: var(--panel, #fff);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
  width: 680px;
  max-width: 96vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dist-income-display {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 0;
}
.dist-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--line, #E8EAF0);
}
.dist-editor-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 2px;
}
.dist-editor-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.dist-editor-close {
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}
.dist-editor-income-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--surface, #FAFAF8);
  font-size: 13px;
  border-bottom: 1px solid var(--line, #E8EAF0);
  flex-wrap: wrap;
}
.dist-editor-income-lbl { color: var(--ink-muted); }
.dist-editor-income-val { color: var(--ink); }
.dist-editor-pocket-lbl { color: var(--ink-muted); margin-left: auto; }
.dist-editor-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px;
}

/* Override dist-row1 height/overflow for the modal context */
.dist-editor-body .dist-row1 {
  height: auto;
  overflow-x: auto; /* allow horizontal scroll when 4 payouts exceed modal width */
}
.dist-editor-body .dist-pi-col {
  padding: 10px 14px;
  border-right: 1px solid var(--line);
}
.dist-editor-body .dist-pi-col:last-child {
  border-right: none;
}
.dist-editor-body .dist-income-display {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  padding: 0;
}
.dist-editor-body .dist-pi-inp {
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  text-align: left;
}
.dist-editor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line, #E8EAF0);
}
.dist-editor-row:last-child { border-bottom: none; }
.dist-editor-cat-name {
  font-size: 13px;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dist-editor-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.dist-editor-input {
  width: 110px;
  padding: 5px 9px;
  border: 1px solid var(--line, #E8EAF0);
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  text-align: right;
  background: var(--panel, #fff);
  color: var(--ink);
}
.dist-editor-input:focus { border-color: var(--accent, #1A1A1A); outline: none; }
.dist-editor-pct {
  font-size: 11px;
  color: var(--ink-muted);
  width: 32px;
  text-align: right;
}
.dist-editor-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid var(--line, #E8EAF0);
}
.dist-editor-cancel {
  background: transparent;
  border: 1px solid var(--line, #E8EAF0);
  border-radius: 9px;
  padding: 8px 16px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink-soft);
  cursor: pointer;
}
.dist-editor-save {
  padding: 8px 20px;
  font-size: 13px;
  font-family: inherit;
}

/* ══════════════════════════════════════════════════════════════
   Block 3: Snowman Explain Modal
   ══════════════════════════════════════════════════════════════ */
.snowman-explain-card {
  max-width: 520px;
  width: 100%;
}
.snex-rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
.snex-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line, #E8EAF0);
}
.snex-row:last-child { border-bottom: none; }
.snex-row-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}
.snex-row-content { flex: 1; }
.snex-row-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}
.snex-row-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.snex-scale {
  background: var(--surface, #FAFAF8);
  border-radius: var(--border-radius-md, 12px);
  padding: 14px 16px;
}
.snex-scale-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 10px;
  font-weight: 600;
}
.snex-scale-track {
  display: flex;
  gap: 0;
  align-items: stretch;
}
.snex-scale-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border-radius: 8px;
}
.snex-scale-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}
.snex-scale-text {
  font-size: 11px;
  color: var(--ink-soft);
  text-align: center;
}
.snex-scale-red .snex-scale-dot    { background: #E24B4A; }
.snex-scale-orange .snex-scale-dot { background: #EF9F27; }
.snex-scale-yellow .snex-scale-dot { background: #F5C842; }
.snex-scale-green .snex-scale-dot  { background: #1D9E75; }

/* ══════════════════════════════════════════════════════════════
   Block 4: Home snowman explain button
   ══════════════════════════════════════════════════════════════ */
.home-snowman-explain-btn {
  background: none;
  border: none;
  padding: 0;
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent, #1A1A1A);
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.8;
  display: inline-block;
}
.home-snowman-explain-btn:hover { opacity: 1; }

/* ══════════════════════════════════════════════════════════════
   Block 5: Budget assets panel — larger headers & styled buttons
   ══════════════════════════════════════════════════════════════ */
.year-plan-assets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--line, #E8EAF0);
}
.year-plan-assets-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.year-plan-assets-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
.year-plan-assets-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.year-plan-assets-sub {
  font-size: 12px;
  color: var(--ink-muted);
}
.year-plan-assets-add-btn {
  flex-shrink: 0;
  font-size: 13px;
  padding: 7px 14px;
}
.year-plan-assets-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  color: var(--ink-muted);
  font-size: 13px;
}
.year-plan-assets-empty-icon { font-size: 20px; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════
   Block 6: Analytics country block — larger fonts
   ══════════════════════════════════════════════════════════════ */
.cap-country-flag {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.cap-country-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.cap-country-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.cap-country-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line, #E8EAF0);
}
.cap-country-row:last-child { border-bottom: none; }

/* ══════════════════════════════════════════════════════════════
   Block 7: Savings goals
   ══════════════════════════════════════════════════════════════ */
.cap-goals-section {
  background: var(--panel, #fff);
  border: 1px solid var(--line, #E8EAF0);
  border-radius: var(--border-radius-md, 12px);
  margin-top: 20px;
  overflow: hidden;
}
.cap-goals-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line, #E8EAF0);
}
.cap-goals-add-btn {
  font-size: 13px;
  padding: 7px 14px;
  flex-shrink: 0;
  margin-top: 2px;
}
.cap-goals-empty {
  padding: 20px;
  color: var(--ink-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cap-goals-list {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cap-goal-card {
  background: var(--surface, #FAFAF8);
  border-radius: 10px;
  padding: 14px;
}
.cap-goal-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.cap-goal-name-input {
  flex: 1;
  border: 1px solid var(--line, #E8EAF0);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--panel, #fff);
  font-family: inherit;
}
.cap-goal-name-input:focus { border-color: var(--accent, #1A1A1A); outline: none; }
.cap-goal-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-muted);
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0;
}
.cap-goal-delete:hover { background: #FCEBEB; color: #A32D2D; }
.cap-goal-card-fields {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}
.cap-goal-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cap-goal-input {
  border: 1px solid var(--line, #E8EAF0);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--ink);
  background: var(--panel, #fff);
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}
.cap-goal-input:focus { border-color: var(--accent, #1A1A1A); outline: none; }
.cap-goal-date-input { font-size: 12px; }
.cap-goal-progress-track {
  height: 6px;
  background: var(--line, #E8EAF0);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.cap-goal-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.cap-goal-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-muted);
}
.cap-goal-pct { font-weight: 600; color: var(--ink-soft); }
.cap-goal-pct.done { color: #1D9E75; }

/* ════════════════════════════════════
   EDUCATION SCREEN — новый дизайн
════════════════════════════════════ */

.edu-screen {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Общие заголовки блоков */
.edu-block-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.edu-block-sub {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-top: 6px;
}

/* ── Методика: аккордеон ── */
.edu-method-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.edu-method-hd {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.edu-method-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
}

.edu-method-sub {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Шаг */
.edu-step-item {
  border-bottom: 1px solid var(--line-soft);
}
.edu-step-item:last-child { border-bottom: none; }

.edu-step-trigger {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}
.edu-step-trigger:hover { background: var(--panel-soft); }
.edu-step-item.open .edu-step-trigger { background: var(--panel-soft); }

.edu-step-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #F0EFFD;
  color: #7F77DD;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.edu-step-item.open .edu-step-num {
  background: #7F77DD;
  color: #fff;
}

.edu-step-trigger-text { flex: 1; min-width: 0; }
.edu-step-name   { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.edu-step-teaser { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.edu-step-item.open .edu-step-teaser { display: none; }

.edu-step-chevron {
  font-size: 12px; color: var(--ink-muted);
  transition: transform 0.2s; flex-shrink: 0;
}
.edu-step-item.open .edu-step-chevron {
  transform: rotate(180deg);
  color: #7F77DD;
}

/* Тело шага */
.edu-step-body {
  display: none;
  padding: 0 28px 24px 78px; /* 28 + 34(num) + 16(gap) = 78 */
}
.edu-step-item.open .edu-step-body { display: block; }

.edu-step-text {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 14px;
}
.edu-step-text p + p { margin-top: 9px; }

.edu-step-example {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #F7F6FE;
  border-left: 3px solid #7F77DD;
  border-radius: 0 10px 10px 0;
  padding: 11px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #444;
  line-height: 1.55;
}
.edu-step-example strong { color: var(--ink); }
.edu-step-example-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }

.edu-step-tip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-muted);
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 12px;
  color: var(--ink-soft);
}

/* ── Привычка ── */
.edu-habit-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.edu-habit-hd     { padding: 24px 28px 0; }
.edu-habit-intro  { font-size: 13px; color: var(--ink-soft); line-height: 1.65; padding: 12px 28px 20px; }

.edu-streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F0EFFD;
  border-radius: 20px;
  padding: 4px 13px;
  font-size: 12px; font-weight: 600; color: #7F77DD;
  margin: 14px 28px 0;
}

/* Горизонтальный таймлайн */
.edu-habit-timeline {
  padding: 8px 28px 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.edu-habit-timeline::before {
  content: '';
  position: absolute;
  top: 22px;
  left: calc(28px + 14px);
  right: calc(28px + 14px);
  height: 2px;
  background: var(--line);
  z-index: 0;
}

.ht-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 6px;
  position: relative;
  z-index: 1;
}

/* Прогресс-линия между выполненными */
.ht-item.is-done::before {
  content: '';
  position: absolute;
  top: 13px;
  left: 50%; right: -50%;
  height: 2px;
  background: #1D9E75;
  z-index: 0;
}
.ht-item.is-done:last-child::before { display: none; }

.ht-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--panel-muted);
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
  margin-bottom: 10px;
  position: relative; z-index: 1;
}
.ht-item.is-done .ht-dot { background: #E1F5EE; border-color: #1D9E75; }
.ht-item.is-now  .ht-dot { background: #7F77DD; border-color: #7F77DD; color: #fff; }

.ht-label { font-size: 12px; font-weight: 600; color: #BBBBBB; margin-bottom: 4px; line-height: 1.3; }
.ht-item.is-done .ht-label { color: #1D9E75; }
.ht-item.is-now  .ht-label { color: #7F77DD; }

.ht-desc { font-size: 11px; color: #BBBBBB; line-height: 1.5; }
.ht-item.is-done .ht-desc,
.ht-item.is-now  .ht-desc { color: var(--ink-soft); }

.ht-meta { font-size: 11px; margin-top: 4px; color: #CCCCCC; }
.ht-item.is-done .ht-meta { color: #1D9E75; }
.ht-item.is-now  .ht-meta { color: #9993E8; }

.edu-habit-note {
  margin: 0 28px 24px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ── FAQ ── */
.edu-faq-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.edu-faq-hd {
  padding: 20px 28px 18px;
  border-bottom: 1px solid var(--line);
}

.edu-faq-list { }

.edu-faq-item { border-bottom: 1px solid var(--line-soft); }
.edu-faq-item:last-child { border-bottom: none; }

.edu-faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  cursor: pointer;
  font-size: 14px; font-weight: 500;
  color: var(--ink);
  gap: 12px; user-select: none;
  transition: background 0.12s;
}
.edu-faq-q:hover { background: var(--panel-soft); }

.edu-faq-arr {
  font-size: 11px;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: transform 0.18s;
}
.edu-faq-item.open .edu-faq-arr { transform: rotate(180deg); }

.edu-faq-a {
  display: none;
  padding: 0 28px 16px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.65;
}
.edu-faq-item.open .edu-faq-a { display: block; }

/* Мобильный */
@media (max-width: 640px) {
  .edu-method-hd,
  .edu-habit-hd  { padding-left: 16px; padding-right: 16px; }

  .edu-step-trigger { padding: 14px 16px; }
  .edu-step-body    { padding-left: 66px; padding-right: 16px; }

  .edu-streak-pill,
  .edu-habit-intro,
  .edu-habit-timeline,
  .edu-habit-note { padding-left: 16px; padding-right: 16px; }

  .edu-habit-timeline {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .edu-habit-timeline::before { display: none; }
  .ht-item.is-done::before    { display: none; }

  .edu-faq-q,
  .edu-faq-a,
  .edu-faq-hd { padding-left: 16px; padding-right: 16px; }
}

/* ══════════════════════════════════════════════════════════════
   Block 9: Enhanced toast types
   ══════════════════════════════════════════════════════════════ */
.toast--success { background: #1D9E75 !important; }
.toast--error   { background: #E24B4A !important; }
.toast--warning { background: #EF9F27 !important; }

/* ══════════════════════════════════════════════════════════════
   Block 10: Transaction analysis placeholder card
   ══════════════════════════════════════════════════════════════ */
.cap-placeholder-card {
  background: var(--panel, #fff);
  border: 1px solid var(--line, #E8EAF0);
  border-radius: var(--border-radius-md, 12px);
  padding: 18px 20px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cap-placeholder-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.cap-placeholder-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}
.cap-placeholder-icon { font-size: 24px; flex-shrink: 0; }
.cap-placeholder-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}
.cap-placeholder-sub {
  font-size: 12px;
  color: var(--ink-muted);
}
.cap-placeholder-badge {
  background: var(--surface, #FAFAF8);
  border: 1px solid var(--line, #E8EAF0);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  flex-shrink: 0;
  white-space: nowrap;
}
.cap-placeholder-btn {
  flex-shrink: 0;
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── ПРАВКА 1: goal-section in detail panel ── */
.goal-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.goal-section-label { font-size: 12px; font-weight: 600; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.goal-badge-optional { font-size: 10px; font-weight: 400; color: var(--ink-muted); background: var(--panel-muted); padding: 1px 6px; border-radius: 10px; }

/* ── ПРАВКА 1: home goals mini-list ── */
.home-goals-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.home-goal-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.home-goal-name { font-size: 11px; color: var(--ink-soft); }
.home-goal-pct { font-size: 11px; color: var(--ink-muted); text-align: right; }
.home-goal-bar { grid-column: span 2; height: 3px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.home-goal-fill { height: 100%; background: #1D9E75; border-radius: 2px; transition: width 0.4s ease; }
.home-goal-more { font-size: 11px; color: var(--ink-muted); margin-top: 2px; }

/* ── ПРАВКА 4: home todo block ── */
.home-todo-block { background: var(--panel-soft); border-radius: 16px; padding: 16px; border: 1px solid var(--line); }
.home-todo-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.home-todo-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.home-todo-progress { font-size: 12px; color: var(--ink-muted); }
.home-todo-list { display: flex; flex-direction: column; gap: 2px; }
.home-todo-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 8px; border-radius: 10px; cursor: pointer; transition: background 0.15s; }
.home-todo-item:hover:not(.is-done) { background: var(--panel-muted); }
.home-todo-item.is-done { opacity: 0.5; cursor: default; }
.home-todo-check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); flex-shrink: 0; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.home-todo-check.done { background: #1D9E75; border-color: #1D9E75; }
.home-todo-text { flex: 1; min-width: 0; }
.home-todo-label { font-size: 13px; color: var(--ink); line-height: 1.4; }
.home-todo-label.done-label { text-decoration: line-through; color: var(--ink-muted); }
.home-todo-sub { font-size: 11px; color: var(--ink-muted); margin-top: 2px; }
.home-todo-arrow { font-size: 14px; color: var(--ink-muted); flex-shrink: 0; align-self: center; }

/* ── ПРАВКА 5: home topbar right + add income btn ── */
.home-topbar { display: flex; justify-content: space-between; align-items: flex-start; }
.home-topbar-right { display: flex; align-items: center; }
.home-add-income-btn { font-size: 12px; padding: 6px 12px; white-space: nowrap; }

/* ── ПРАВКА 6: profile step redesign ── */
.ob-profile { display: flex; flex-direction: column; gap: 16px; }
.ob-profile-hero { text-align: center; padding: 4px 0 8px; }
.ob-profile-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.ob-profile-title { font-size: 26px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.ob-profile-desc { font-size: 13px; color: var(--ink-soft); margin: 8px 0 0; line-height: 1.5; }
.ob-profile-cta-hint { font-size: 12px; color: var(--ink-muted); text-align: center; margin: 4px 0 0; }
.badge-blue   { background: #E3EFFE; color: #3B82F6; }
.badge-purple { background: #F5F5F3; color: #555555; }
.badge-green  { background: #E1F5EE; color: #1D9E75; }

/* ── ПРАВКА 7: finish step compact ── */
.ob-finish { display: flex; flex-direction: column; height: 100%; gap: 12px; }
.finish-snowman-block--compact { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; }
.finish-snowman-block--compact .finish-snowman svg { width: 56px; height: 68px; }
.finish-snowman-tagline { font-size: 13px; color: var(--ink-soft); text-align: center; margin: 0; max-width: 260px; }
.finish-checklist--compact .finish-cl-item { padding: 9px 0; }
.finish-footer--sticky { margin-top: auto; padding-top: 12px; position: sticky; bottom: 0; background: var(--panel); }

/* ── ПРАВКА 2: education screen redesign ── */
.edu-level-block { background: var(--panel-soft); border-radius: 14px; padding: 16px; margin-bottom: 20px; }
.edu-level-label { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.edu-level-bar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.edu-level-track { height: 4px; background: var(--line); border-radius: 100px; overflow: hidden; }
.edu-level-fill { height: 100%; background: #7F77DD; border-radius: 100px; transition: width 0.4s ease; }
.edu-level-labels { display: flex; justify-content: space-between; }
.edu-level-labels span { font-size: 11px; color: var(--ink-muted); }
.edu-level-labels span.active { color: var(--ink); font-weight: 600; }
.edu-level-desc { font-size: 12px; color: var(--ink-muted); margin-top: 4px; }
.edu-cards-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.edu-pill-card { background: var(--panel-soft); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); }
.edu-pill-num { width: 28px; height: 28px; border-radius: 50%; background: #7F77DD; color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.edu-pill-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.edu-pill-text { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 640px) { .edu-cards-row { grid-template-columns: 1fr; } }
.goal-section input { width: 100%; margin-top: 6px; }

/* ── Roadmap Screen ─────────────────────────────────────────────────────────── */
#roadmap-view { max-width: 680px; padding-bottom: 48px; }

.rm-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 20px;
  width: fit-content;
}
.rm-tab {
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all .12s;
}
.rm-tab.on { background: #F5F5F3; color: #1A1A1A; font-weight: 600; }
.rm-tab:hover:not(.on) { background: var(--surface, #FAFAF8); }

.rm-list { display: flex; flex-direction: column; gap: 10px; }

.rm-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  transition: box-shadow .12s;
}
.rm-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }

.rm-card-body { flex: 1; min-width: 0; }
.rm-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rm-card-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

.rm-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: .02em;
  flex-shrink: 0;
}
.rm-badge--wip  { background: #FFF3D0; color: #9A6500; }
.rm-badge--done { background: #E3F5EA; color: #1A7A3A; }

.rm-votes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.rm-vote-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  transition: all .12s;
  font-family: inherit;
}
.rm-vote-btn:hover { background: var(--surface); color: var(--ink); }
.rm-vote-btn.active { background: var(--accent, #7F77DD); border-color: var(--accent, #7F77DD); color: #fff; }
.rm-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  min-width: 20px;
  text-align: center;
  line-height: 1;
}
.rm-score.pos { color: #1A7A3A; }
.rm-score.neg { color: #C0392B; }

.rm-empty { color: var(--ink-soft); font-size: 14px; padding: 24px 0; }

.rm-propose {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.rm-propose-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 12px;
}
.rm-propose-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--card, #fff);
  resize: vertical;
  min-height: 72px;
  transition: border-color .12s;
  outline: none;
}
.rm-propose-input:focus { border-color: var(--accent, #7F77DD); }
.rm-propose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 12px;
}
.rm-char-count { font-size: 12px; color: var(--ink-soft); }
.rm-propose-btn {
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  background: var(--accent, #7F77DD);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .12s;
}
.rm-propose-btn:disabled { opacity: .4; cursor: default; }
.rm-propose-btn:not(:disabled):hover { opacity: .85; }

