:root {
  color-scheme: dark;
  --bg: #000402;
  --bg-soft: #07100b;
  --panel: #111716;
  --panel-2: #151d1c;
  --panel-3: #1a2321;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(88, 235, 83, 0.42);
  --text: #f7fbf7;
  --muted: #a3aea8;
  --faint: #6f7b75;
  --green: #55e34f;
  --green-2: #1ca33a;
  --blue: #2997ff;
  --cyan: #28d0d4;
  --amber: #ff941f;
  --red: #ff504d;
  --radius: 8px;
  --radius-soft: 14px;
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  min-width: 0;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

body {
  min-height: 100svh;
  overflow-x: hidden;
  scroll-padding-bottom: calc(env(safe-area-inset-bottom) + 132px);
}

body:not(.has-data) .icon-button,
body:not(.has-data) .bottom-nav {
  display: none;
}

.app-shell {
  position: relative;
  min-height: 100svh;
  padding: calc(env(safe-area-inset-top) + 20px) 16px calc(env(safe-area-inset-bottom) + 112px);
  background:
    radial-gradient(900px 460px at 70% -10%, rgba(86, 227, 79, 0.12), transparent 56%),
    radial-gradient(560px 320px at 18% 16%, rgba(41, 151, 255, 0.055), transparent 62%),
    linear-gradient(180deg, #010504 0%, var(--bg) 100%);
}

.app-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: -6px -2px 22px;
  padding: 8px 0;
  background: linear-gradient(180deg, rgba(0, 4, 2, 0.98), rgba(0, 4, 2, 0.82) 72%, transparent);
  backdrop-filter: blur(16px);
}

body:not(.has-data) .app-top {
  grid-template-columns: 1fr auto;
}

body:not(.has-data) .brand-lockup {
  justify-self: start;
}

.processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0, 4, 2, 0.72);
  backdrop-filter: blur(18px);
}

.processing-overlay.is-active {
  display: grid;
}

.processing-overlay div {
  display: grid;
  width: min(280px, 100%);
  min-height: 188px;
  place-items: center;
  gap: 10px;
  border: 1px solid rgba(85, 227, 79, 0.34);
  border-radius: 8px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(15, 27, 22, 0.98), rgba(6, 12, 10, 0.98));
  text-align: center;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

.processing-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: fis-spin 0.9s linear infinite;
}

.processing-overlay strong {
  font-size: 1.02rem;
}

.processing-overlay small {
  color: var(--muted);
  font-weight: 720;
}

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

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: linear-gradient(145deg, #181f1f, #0d1110);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.icon-button img,
.asset-icon img,
.brand-mark img,
.file-icon img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(90%);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 8px;
  min-width: 0;
}

.brand-lockup strong {
  font-size: 1.56rem;
  line-height: 1;
  white-space: nowrap;
}

.brand-lockup strong span {
  color: var(--green);
}

.brand-mark {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--green);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 22px rgba(86, 227, 79, 0.26);
}

.brand-mark img {
  width: 20px;
  height: 20px;
  filter: brightness(0) saturate(100%) invert(79%) sepia(95%) saturate(612%) hue-rotate(56deg) brightness(98%) contrast(91%);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-width: 2px;
  border: 2px solid var(--green);
  border-radius: 6px;
  opacity: 0.18;
}

.local-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 750;
}

.local-badge i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  padding-bottom: 12px;
}

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

.intro-panel,
.file-card,
.preview-stack article,
.balance-card,
.metric-grid article,
.panel,
.notice,
.detail-card,
.table-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-soft);
  background: linear-gradient(145deg, rgba(25, 33, 31, 0.96), rgba(12, 17, 15, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.intro-panel {
  margin-bottom: 14px;
  padding: 18px;
}

.intro-panel p,
.preview-stack span,
.file-card small,
.card-label-row span,
.card-label-row small,
.metric-grid p,
.metric-grid small,
.detail-header span,
.detail-card small,
.empty-copy,
.row-list small,
.data-row span,
.chart-legend,
.forecast-row span {
  color: var(--muted);
}

.intro-panel p {
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 850;
}

.intro-panel h1 {
  margin-bottom: 12px;
  font-size: 2.62rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.intro-panel span {
  color: var(--green);
  font-weight: 760;
}

.file-card {
  display: grid;
  min-height: 188px;
  place-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 22px;
  text-align: center;
  cursor: pointer;
}

.file-card.is-dragging,
.file-card:focus-within,
.file-card:hover {
  border-color: var(--line-strong);
  background: linear-gradient(145deg, rgba(28, 163, 58, 0.16), rgba(12, 17, 15, 0.96));
}

.file-icon {
  position: relative;
  display: grid;
  width: 48px;
  height: 58px;
  place-items: center;
  border: 2px solid var(--green);
  border-radius: 8px;
}

.file-icon img {
  width: 28px;
  height: 28px;
  filter: brightness(0) saturate(100%) invert(79%) sepia(95%) saturate(612%) hue-rotate(56deg) brightness(98%) contrast(91%);
}

.file-card strong,
.file-card small {
  display: block;
}

.preview-stack {
  display: grid;
  gap: 10px;
}

.preview-stack article {
  padding: 16px;
}

.preview-stack span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 850;
}

.preview-stack strong {
  display: block;
  font-size: 1rem;
  line-height: 1.32;
}

.notice {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-color: rgba(255, 148, 31, 0.42);
  color: #ffd8ad;
  font-size: 0.88rem;
  line-height: 1.35;
}

.balance-card {
  position: relative;
  margin-bottom: 14px;
  padding: 20px 20px 18px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 82% 72%, rgba(85, 227, 79, 0.13), transparent 34%),
    linear-gradient(140deg, rgba(47, 176, 50, 0.16), rgba(7, 16, 11, 0.7) 54%),
    var(--panel);
}

.balance-card > *:not(.sparkline) {
  position: relative;
  z-index: 2;
}

.card-label-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-label-row span {
  font-weight: 760;
}

.balance-card > strong {
  display: block;
  margin-bottom: 10px;
  color: var(--green);
  font-size: 2.72rem;
  line-height: 0.95;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.cash-health-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 100%;
  gap: 8px;
}

.delta-pill {
  display: grid;
  align-content: center;
  max-width: 100%;
  min-height: 54px;
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(86, 227, 79, 0.13);
  color: var(--green);
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.delta-pill span,
.after-regulars span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
}

.delta-pill strong,
.after-regulars strong {
  display: block;
  color: inherit;
  font-size: 0.9rem;
  line-height: 1.08;
  white-space: nowrap;
}

.delta-pill.is-negative {
  background: rgba(255, 80, 77, 0.13);
  color: #ff8582;
}

.sparkline {
  position: relative;
  height: 124px;
  margin: 10px 0 12px;
  z-index: 1;
  opacity: 0.9;
}

.sparkline svg,
.line-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

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

.metric-grid article {
  display: grid;
  min-height: 82px;
  align-content: center;
  justify-items: center;
  padding: 12px 8px;
  text-align: center;
}

.metric-grid article:nth-child(3) {
  grid-column: auto;
}

.metric-icon {
  display: none;
}

.metric-grid article:nth-child(1) {
  border-color: rgba(85, 227, 79, 0.32);
  background: linear-gradient(145deg, rgba(85, 227, 79, 0.18), rgba(10, 18, 14, 0.96));
}

.metric-grid article:nth-child(2) {
  border-color: rgba(41, 151, 255, 0.34);
  background: linear-gradient(145deg, rgba(41, 151, 255, 0.17), rgba(10, 17, 20, 0.96));
}

.metric-grid article:nth-child(3) {
  border-color: rgba(255, 148, 31, 0.34);
  background: linear-gradient(145deg, rgba(255, 148, 31, 0.17), rgba(20, 16, 10, 0.96));
}

.metric-icon img {
  width: 22px;
  height: 22px;
  filter: brightness(0) saturate(100%) invert(2%) sepia(13%) saturate(1214%) hue-rotate(88deg) brightness(98%) contrast(104%);
}

.metric-grid p {
  margin-bottom: 7px;
  font-size: 0.82rem;
  font-weight: 780;
}

.metric-grid strong {
  display: block;
  margin-bottom: 0;
  font-size: 1.2rem;
  line-height: 1.06;
  overflow-wrap: anywhere;
}

.metric-grid small {
  display: none;
  font-size: 0.72rem;
}

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

.home-focus-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
}

.home-focus-row span,
.home-focus-row b {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1.1;
}

.home-focus-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.96rem;
}

.home-focus-row b {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--green);
  font-size: 0.9rem;
  white-space: nowrap;
}

.home-focus-row.is-amber b {
  color: #ffd6aa;
}

.home-focus-row.is-red b {
  color: #ff9f9f;
}

.home-focus-row.is-blue b {
  color: #9fc8ff;
}

.panel {
  margin-bottom: 14px;
  padding: 16px;
}

.panel-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-heading h2,
.detail-header h1,
.detail-card h2,
.table-card h2 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: 0;
}

.link-button,
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 820;
}

.link-button {
  padding: 0;
  background: transparent;
  color: var(--green);
}

.button-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  flex: 0 0 auto;
}

.button-icon img {
  display: block;
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(79%) sepia(95%) saturate(612%) hue-rotate(56deg) brightness(98%) contrast(91%);
}

.line-chart {
  height: 178px;
}

.chart-legend {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 720;
}

.chart-axis-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: -2px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 780;
}

.chart-axis-row strong {
  color: var(--text);
  font-size: 0.72rem;
  white-space: nowrap;
}

.chart-axis-row span:last-child {
  text-align: right;
}

.chart-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 3px;
  vertical-align: -1px;
}

.legend-income {
  background: var(--green);
}

.legend-spend {
  background: var(--blue);
}

.legend-net {
  background: var(--cyan);
}

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

.calendar-label,
.calendar-day {
  display: grid;
  min-height: 34px;
  place-items: center;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 760;
}

.calendar-label {
  min-height: 20px;
  color: var(--muted);
}

.calendar-day {
  align-content: center;
  gap: 2px;
  border: 0;
  background: #242b29;
  color: #d6ddd9;
  cursor: pointer;
}

.calendar-day span,
.calendar-day small {
  display: block;
  line-height: 1;
}

.calendar-day small {
  font-size: 0.52rem;
  font-weight: 850;
}

.calendar-day.is-empty {
  opacity: 0;
}

.calendar-day[data-level="1"],
.heatmap-legend i[data-level="1"] {
  background: #4a3138;
}

.calendar-day[data-level="2"],
.heatmap-legend i[data-level="2"] {
  background: #8b333c;
}

.calendar-day[data-level="3"],
.heatmap-legend i[data-level="3"] {
  background: #c44648;
}

.calendar-day[data-level="4"],
.heatmap-legend i[data-level="4"] {
  background: #ff504d;
  color: #fff;
}

.bills-treemap {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(74px, auto);
  gap: 6px;
}

.bill-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 74px;
  border: 0;
  border-radius: 7px;
  padding: 11px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.bill-tile strong,
.bill-tile span {
  position: relative;
  z-index: 1;
}

.bill-tile strong {
  font-size: 0.92rem;
  line-height: 1.15;
}

.bill-tile span {
  font-size: 0.82rem;
  font-weight: 760;
}

.bill-tile.size-xl {
  grid-column: span 6;
  background: linear-gradient(135deg, #d52b27, #fe7615);
}

.bill-tile.size-lg {
  grid-column: span 5;
  background: linear-gradient(135deg, #f06712, #fba60b);
}

.bill-tile.size-md {
  grid-column: span 4;
  background: linear-gradient(135deg, #e6a70d, #2b9d28);
}

.bill-tile.size-sm {
  grid-column: span 3;
  background: linear-gradient(135deg, #257f21, #1ca33a);
}

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

.review-metrics article {
  min-height: 74px;
  border-right: 1px solid var(--line);
  padding-right: 8px;
}

.review-metrics article:last-child {
  border-right: 0;
}

.review-metrics strong {
  display: block;
  margin-bottom: 7px;
  font-size: 1.65rem;
}

.review-metrics span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.22;
}

.detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-header.is-drilldown,
.view.is-drilldown .detail-header {
  grid-template-columns: 38px minmax(0, 1fr) 38px;
}

.detail-back-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.detail-back-button[hidden] {
  display: none;
}

.view.is-drilldown .detail-header > div {
  text-align: center;
}

.detail-header > div {
  min-width: 0;
}

.detail-header span {
  display: block;
  margin-bottom: 3px;
  font-size: 0.8rem;
  font-weight: 780;
}

.detail-content {
  display: grid;
  gap: 12px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 96px);
}

.detail-card,
.table-card {
  padding: 15px;
}

.detail-card h2,
.table-card h2 {
  margin-bottom: 12px;
}

.explore-header {
  margin-bottom: 12px;
}

.explore-header h2 {
  margin-bottom: 0;
}

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

.focus-link-grid button {
  display: grid;
  min-height: 86px;
  align-content: center;
  justify-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: center;
}

.focus-link-grid .asset-icon {
  width: 24px;
  height: 24px;
  color: var(--green);
}

.focus-link-grid img {
  width: 24px;
  height: 24px;
}

.focus-link-grid strong,
.focus-link-grid small {
  display: block;
  max-width: 100%;
}

.focus-link-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  line-height: 1.1;
}

.focus-link-grid small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 760;
  line-height: 1.1;
}

.detail-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
}

.primary-action,
.secondary-action {
  min-height: 44px;
  padding: 10px 13px;
}

.primary-action {
  background: var(--green);
  color: #031004;
}

.secondary-action {
  border: 1px solid var(--line);
  background: transparent;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bar-list,
.row-list,
.forecast-list {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.bar-row header,
.forecast-row,
.data-row,
.transaction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.forecast-row {
  width: 100%;
  min-height: 62px;
  border: 0;
  border-radius: 8px;
  padding: 10px 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.data-row {
  align-items: center;
}

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

.explain-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 9px;
}

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

.explain-row strong {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 860;
  line-height: 1.22;
}

.explain-row span {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 720;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.bar-row header span,
.bar-row header strong {
  font-size: 0.86rem;
}

.bar-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.spend-day-table {
  display: grid;
  gap: 0;
}

.spend-table-head,
.spend-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(82px, auto) 44px;
  gap: 10px;
  align-items: center;
}

.spend-table-head {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 820;
}

.spend-table-head span:nth-child(2),
.spend-table-row strong {
  text-align: right;
}

.spend-table-head span:nth-child(3),
.spend-table-row small {
  text-align: right;
}

.spend-table-row {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 9px 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.spend-table-row:last-child {
  border-bottom: 0;
}

.spend-table-row span,
.spend-table-row strong,
.spend-table-row small {
  font-size: 0.86rem;
  white-space: nowrap;
}

.spend-table-row strong {
  color: #ffb0ad;
}

.spend-table-row small {
  color: var(--muted);
  font-weight: 820;
}

.row-list article,
.row-list .insight-row,
.regular-payment-row,
.forecast-row,
.data-row,
.transaction-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.row-list article:last-child,
.row-list .insight-row:last-child,
.regular-payment-row:last-child,
.forecast-row:last-child,
.data-row:last-child,
.transaction-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.row-list strong,
.insight-row strong,
.regular-payment-row strong,
.transaction-row strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.row-list small,
.insight-row small,
.regular-payment-row small,
.transaction-row span,
.forecast-row span {
  display: block;
  margin-top: 3px;
  font-size: 0.78rem;
}

.insight-row,
.transaction-row {
  width: 100%;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.amount-out {
  color: #ff9b99;
  white-space: nowrap;
}

.amount-in {
  color: var(--green);
  white-space: nowrap;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.filter-row input,
.filter-row select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #090f0d;
  color: var(--text);
}

.section-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: calc(env(safe-area-inset-top) + 18px) 0 0;
  background: rgba(0, 0, 0, 0.62);
}

.section-menu.is-open {
  display: flex;
}

.menu-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(100%, 430px);
  max-height: calc(100svh - env(safe-area-inset-top) - 20px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background:
    radial-gradient(600px 300px at 50% -10%, rgba(85, 227, 79, 0.08), transparent 55%),
    #050807;
  color: var(--text);
  box-shadow: 0 -18px 70px rgba(0, 0, 0, 0.58);
}

.menu-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
}

.menu-header strong {
  text-align: center;
  font-size: 1.12rem;
  font-weight: 900;
}

.menu-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 16px calc(env(safe-area-inset-bottom) + 30px);
}

.menu-group {
  padding: 22px 0 26px;
}

.menu-group + .menu-group {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.menu-group h2 {
  margin-bottom: 14px;
  text-align: left;
  font-size: 1.1rem;
  line-height: 1.16;
}

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

.menu-app {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 112px;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius-soft);
  padding: 13px 9px 11px;
  background:
    linear-gradient(145deg, rgba(25, 34, 32, 0.9), rgba(8, 13, 12, 0.92));
  color: var(--text);
  text-align: center;
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.14;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.menu-app.is-active {
  border-color: rgba(85, 227, 79, 0.5);
  background:
    linear-gradient(145deg, rgba(85, 227, 79, 0.22), rgba(12, 28, 16, 0.94));
  color: var(--green);
}

.menu-app-icon {
  display: grid;
  width: 42px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.menu-app.is-active .menu-app-icon {
  border-color: transparent;
  background: transparent;
}

.menu-app-icon img {
  width: 29px;
  height: 29px;
  filter: brightness(0) saturate(100%) invert(78%) sepia(7%) saturate(269%) hue-rotate(91deg) brightness(88%) contrast(86%);
}

.menu-app small {
  display: block;
  margin-top: -2px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 720;
  line-height: 1.08;
}

.menu-app.is-active small {
  color: rgba(220, 255, 219, 0.78);
}

.menu-app.is-active .menu-app-icon img {
  filter: brightness(0) saturate(100%) invert(79%) sepia(95%) saturate(612%) hue-rotate(56deg) brightness(98%) contrast(91%);
}

.close-button {
  position: relative;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.close-button::before,
.close-button::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 11px;
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: var(--text);
}

.close-button::before {
  transform: rotate(45deg);
}

.close-button::after {
  transform: rotate(-45deg);
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  padding: 8px 10px calc(env(safe-area-inset-bottom) + 8px);
  background: #000402;
  backdrop-filter: blur(16px);
}

.bottom-nav button {
  position: relative;
  display: grid;
  min-height: 52px;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 760;
}

.bottom-nav button.is-active {
  color: var(--green);
}

.bottom-nav i {
  position: absolute;
  top: 2px;
  right: 18px;
  min-width: 20px;
  border-radius: 99px;
  padding: 2px 5px;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-style: normal;
  line-height: 1.1;
}

.nav-icon {
  position: relative;
  width: 23px;
  height: 23px;
  color: currentColor;
}

.nav-icon.asset-icon {
  display: grid;
  place-items: center;
}

.nav-icon.asset-icon::before,
.nav-icon.asset-icon::after {
  display: none;
}

.nav-icon img {
  width: 23px;
  height: 23px;
  filter: brightness(0) saturate(100%) invert(77%) sepia(9%) saturate(257%) hue-rotate(91deg) brightness(86%) contrast(86%);
}

.bottom-nav button.is-active .nav-icon img {
  filter: brightness(0) saturate(100%) invert(79%) sepia(95%) saturate(612%) hue-rotate(56deg) brightness(98%) contrast(91%);
}

.empty-copy {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.42;
}

.period-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.period-strip.is-inline {
  margin-bottom: 10px;
}

.date-controls {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  gap: 8px;
  margin-bottom: 12px;
}

.date-controls.is-inline {
  margin: 0 0 12px;
}

.date-step,
.date-controls select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 820;
}

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

.date-controls select {
  width: 100%;
  padding: 0 10px;
}

.date-step:disabled {
  opacity: 0.36;
}

.segment-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.segment-row.is-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 10px;
}

.segment-row button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 820;
}

.segment-row button.is-active {
  border-color: var(--line-strong);
  background: rgba(86, 227, 79, 0.14);
  color: var(--green);
}

.regulars-total {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 2.15rem;
  font-weight: 900;
  line-height: 1;
  overflow-wrap: anywhere;
}

.regulars-total.amount-out {
  color: #ff9f9f;
}

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

.forecast-horizon-grid article {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.forecast-horizon-grid strong,
.forecast-horizon-grid span {
  display: block;
}

.forecast-horizon-grid strong {
  margin-bottom: 6px;
  font-size: 1.1rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.forecast-horizon-grid span,
.explorer-count {
  color: var(--muted);
  font-size: 0.78rem;
}

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

.forecast-impact-grid article {
  display: grid;
  min-height: 96px;
  align-content: space-between;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.forecast-impact-grid span,
.forecast-impact-grid small,
.forecast-impact-grid strong {
  display: block;
  min-width: 0;
}

.forecast-impact-grid span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.15;
}

.forecast-impact-grid strong {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.forecast-impact-grid small {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.18;
}

.watchlist-row {
  position: relative;
  padding-left: 0;
}

.watch-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 6px;
  border-radius: 8px;
  padding: 4px 7px;
  background: rgba(255, 148, 31, 0.14);
  color: #ffd6aa;
  font-size: 0.72rem;
  font-weight: 850;
}

.review-metrics.is-compact article {
  min-height: 64px;
}

.review-count-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.review-count-line strong {
  color: var(--green);
  font-size: 1.8rem;
  line-height: 1;
}

.review-count-line span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.28;
}

.row-amount {
  text-align: right;
  white-space: nowrap;
}

.regular-payment-list {
  gap: 0;
}

.regular-payment-row {
  display: grid;
  width: 100%;
  min-height: 86px;
  grid-template-columns: 40px minmax(112px, 1fr) 76px minmax(58px, auto);
  align-items: center;
  gap: 8px;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.regular-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--green) 38%, #1b2421);
  color: #f8fff7;
  font-size: 0.92rem;
  font-weight: 900;
}

.regular-payment-row:nth-child(4n + 2) .regular-avatar {
  background: color-mix(in srgb, var(--blue) 45%, #1b2421);
}

.regular-payment-row:nth-child(4n + 3) .regular-avatar {
  background: color-mix(in srgb, var(--amber) 55%, #1b2421);
}

.regular-payment-row:nth-child(4n + 4) .regular-avatar {
  background: color-mix(in srgb, #8b5cf6 55%, #1b2421);
}

.regular-row-main {
  display: block;
  min-width: 0;
}

.signal-row-head,
.signal-row-main {
  display: flex;
  min-width: 0;
  align-items: center;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 6px;
  background: rgba(40, 208, 212, 0.14);
  color: #aafcff;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.trust-badge.is-green {
  background: rgba(85, 227, 79, 0.15);
  color: var(--green);
}

.trust-badge.is-amber {
  background: rgba(255, 148, 31, 0.16);
  color: #ffd6aa;
}

.trust-badge.is-muted {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.regular-meta-line .trust-badge {
  margin-right: 5px;
  transform: translateY(-1px);
}

.regular-row-trend {
  display: block;
  width: 76px;
  height: 42px;
}

.regular-row-trend svg {
  display: block;
  width: 100%;
  height: 100%;
}

.regular-row-amount {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.regular-row-main strong {
  overflow: hidden;
  overflow-wrap: normal;
  word-break: normal;
}

.payment-map {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 7px;
}

.payment-map-card {
  display: grid;
  min-height: 108px;
  align-content: space-between;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-soft);
  padding: 14px;
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 255, 255, 0.16), transparent 32%),
    linear-gradient(145deg, var(--tile-a, rgba(85, 227, 79, 0.22)), var(--tile-b, rgba(41, 151, 255, 0.12)));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.payment-map-card[data-payment-accent="0"] {
  --tile-a: rgba(190, 217, 255, 0.24);
  --tile-b: rgba(125, 255, 218, 0.18);
}

.payment-map-card[data-payment-accent="1"] {
  --tile-a: rgba(85, 227, 79, 0.22);
  --tile-b: rgba(41, 151, 255, 0.16);
}

.payment-map-card[data-payment-accent="2"] {
  --tile-a: rgba(255, 148, 31, 0.23);
  --tile-b: rgba(255, 235, 125, 0.16);
}

.payment-map-card[data-payment-accent="3"] {
  --tile-a: rgba(255, 127, 180, 0.18);
  --tile-b: rgba(122, 196, 255, 0.16);
}

.payment-map-card[data-payment-accent="4"] {
  --tile-a: rgba(40, 208, 212, 0.22);
  --tile-b: rgba(231, 189, 255, 0.14);
}

.payment-map-card[data-payment-accent="5"] {
  --tile-a: rgba(255, 212, 102, 0.18);
  --tile-b: rgba(255, 111, 97, 0.13);
}

.payment-map-card[data-payment-accent="6"] {
  --tile-a: rgba(136, 203, 255, 0.18);
  --tile-b: rgba(167, 255, 184, 0.16);
}

.payment-map-card[data-payment-accent="7"] {
  --tile-a: rgba(221, 210, 255, 0.18);
  --tile-b: rgba(112, 239, 209, 0.16);
}

.payment-map-card.is-hero,
.payment-map-card.is-major {
  grid-column: span 7;
  min-height: 176px;
}

.payment-map-card.is-xl {
  grid-column: span 5;
  min-height: 150px;
}

.payment-map-card.is-large {
  grid-column: span 6;
  min-height: 142px;
}

.payment-map-card.is-medium {
  grid-column: span 4;
  min-height: 136px;
}

.payment-map-name {
  display: -webkit-box;
  min-height: 2.45em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.payment-map-amount {
  color: #f7fff5;
  font-size: 1.34rem;
  line-height: 1;
}

.payment-map-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.payment-map-meta small {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(9, 16, 14, 0.24);
  color: rgba(247, 255, 245, 0.76);
  font-size: 0.68rem;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.payment-map-card.is-small {
  grid-column: span 4;
  min-height: 112px;
}

.payment-map-card.is-tiny {
  grid-column: span 3;
  min-height: 96px;
  gap: 6px;
  padding: 9px 8px;
}

.payment-map-card.is-micro {
  grid-column: span 2;
  min-height: 88px;
  gap: 4px;
  padding: 8px 7px;
}

.payment-map-card.is-nano {
  grid-column: span 2;
  min-height: 68px;
  gap: 3px;
  padding: 7px 6px;
}

.payment-map-card.is-small .payment-map-name,
.payment-map-card.is-tiny .payment-map-name,
.payment-map-card.is-micro .payment-map-name,
.payment-map-card.is-nano .payment-map-name {
  min-height: 2.2em;
  font-size: 0.7rem;
  line-height: 1.1;
}

.payment-map-card.is-small .payment-map-amount,
.payment-map-card.is-tiny .payment-map-amount,
.payment-map-card.is-micro .payment-map-amount,
.payment-map-card.is-nano .payment-map-amount {
  font-size: 0.86rem;
}

.payment-map-card.is-tiny .payment-map-meta,
.payment-map-card.is-micro .payment-map-meta,
.payment-map-card.is-nano .payment-map-meta {
  display: none;
}

.payment-map-card.is-nano .payment-map-name {
  min-height: auto;
  -webkit-line-clamp: 1;
  font-size: 0.62rem;
}

.payment-map-card.is-small .payment-map-meta small:last-child,
.payment-map-card.is-tiny .payment-map-meta small:last-child {
  display: none;
}

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

.payment-rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px 12px;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 0 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.payment-rank-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.payment-rank-row strong,
.payment-rank-row small,
.payment-rank-row b {
  display: block;
}

.payment-rank-row strong {
  font-size: 0.88rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.payment-rank-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.16;
}

.payment-rank-row b {
  color: var(--green);
  font-size: 0.92rem;
  white-space: nowrap;
}

.payment-rank-row i {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.payment-rank-row i::before {
  content: "";
  display: block;
  width: var(--payment-width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.snapshot-charts {
  display: block;
}

.snapshot-charts article {
  min-height: 156px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.snapshot-charts span,
.snapshot-charts small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
}

.snapshot-charts strong {
  display: block;
  margin-top: 7px;
  font-size: 0.98rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.mini-donut,
.mini-spark {
  height: 74px;
  margin: 6px 0;
}

.mini-donut svg,
.mini-spark svg,
.donut-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

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

.donut-chart {
  width: min(172px, 70%);
  aspect-ratio: 1;
  justify-self: center;
}

.month-bars {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  min-height: 152px;
  align-items: end;
}

.month-bars button {
  display: grid;
  gap: 7px;
  align-items: end;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.month-bars button.is-selected span {
  color: var(--green);
}

.month-bars span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 780;
  text-align: center;
  text-overflow: clip;
}

.bar-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(4px, 1fr));
  gap: 3px;
  height: 112px;
  align-items: end;
}

.bar-pair i {
  display: block;
  min-height: 4px;
  border-radius: 5px 5px 2px 2px;
}

.bar-pair .is-income {
  background: var(--green);
}

.bar-pair .is-spend {
  background: var(--blue);
}

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

.snapshot-grid article {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.snapshot-grid strong,
.snapshot-grid span {
  display: block;
}

.snapshot-grid strong {
  margin-bottom: 7px;
  font-size: 1rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.snapshot-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

.payment-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px;
}

.payment-summary-grid article {
  display: grid;
  min-height: 58px;
  align-content: center;
  justify-items: center;
  padding: 8px 7px;
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
}

.payment-summary-grid strong {
  font-size: 0.92rem;
  line-height: 1;
  white-space: nowrap;
}

.payment-summary-grid span {
  font-size: 0.64rem;
  line-height: 1.15;
}

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

.filter-tabs button {
  display: grid;
  min-height: 58px;
  align-content: center;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 5px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  text-align: center;
  overflow: hidden;
}

.filter-tabs button.is-active {
  border-color: rgba(85, 227, 79, 0.5);
  background: rgba(85, 227, 79, 0.15);
  color: var(--green);
}

.filter-tabs strong,
.filter-tabs span {
  display: block;
}

.filter-tabs strong {
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1;
}

.filter-tabs span {
  margin-top: 5px;
  max-width: 100%;
  font-size: 0.6rem;
  font-weight: 820;
  line-height: 1.08;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subscription-trend-chart {
  height: 156px;
}

.category-mix-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  min-height: 0;
}

.category-mix-card .mini-donut {
  width: 156px;
  height: 132px;
  margin: 0 auto;
}

.category-mix-card .bar-row {
  min-height: 40px;
  padding: 6px 0;
}

.category-mix-card .bar-row header {
  gap: 10px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.category-mix-card .bar-row header span {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.category-mix-card .bar-row header strong {
  white-space: nowrap;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 6px;
  border-radius: 999px;
  padding: 2px 7px;
  color: #07100d;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 860;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.category-chip-0 { background: #55e34f; }
.category-chip-1 { background: #28d0d4; }
.category-chip-2 { background: #ff941f; }
.category-chip-3 { background: #9fc8ff; }
.category-chip-4 { background: #ffd966; }
.category-chip-5 { background: #ff9dbd; }
.category-chip-6 { background: #c8b6ff; }
.category-chip-7 { background: #8ff0be; }

.heatmap-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.heatmap-stats article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.heatmap-stats strong,
.heatmap-stats span {
  display: block;
}

.heatmap-stats strong {
  margin-bottom: 5px;
  font-size: 0.95rem;
}

.heatmap-stats span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.15;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.heatmap-legend i {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.calendar-hero-card {
  min-height: calc(100svh - 138px);
  padding: 16px 14px 18px;
}

.calendar-hero-card .heatmap-calendar {
  gap: 9px;
}

.calendar-hero-card .calendar-day {
  min-height: 58px;
  border-radius: 10px;
}

.calendar-hero-card .calendar-label {
  min-height: 28px;
}

.calendar-hero-card .calendar-day small {
  max-width: 100%;
  font-size: 0.47rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.month-heatmap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.month-heatmap-card {
  display: grid;
  min-height: 94px;
  align-content: center;
  justify-items: center;
  gap: 5px;
  border: 0;
  border-radius: 10px;
  padding: 10px 7px;
  background: #242b29;
  color: var(--text);
  text-align: center;
}

.month-heatmap-card[data-level="1"] {
  background: #4a3138;
}

.month-heatmap-card[data-level="2"] {
  background: #8b333c;
}

.month-heatmap-card[data-level="3"] {
  background: #c44648;
}

.month-heatmap-card[data-level="4"] {
  background: #ff504d;
}

.month-heatmap-card span,
.month-heatmap-card small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 820;
}

.month-heatmap-card strong {
  font-size: 0.94rem;
  line-height: 1;
  white-space: nowrap;
}

.trend-month-row,
.regular-change-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

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

.trend-insight-strip article {
  display: grid;
  min-height: 62px;
  align-content: center;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
}

.trend-insight-strip span,
.trend-month-header span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
}

.trend-insight-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  line-height: 1.08;
  white-space: nowrap;
}

.review-row-card {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
}

.review-row-card.is-amber {
  border-color: rgba(255, 148, 31, 0.24);
  background: linear-gradient(145deg, rgba(255, 148, 31, 0.1), rgba(255, 255, 255, 0.018));
}

.review-row-card.is-blue {
  border-color: rgba(40, 208, 212, 0.22);
  background: linear-gradient(145deg, rgba(40, 208, 212, 0.08), rgba(255, 255, 255, 0.018));
}

.review-row-card + .review-row-card {
  margin-top: 8px;
}

.review-row-card strong {
  font-size: 0.95rem;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.review-row-card small,
.review-row-meta {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.22;
}

.review-row-meta {
  color: var(--green);
  font-weight: 840;
}

.signal-row-head,
.signal-row-main {
  justify-content: space-between;
  gap: 10px;
}

.signal-row-head {
  align-items: flex-start;
}

.signal-row-main {
  align-items: baseline;
}

.signal-row-main strong {
  min-width: 0;
}

.signal-row-main b {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1;
  white-space: nowrap;
}

.trend-month-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, minmax(58px, auto));
  gap: 6px;
  margin-bottom: 4px;
  padding-right: 0;
}

.trend-month-header span:not(:first-child) {
  text-align: right;
}

.trend-month-row span {
  display: grid;
  grid-template-columns: repeat(3, minmax(58px, auto));
  gap: 6px;
  justify-content: end;
}

.trend-month-list {
  gap: 0;
}

.trend-month-row b,
.regular-change-row b {
  font-size: 0.78rem;
  white-space: nowrap;
}

.regular-change-row small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

.legend-bonus {
  background: var(--amber);
}

.forecast-timeline {
  display: grid;
  gap: 18px;
}

.timeline-group {
  position: relative;
  padding-left: 34px;
}

.timeline-group::before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: -14px;
  left: 8px;
  border-left: 2px dotted rgba(85, 227, 79, 0.62);
}

.timeline-group:last-child::before {
  display: none;
}

.timeline-marker {
  position: absolute;
  top: 2px;
  left: 0;
  display: grid;
  gap: 6px;
  justify-items: center;
  width: 18px;
}

.timeline-marker i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(85, 227, 79, 0.42);
}

.timeline-marker span {
  color: var(--green);
  font-size: 0.62rem;
  font-weight: 850;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.timeline-group h3 {
  margin: 0 0 10px;
  font-size: 0.98rem;
}

.period-pill {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 820;
}

.period-pill.is-active {
  border-color: rgba(85, 227, 79, 0.48);
  background: rgba(85, 227, 79, 0.13);
  color: var(--green);
}

.cash-health-card {
  min-height: 294px;
}

.cash-health-card > strong {
  font-size: 2.45rem;
  line-height: 1.08;
}

.after-regulars {
  display: grid;
  align-content: center;
  max-width: 100%;
  min-height: 54px;
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-weight: 820;
  line-height: 1.22;
  backdrop-filter: blur(8px);
}

.after-regulars.is-negative {
  background: rgba(255, 80, 77, 0.14);
  color: #ffb0ad;
}

.compact-list,
.change-list {
  display: grid;
  gap: 9px;
}

.compact-row,
.change-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 9px;
}

.compact-row:last-child,
.change-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.compact-row strong,
.change-row strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.compact-row span,
.compact-row small,
.change-row span,
.change-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

.row-amount {
  text-align: right;
  white-space: nowrap;
}

.change-row.is-good strong {
  color: var(--green);
}

.change-row.is-bad strong {
  color: #ff9b99;
}

.spend-calendar.is-compact {
  gap: 6px;
}

.spend-calendar.is-compact .calendar-day {
  min-height: 31px;
}

.regulars-summary-card {
  border-color: rgba(85, 227, 79, 0.32);
  background:
    linear-gradient(150deg, rgba(85, 227, 79, 0.13), rgba(255, 255, 255, 0.025) 62%),
    var(--panel);
}

.regulars-total {
  margin: 6px 0 8px;
  color: var(--green);
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1;
  overflow-wrap: anywhere;
}

.regulars-title-row {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.regulars-title-row .regulars-total {
  margin: 0;
}

.regulars-title-row > span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
}

.segment-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.segment-row.is-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segment-row button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 820;
}

.segment-row button.is-active {
  border-color: rgba(85, 227, 79, 0.42);
  background: rgba(85, 227, 79, 0.16);
  color: var(--green);
}

.line-chart.is-mini {
  height: 112px;
}

.bottom-nav {
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.42);
}

@media (max-width: 430px) {
  .app-shell {
    padding-bottom: calc(env(safe-area-inset-bottom) + 122px);
  }

  .forecast-horizon-grid,
  .snapshot-grid:not(.payment-summary-grid) {
    grid-template-columns: 1fr;
  }

  .payment-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .payment-summary-grid article {
    min-height: 58px;
    padding: 8px 6px;
  }

  .payment-summary-grid strong {
    font-size: 0.88rem;
  }

  .payment-summary-grid span {
    font-size: 0.62rem;
  }
}

@media (max-width: 360px) {
  .app-shell {
    padding-inline: 14px;
  }

  .brand-lockup strong {
    font-size: 1.22rem;
  }

  .local-badge {
    width: 28px;
    overflow: hidden;
    color: transparent;
  }

  .review-metrics {
    grid-template-columns: 1fr;
  }

  .balance-card > strong,
  .cash-health-card > strong {
    font-size: 2.08rem;
  }

  .segment-row {
    grid-template-columns: 1fr;
  }

  .snapshot-charts {
    display: block;
  }

  .category-mix-card {
    grid-template-columns: 1fr;
  }

  .regular-payment-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .regular-row-trend {
    display: none;
  }

  .payment-map {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .payment-map-card,
  .payment-map-card.is-major,
  .payment-map-card.is-hero,
  .payment-map-card.is-xl,
  .payment-map-card.is-large,
  .payment-map-card.is-medium,
  .payment-map-card.is-small,
  .payment-map-card.is-tiny {
    grid-column: span 3;
    min-height: 96px;
  }

  .payment-map-card.is-micro,
  .payment-map-card.is-nano {
    grid-column: span 2;
    min-height: 76px;
  }
}

@media (min-width: 680px) {
  .app-shell {
    max-width: 430px;
    margin: 0 auto;
    padding-top: calc(env(safe-area-inset-top) + 72px);
  }
}
