/* Sniptera Studio: expressive surfaces, clear money hierarchy, calm interactions.
   App-only layer; shared primitives remain in app-figma.css. */
:root {
  --studio-canvas: #f6f4ef;
  --studio-ink: #282d28;
  --studio-muted: #62675f;
  --studio-line: #e5e6dd;
  --studio-forest: #273e36;
  --studio-sage: #e8edde;
  --studio-orange: #ff8a4c;
  --studio-radius: 24px;
  --sn-color-canvas: var(--studio-canvas);
  --sn-color-ink: var(--studio-ink);
  --sn-color-muted: var(--studio-muted);
  --sn-color-border: var(--studio-line);
  --sn-color-accent: var(--studio-orange);
  --sn-color-accent-hover: #fa7b3a;
  --sn-color-inverse: var(--studio-forest);
}
body {
  background: var(--studio-canvas);
}
::selection {
  background: #ffd3b5;
  color: #282d28;
}
.sidebar {
  background: #eeefe7;
  border-right: 1px solid #dfe2d7;
  padding-top: 32px;
}
.sidebar .brand {
  align-items: center;
  letter-spacing: -1px;
}
.sidebar-caption {
  color: #5b6454;
  font-size: 12px;
  line-height: 19px;
  margin: 28px 0 24px;
}
.sidebar .nav-item {
  justify-content: flex-start;
  padding: 12px 16px;
  font-size: 13px;
  border-radius: 14px;
}
.sidebar .nav-item.active {
  background: var(--studio-forest);
  box-shadow: 0 5px 12px #273e3612;
}
.sidebar .nav-item:not(.active):hover {
  background: #e2e6d9;
}
.sidebar-bottom .profile {
  border-top-color: #d8ddcf;
}
.topbar {
  border-bottom: 0;
  height: 76px;
}
.breadcrumb {
  color: var(--studio-muted);
}
.currency-code {
  border-color: #dedfd4;
  background: #ffffff80;
}
.content {
  padding: 28px 36px 40px;
  gap: 20px;
  max-width: 1560px;
  margin: 0 auto;
}
.content > .eyebrow,
.page-heading .eyebrow {
  color: #6b715f;
  font-weight: 600;
  letter-spacing: 1.5px;
  font-size: 12px;
}
h1 {
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: -1.6px;
}
h2 {
  letter-spacing: -0.4px;
}
.page-heading {
  align-items: center;
  margin-bottom: 8px;
}
.page-heading h1 {
  margin: 10px 0 12px;
}
.page-heading p,
.subtitle {
  color: var(--studio-muted);
  line-height: 1.6;
}
.page-heading .button-stack {
  gap: 10px;
}
.btn {
  font-size: 13px;
  font-weight: 550;
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}
.btn.primary {
  background: var(--studio-orange);
  color: #382315;
  box-shadow: 0 3px 0 #d968251a;
}
.btn.secondary {
  background: #ffffffb8;
  border-color: #d9ddd2;
}
.btn.secondary:hover {
  background: #eff1e8;
  border-color: #c0c9b6;
}
.btn:active:not(:disabled) {
  transform: translateY(1px);
}
.btn.primary.danger {
  color: white;
}
.account-trigger {
  border: 1px solid #c2cfb2;
  background: #e7eddd;
  border-radius: 50%;
  width: 44px;
  min-width: 44px;
  height: 44px;
  font-size: 15px;
  font-weight: 600;
  color: #3c5531;
}
.hosted-start-error {
  margin: 12vh auto;
  max-width: 650px;
  padding: 30px;
}
.hosted-start-error h1 {
  margin-bottom: 20px;
}
.hosted-app .online-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4b6540;
  font-size: 12px;
}
.hosted-app .online-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #78915b;
  flex-shrink: 0;
}
.hosted-app .online-status[data-state="pending"]::before,
.hosted-app .online-status[data-state="conflict"]::before {
  background: #bd793c;
}
.account-profile {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}
.account-profile p {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}
.account-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #e7eddd;
  font-size: 22px;
  flex-shrink: 0;
}
.account-sync-summary {
  background: #eef2e6;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
}
.account-sync-summary p {
  margin: 8px 0 0;
  font-size: 13px;
}
.onboarding-paths {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}
.invitation-list {
  max-height: 280px;
  overflow-y: auto;
  margin-top: 20px;
}
.invitation-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.invitation-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.invitation-row small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.card,
.wallet,
.mini-card {
  border-color: var(--studio-line);
  border-radius: var(--studio-radius);
  box-shadow: 0 3px 1px -2px #242d2410;
}
.card {
  padding: 26px;
}
.tag {
  background: #f0f2eb;
  color: #5d6657;
  border-radius: 8px;
}
.text-button {
  color: #3e5343;
  font-weight: 550;
}
.sandbox-banner {
  min-height: 48px;
  padding: 6px 16px;
  margin: 0 36px;
  background: #f0eadc;
  border: 1px solid #e6dfcf;
  border-radius: 12px;
}
.sandbox-banner > .btn,
.sandbox-banner > .text-button {
  min-height: 36px;
  padding: 8px 12px;
}
.sandbox-banner > span {
  color: #665a43;
}
/* A clear focal point: one spending allowance, then supporting balances. */
.page-home {
  gap: 24px;
}
.page-home > .eyebrow {
  margin-bottom: -16px;
}
.page-home .page-heading h1 {
  font-size: clamp(34px, 3.4vw, 48px);
  line-height: 1.09;
  letter-spacing: -2px;
  margin-bottom: 12px;
}
.heading-accent {
  color: #718165;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}
.overview-grid .hero-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px 30px 24px;
  min-height: 322px;
  border: 1px solid #edb48a;
  border-radius: 28px;
  background: #ffd2a7;
  background-image: radial-gradient(
    ellipse at 90% 0%,
    #fff0ce 0%,
    transparent 65%
  );
  color: #422b1c;
  overflow: hidden;
  box-shadow: 0 4px 0 #e8c39e33;
}
.hero-top {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.8px;
}
.hero-top > span:first-child {
  min-width: 0;
}
.day-pill {
  background: #fff8eabf;
  color: #694a30;
  border: 1px solid #f0cda9;
  font-weight: 500;
  letter-spacing: 0;
}
.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.hero-amount {
  min-width: 0;
  position: relative;
  z-index: 1;
}
.big-money {
  display: flex;
  align-items: baseline;
  font-size: clamp(30px, 3.7vw, 54px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -2px;
  gap: 8px;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.big-money span {
  color: #705138;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: 0;
}
.overview-grid .hero-card .hero-amount > p {
  margin-top: 12px;
  font-size: 13px;
  line-height: 20px;
  color: #6e4f37;
  max-width: 270px;
}
.hero-signal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  color: #4b5231;
  font-size: 12px;
  font-weight: 550;
}
.hero-signal i {
  width: 7px;
  height: 7px;
  background: #65783d;
  border-radius: 50%;
  flex-shrink: 0;
}
.hero-signal.needs-attention {
  color: #7f3c23;
}
.hero-signal.needs-attention i {
  background: #994627;
}
.hero-illustration {
  position: relative;
  height: 150px;
  display: grid;
  place-items: center;
}
.hero-illustration img {
  position: relative;
  width: 170px;
  max-width: none;
  height: 170px;
  object-fit: contain;
  transform: rotate(-8deg);
  filter: drop-shadow(0 12px 12px #a9662020);
}
.hero-orbit {
  position: absolute;
  width: 145px;
  height: 145px;
  border-radius: 50%;
  border: 1px solid #d68b4c40;
  box-shadow:
    0 0 0 16px #fff2ce33,
    0 0 0 33px #fff2ce22;
}
.hero-spark {
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 27px;
  color: #9b693f;
}
.overview-grid .hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 0;
  padding-top: 18px;
  border-top: 1px solid #b67a4440;
}
.hero-bottom small {
  color: #6e4f37;
  font-size: 12px;
  margin-bottom: 4px;
}
.hero-bottom strong {
  font-weight: 600;
  font-size: 14px;
}
.overview-grid .hero-card .btn.lime {
  background: #422f23;
  color: #fff5e8;
  border: 1px solid #422f23;
  padding: 12px 16px;
  font-size: 12px;
  min-height: 44px;
}
.overview-grid .hero-card .btn.lime:hover {
  background: #5f432e;
}
.balance-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: 18px;
  padding: 28px;
  background: var(--studio-forest);
  color: #f4f5e9;
  border-color: #273e36;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
}
.balance-card h2 {
  color: #f4f5e9;
  font-size: 16px;
}
.balance-card .tag {
  color: #dbe6c8;
  background: #ffffff12;
  border: 1px solid #ffffff20;
}
.balance-overline {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 1.4px;
  color: #becab8;
}
.balance-number {
  display: block;
  font-size: clamp(27px, 2.7vw, 38px);
  line-height: 1.2;
  letter-spacing: -1.1px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.balance-card p {
  color: #c3cebe;
  margin-top: 6px;
  font-size: 13px;
}
.balance-card .btn.secondary {
  background: #ffffff0c;
  color: #f2f4e8;
  border-color: #ffffff36;
}
.balance-card .btn.secondary:hover {
  background: #ffffff20;
}
.balance-actions {
  display: flex;
  flex-wrap: wrap;
}
.balance-actions .btn {
  flex: 1;
  font-size: 12px;
  padding: 10px;
}
.balance-caption {
  color: #bfccbc;
  border-color: #ffffff24;
  padding-top: 12px;
  font-size: 12px;
  line-height: 18px;
}
.wallet-dots {
  display: flex;
  height: 24px;
  margin: -4px 0;
}
.wallet-dots span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid var(--studio-forest);
  border-radius: 50%;
  background: #d4dbba;
  color: #364a39;
}
.wallet-dots span + span {
  margin-left: -7px;
  background: #f2bc8c;
}
.wallet-dots span:last-child {
  background: #bacac4;
}
/* Different information earns a different surface treatment. */
.dashboard-secondary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 20px;
}
.dashboard-secondary .spending-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  grid-template-rows: auto auto auto 1fr;
  gap: 8px 20px;
  align-items: start;
  padding: 24px;
  background: #e8edde;
  border-color: #dce2cf;
}
.dashboard-secondary .spending-card .section-title {
  grid-column: 1/-1;
  margin-bottom: 6px;
}
.dashboard-secondary .spending-card .chart-total {
  grid-column: 1;
  font-size: 28px;
  line-height: 34px;
  letter-spacing: -1px;
}
.dashboard-secondary .spending-card .hint {
  grid-column: 1;
  max-width: 140px;
  color: #59654d;
}
.dashboard-secondary .spending-card .week-chart {
  grid-column: 2;
  grid-row: 2/5;
  height: 110px;
  margin-top: 0;
  gap: 8px;
}
.dashboard-secondary .spending-card > .text-button {
  grid-column: 1;
  font-size: 12px;
  padding: 10px 0;
}
.week-track {
  background: #dce2cf;
  border-radius: 5px;
}
.week-track i {
  background: #6d825c;
  border-radius: 5px;
}
.week-column:last-child .week-track i {
  background: #314937;
}
.week-column > span {
  color: #58634e;
}
.monthly-overview {
  padding: 24px;
  border: 1px solid var(--studio-line);
  border-radius: 24px;
  background: #fffcf6;
}
.monthly-overview > .section-title {
  margin-bottom: 20px;
}
.monthly-overview .stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.monthly-overview .mini-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  gap: 10px;
}
.monthly-overview .mini-card + .mini-card {
  border-left: 1px solid #e7e7dc;
  padding-left: 16px;
}
.monthly-overview .mini-card > span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: #62675f;
  font-size: 12px;
}
.monthly-overview .mini-card > strong {
  font-size: clamp(17px, 1.65vw, 24px);
  line-height: 1.3;
  letter-spacing: -0.7px;
  overflow-wrap: anywhere;
}
.monthly-overview .mini-card > small {
  line-height: 18px;
  color: #68705e;
}
.stat-symbol {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  font-style: normal;
  font-size: 16px;
  background: #e8eedf;
  color: #4a663d;
}
.stat-symbol.expense {
  background: #fce9db;
  color: #985328;
}
.stat-symbol.bill {
  background: #ebe8de;
  color: #716144;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.detail-grid .recent-card {
  grid-row: 1/3;
}
.detail-grid .upcoming-card {
  grid-column: 2;
  grid-row: 1;
}
.detail-grid .explanation {
  grid-column: 2;
  grid-row: 2;
  background: #eeefe6;
  padding: 0;
  box-shadow: none;
  border-color: #e0e3d6;
}
.section-kicker {
  display: block;
  font-size: 12px;
  letter-spacing: 1px;
  color: #68715b;
  font-weight: 400;
  margin-top: 5px;
}
.explanation > summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-size: 14px;
  font-weight: 600;
}
.explanation > summary::-webkit-details-marker {
  display: none;
}
.explanation > summary small {
  display: block;
  font-weight: 400;
  color: #59664f;
  margin-top: 5px;
  line-height: 18px;
}
.disclosure-plus {
  font-size: 22px;
  color: #626e56;
}
.explanation[open] .disclosure-plus {
  transform: rotate(45deg);
}
.explanation-body {
  padding: 0 24px 16px;
}
.explanation-body .calc-row {
  gap: 12px;
}
.soft-note {
  background: #f1f3e9;
  color: #626d54;
  border-radius: 12px;
  padding: 12px 14px;
}
.tx-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: #fcf0e3;
  color: #9a623c;
  display: grid;
  place-items: center;
}
.tx-icon.income {
  background: #e8efdf;
  color: #4b6a3b;
}
.tx-icon.transfer {
  background: #e7eef0;
  color: #4b6c76;
}
.tx-note {
  font-weight: 550;
}
.tx-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 550;
}
.detail-grid .tx {
  padding: 16px 0;
  border-bottom: 1px solid #f0f1e9;
}
.tx:last-child {
  border-bottom: 0;
}
.tx .icon-button {
  color: #747b6b;
  border-radius: 10px;
}
.tx .icon-button:hover {
  background: #f0f2e8;
}
.bill-icon {
  background: #ecf0e1;
  color: #677a4f;
}
.bill strong {
  font-weight: 550;
}
.wallet {
  background: #fffdf7;
  border-radius: 20px;
  border-top: 3px solid #b8c6a1;
}
.wallet:nth-child(2) {
  border-top-color: #f4b68a;
}
.wallet:nth-child(3) {
  border-top-color: #b9cdd0;
}
.wallet > span {
  color: #606957;
}
.wallet > strong {
  letter-spacing: -0.7px;
}
.wallet.add-wallet {
  border: 1px dashed #bdc7ae;
  box-shadow: none;
  color: #5c6b4f;
}
.capture-actions .btn {
  background: #eeefe5;
  border-color: #dfe3d4;
}
.capture-actions .btn:hover {
  background: #e1e6d7;
}
.page-transactions .card:has(#tx-list) {
  border-radius: 24px;
}
.search-label input {
  background: #f7f8f2;
  border-color: #c3ccba;
}
input,
select {
  border-color: #bac3b1;
  background: #fffefa;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
input:focus,
select:focus {
  border-color: #788f64;
  box-shadow: 0 0 0 3px #96ad7f18;
}
.input-prefix {
  border-color: #bac3b1;
  background: #fffefa;
}
.page-buy .two-col > .card:first-child {
  background: #fffcf6;
  border-color: #e8ddcc;
}
.page-buy .purchase-art {
  object-fit: contain;
  height: 135px;
  margin-bottom: 12px;
}
.step-label {
  color: #606d52;
  letter-spacing: 1.2px;
  font-size: 12px;
}
.page-buy .simulation {
  background: #eef2e7;
  border-color: #d8e1cc;
}
.page-buy .simulation h2 {
  font-family: var(--sn-font-heading);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -1px;
}
.page-buy .comparison {
  background: #fcfff7;
  border: 1px solid #dce5d2;
  border-radius: 18px;
}
.page-buy .comparison strong {
  font-family: var(--sn-font-heading);
  letter-spacing: -0.7px;
}
.page-buy .timeline-card {
  border-radius: 24px;
}
.chart .bar {
  border-radius: 5px 5px 0 0;
  background: #79966d;
}
.chart .bar.low {
  background: #c68a5c;
}
.chart-data {
  margin-top: 20px;
  border-top: 1px solid var(--studio-line);
}
.chart-data > summary {
  min-height: 48px;
  padding: 16px 0;
  cursor: pointer;
  color: #45613e;
  font-size: 13px;
}
.page-plan .two-col > .card:first-child {
  background: #eef1e5;
  border-color: #dee4d1;
}
.page-plan .progress,
.page-report .progress {
  background: #edf0e5;
  height: 8px;
  border-radius: 6px;
}
.page-plan .budget-row,
.page-report .budget-row {
  padding: 16px 0;
}
.page-report .stats,
.page-wealth .stats {
  gap: 16px;
}
.page-report .mini-card:first-child,
.page-wealth .mini-card:first-child {
  background: #e6eddb;
  border-color: #d9e3cb;
}
.page-report .mini-card:nth-child(2) {
  background: #f9e9dc;
  border-color: #efdac8;
}
.page-wealth .mini-card:nth-child(2) {
  background: #f8eddd;
}
.page-report .mini-card strong,
.page-wealth .mini-card strong {
  letter-spacing: -1px;
}
.page-report > label {
  max-width: 280px;
}
.spending-snapshot {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--studio-line);
}
.spending-ring {
  position: relative;
  width: 140px;
  height: 140px;
}
.spending-ring svg {
  width: 100%;
  height: 100%;
}
.spending-ring > span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: var(--sn-font-heading);
  font-size: 34px;
  letter-spacing: -1px;
}
.spending-ring small {
  font-family: var(--sn-font-family);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--studio-muted);
}
.spending-story {
  min-width: 0;
}
.spending-story > strong {
  display: block;
  font-family: var(--sn-font-heading);
  font-size: 24px;
  line-height: 30px;
  letter-spacing: -0.6px;
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.spending-story > p {
  font-size: 13px;
  line-height: 20px;
  margin-bottom: 14px;
}
.category-legend {
  display: flex;
  gap: 8px 12px;
  flex-wrap: wrap;
}
.category-legend > span {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #606956;
  font-size: 12px;
  line-height: 18px;
}
.category-legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.page-wealth .goal-art {
  max-height: 200px;
  object-fit: contain;
}
.page-settings .two-col > .card {
  border-radius: 24px;
}
dialog {
  border: 1px solid #d9dfd0;
  border-radius: 26px;
  box-shadow: 0 24px 100px #26352533;
}
dialog::backdrop {
  background: #22302666;
  backdrop-filter: blur(5px);
}
#modal-form .section-title {
  padding-bottom: 18px;
  border-bottom: 1px solid #e6e9de;
}
.modal-actions {
  padding-top: 18px;
  border-top: 1px solid #e6e9de;
}
footer {
  color: #616b57;
  border-color: #e1e5d8;
}
summary:focus-visible {
  outline: 3px solid #728c58;
  outline-offset: 3px;
  border-radius: 12px;
}
@media (prefers-reduced-motion: no-preference) {
  .content {
    animation: studio-arrive 0.28s ease-out both;
  }
  @keyframes studio-arrive {
    from {
      transform: translateY(5px);
    }
    to {
      transform: translateY(0);
    }
  }
}
@media (max-width: 1150px) {
  .content {
    padding: 24px;
  }
  .sandbox-banner {
    margin: 0 24px;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 16px;
  }
  .overview-grid .hero-card {
    padding: 24px;
  }
  .hero-main {
    grid-template-columns: minmax(0, 1fr) 100px;
  }
  .hero-illustration img {
    width: 135px;
    height: 135px;
  }
  .hero-orbit {
    width: 100px;
    height: 100px;
  }
  .hero-spark {
    right: -5px;
  }
  .dashboard-secondary {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .dashboard-secondary .spending-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  }
  .monthly-overview .mini-card > strong {
    font-size: 24px;
  }
  .page-home .page-heading {
    align-items: start;
  }
  .page-home .page-heading .button-stack {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}
@media (max-width: 800px) {
  .overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .balance-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
  }
  .balance-card > .section-title,
  .balance-card > .balance-caption {
    grid-column: 1/-1;
  }
  .balance-card > .wallet-dots {
    display: none;
  }
  .balance-actions {
    align-self: center;
  }
  .balance-number {
    font-size: 32px;
  }
  .hero-main {
    grid-template-columns: minmax(0, 1fr) 150px;
  }
  .hero-illustration img {
    width: 170px;
    height: 170px;
  }
  .hero-orbit {
    width: 140px;
    height: 140px;
  }
  .big-money {
    font-size: 48px;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .detail-grid .recent-card,
  .detail-grid .upcoming-card,
  .detail-grid .explanation {
    grid-row: auto;
    grid-column: auto;
  }
}
@media (max-width: 600px) {
  .hosted-app .topbar > div {
    gap: 8px;
  }
  .hosted-app .topbar .currency-code {
    display: none;
  }
  .hosted-app .topbar .online-status {
    max-width: 96px;
    line-height: 17px;
    text-align: right;
  }
  .spending-snapshot {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 16px;
    padding: 16px 0;
  }
  .spending-ring {
    width: 100px;
    height: 100px;
  }
  .spending-story > strong {
    font-size: 21px;
    line-height: 27px;
  }
  .spending-story .step-label {
    letter-spacing: 0.6px;
  }
  .category-legend {
    grid-column: 1/-1;
  }
  #app {
    border: 0;
  }
  .content {
    padding: 24px 18px 28px;
    gap: 18px;
  }
  .topbar {
    height: 68px;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7dd;
  }
  .topbar .mobile-brand {
    letter-spacing: -0.7px;
  }
  .sandbox-banner {
    margin: 10px 18px 0;
    gap: 4px 10px;
    padding: 8px 12px;
    min-height: 0;
  }
  .sandbox-banner > span {
    width: 100%;
    font-size: 12px;
    line-height: 18px;
  }
  .sandbox-banner > .btn,
  .sandbox-banner > .text-button {
    font-size: 12px;
    min-height: 36px;
    padding: 8px 0;
    background: transparent;
    border: 0;
  }
  .sandbox-banner > .text-button {
    margin-left: auto;
  }
  h1,
  .page-transactions h1,
  .page-plan h1,
  .page-report h1 {
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -1.2px;
  }
  .content > .eyebrow {
    margin-bottom: -8px;
    font-size: 12px;
    letter-spacing: 1.2px;
  }
  .page-home > .eyebrow {
    margin-bottom: -14px;
  }
  .page-home .page-heading {
    gap: 18px;
    margin-bottom: 0;
  }
  .page-home .page-heading h1 {
    font-size: 36px;
    line-height: 1.08;
    letter-spacing: -1.7px;
    margin: 8px 0 10px;
  }
  .page-home .page-heading p {
    font-size: 13px;
    line-height: 20px;
  }
  .page-home .page-heading .button-stack {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
  }
  .page-home .page-heading .button-stack .primary {
    order: -1;
  }
  .page-home .page-heading .btn {
    padding: 12px 14px;
    font-size: 12px;
  }
  .overview-grid {
    gap: 14px;
  }
  .overview-grid .hero-card {
    padding: 22px 20px;
    border-radius: 24px;
    min-height: 285px;
    gap: 16px;
  }
  .hero-top {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    letter-spacing: 0.6px;
  }
  .hero-top .day-pill {
    font-size: 12px;
    padding: 5px 8px;
  }
  .hero-main {
    grid-template-columns: minmax(0, 1fr) 90px;
    gap: 0;
  }
  .big-money {
    font-size: 36px;
    letter-spacing: -1.5px;
    line-height: 1.15;
    gap: 4px;
  }
  .big-money span {
    font-size: 12px;
  }
  .overview-grid .hero-card .hero-amount > p {
    font-size: 12px;
    line-height: 18px;
    margin-top: 10px;
    max-width: 190px;
  }
  .hero-illustration {
    height: 120px;
  }
  .hero-illustration img {
    width: 125px;
    height: 125px;
  }
  .hero-orbit {
    width: 90px;
    height: 90px;
    box-shadow:
      0 0 0 12px #fff2ce33,
      0 0 0 24px #fff2ce22;
  }
  .hero-spark {
    font-size: 21px;
    top: 0;
    right: -3px;
  }
  .hero-signal {
    font-size: 12px;
    line-height: 18px;
    margin-top: 12px;
    gap: 6px;
  }
  .overview-grid .hero-bottom {
    padding-top: 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .overview-grid .hero-bottom strong {
    font-size: 14px;
  }
  .overview-grid .hero-card .btn.lime {
    padding: 10px 12px;
    font-size: 12px;
  }
  .balance-card {
    padding: 20px;
    border-radius: 22px;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
  }
  .balance-card > .section-title,
  .balance-card > .balance-caption {
    grid-column: auto;
  }
  .balance-card h2 {
    font-size: 15px;
    line-height: 22px;
  }
  .balance-overline {
    display: none;
  }
  .balance-number {
    font-size: 32px;
    letter-spacing: -1px;
  }
  .balance-card p {
    font-size: 12px;
  }
  .balance-card .balance-caption {
    display: none;
  }
  .balance-actions {
    margin-top: 0;
    gap: 10px;
  }
  .dashboard-secondary {
    gap: 14px;
  }
  .dashboard-secondary .spending-card {
    padding: 20px;
    border-radius: 22px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 6px 12px;
  }
  .dashboard-secondary .spending-card .section-title h2 {
    font-size: 16px;
  }
  .dashboard-secondary .spending-card .section-title .tag {
    padding: 5px 8px;
    font-size: 12px;
  }
  .dashboard-secondary .spending-card .chart-total {
    font-size: 25px;
    line-height: 31px;
  }
  .dashboard-secondary .spending-card .week-chart {
    gap: 5px;
    height: 106px;
  }
  .week-column > span {
    font-size: 12px;
  }
  .monthly-overview {
    padding: 20px;
    border-radius: 22px;
  }
  .monthly-overview > .section-title {
    margin-bottom: 18px;
  }
  .monthly-overview > .section-title h2 {
    font-size: 16px;
  }
  .monthly-overview .stats {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .monthly-overview .mini-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4px 12px;
  }
  .monthly-overview .mini-card + .mini-card {
    border-left: 0;
    border-top: 1px solid #e7e7dc;
    padding: 14px 0 0;
  }
  .monthly-overview .mini-card > span {
    grid-column: 1;
    grid-row: 1;
  }
  .monthly-overview .mini-card > strong {
    grid-column: 2;
    grid-row: 1/3;
    font-size: 22px;
    text-align: right;
    align-self: center;
  }
  .monthly-overview .mini-card > small {
    grid-column: 1;
    font-size: 12px;
  }
  .monthly-overview .stat-symbol {
    width: 22px;
    height: 22px;
    border-radius: 6px;
  }
  .detail-grid {
    gap: 14px;
  }
  .detail-grid .card {
    padding: 20px;
    border-radius: 22px;
  }
  .detail-grid .card > .section-title {
    margin-bottom: 12px;
  }
  .section-kicker {
    font-size: 12px;
    line-height: 18px;
    letter-spacing: 0.5px;
  }
  .detail-grid .explanation {
    padding: 0;
  }
  .explanation > summary {
    padding: 18px 20px;
  }
  .explanation-body {
    padding: 0 20px 16px;
  }
  .card {
    padding: 20px;
    border-radius: 22px;
  }
  .tx-note {
    font-weight: 550;
  }
  .tx-amount {
    font-size: 14px;
    line-height: 20px;
    font-weight: 550;
  }
  .capture-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }
  .capture-actions .btn {
    padding: 12px 8px;
    font-size: 12px;
  }
  .wallets {
    gap: 10px;
  }
  .wallet {
    padding: 16px;
    min-height: 110px;
    border-radius: 18px;
  }
  .wallet > span {
    white-space: normal;
  }
  .wallet > strong {
    font-size: 21px;
    line-height: 28px;
  }
  .wallet.add-wallet {
    min-height: 110px;
  }
  .page-buy .simulation h2 {
    font-size: 26px;
  }
  .page-buy .two-col > .card {
    gap: 16px;
  }
  .page-buy .simulation > .comparison {
    padding: 16px 12px;
  }
  .page-report .stats,
  .page-wealth .stats {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .page-report .mini-card,
  .page-wealth .mini-card {
    padding: 18px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px 12px;
    align-items: center;
  }
  .page-report .mini-card > strong,
  .page-wealth .mini-card > strong {
    font-size: 24px;
    line-height: 30px;
    text-align: right;
    overflow-wrap: anywhere;
  }
  .page-report .mini-card > small,
  .page-wealth .mini-card > small {
    grid-column: 1/-1;
  }
  .mobile-nav {
    background: #fffef8f5;
    border: 1px solid #dce2d2;
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -8px 28px #3343270d;
    padding: 8px 6px max(8px, env(safe-area-inset-bottom));
  }
  .mobile-nav .nav-item {
    height: 58px;
    border-radius: 14px;
    font-size: 12px;
  }
  .mobile-nav .nav-item.active,
  .mobile-nav .nav-item[data-context="report"] {
    background: var(--studio-forest);
    color: #fff;
  }
  .mobile-nav .nav-item[data-context="wealth"] {
    background: transparent;
    color: var(--studio-ink);
  }
  main {
    padding-bottom: 90px;
  }
  footer {
    padding: 18px;
  }
  dialog {
    padding: 22px;
    border-radius: 24px;
  }
}
@media (max-width: 359px) {
  .content {
    padding-left: 14px;
    padding-right: 14px;
  }
  .page-home .page-heading h1 {
    font-size: 32px;
  }
  .hero-main {
    grid-template-columns: minmax(0, 1fr) 64px;
  }
  .hero-illustration img {
    width: 95px;
    height: 95px;
  }
  .hero-orbit {
    width: 65px;
    height: 65px;
  }
  .big-money {
    font-size: 30px;
  }
  .monthly-overview .mini-card > strong {
    font-size: 19px;
  }
  .dashboard-secondary .spending-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .dashboard-secondary .spending-card .week-chart {
    grid-column: 1;
    grid-row: auto;
    height: 100px;
  }
  .dashboard-secondary .spending-card .hint {
    max-width: none;
  }
  .page-report .mini-card,
  .page-wealth .mini-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-report .mini-card > strong,
  .page-wealth .mini-card > strong {
    text-align: left;
  }
}
