:root {
  --ink: #07150f;
  --forest: #0c2b20;
  --green: #24df87;
  --mint: #a5f5cb;
  --paper: #f5f7f4;
  --white: #fff;
  --muted: #67736d;
  --line: #dfe5e1;
  --amber: #f7b84b;
  --rose: #ff6f79;
  --shadow: 0 18px 55px rgba(4, 26, 16, 0.16);
}
.cancel-link {
  display: block;
  text-align: center;
  text-decoration: none;
  background: #0c2b20;
  color: #fff;
  border-radius: 14px;
  padding: 14px;
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 850;
}
.cancel-link:focus-visible {
  outline: 3px solid rgba(36, 223, 135, 0.45);
  outline-offset: 2px;
}
.subscription-list {
  gap: 20px !important;
}
.expense-group {
  display: grid;
  gap: 9px;
}
.expense-group-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 0 6px;
}
.expense-group-head .eyebrow {
  margin-bottom: 3px;
}
.expense-group-head h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.group-total {
  display: flex;
  align-items: baseline;
  color: #0a633d;
}
.group-total strong {
  font-size: 1.05rem;
}
.group-total span {
  font-size: 0.7rem;
  font-weight: 750;
  color: var(--muted);
}
.expense-items {
  display: grid;
  gap: 9px;
}
.empty.compact {
  padding: 18px;
  font-size: 0.8rem;
}
.dashboard-section {
  margin: 0 14px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(7, 21, 15, 0.035);
  overflow: hidden;
}
.dashboard-section > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.dashboard-section > summary::-webkit-details-marker {
  display: none;
}
.dashboard-section > summary small,
.dashboard-section > summary strong {
  display: block;
}
.dashboard-section > summary small {
  margin-bottom: 4px;
  color: #708078;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.13em;
}
.dashboard-section > summary strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.section-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
}
.section-chevron {
  width: 30px;
  height: 30px;
  display: grid !important;
  place-items: center;
  border-radius: 10px;
  background: #eef3f0;
  color: #0a633d;
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 0.2s;
}
.dashboard-section[open] .section-chevron {
  transform: rotate(180deg);
}
.dashboard-section[open] > summary {
  border-bottom: 1px solid #edf0ee;
}
.dashboard-section > summary:focus-visible {
  outline: 3px solid rgba(36, 223, 135, 0.42);
  outline-offset: -3px;
}
.section-panel {
  padding: 14px;
}
.section-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 14px;
}
.section-panel .subscription-list {
  padding: 0;
}
.dashboard-section + .dashboard-section {
  margin-top: 12px;
}
.recurring-cost {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 13px;
  border-radius: 14px;
  background: #0c2b20;
  color: #fff;
}
.recurring-cost span {
  color: #b8c7bf;
  font-size: 0.78rem;
  font-weight: 700;
}
.recurring-cost strong {
  color: var(--green);
  font-size: 0.92rem;
  white-space: nowrap;
}
.settings-sheet h2 {
  margin-bottom: 14px;
}
.account-card {
  margin-bottom: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfb;
}
.account-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.account-card-head span,
.account-card-head strong {
  display: block;
}
.account-card-head span {
  color: #708078;
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}
.account-card-head strong {
  margin-top: 3px;
  font-size: 0.95rem;
}
.account-status {
  padding: 6px 9px;
  border-radius: 999px;
  background: #e8f8ef !important;
  color: #0a633d !important;
  font-size: 0.7rem !important;
  letter-spacing: 0 !important;
}
.account-card p {
  margin: 9px 0 0;
  color: #496057;
  font-size: 0.78rem;
  line-height: 1.5;
}
.account-action {
  margin-top: 11px !important;
}
.privacy-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #e8f8ef;
  border: 1px solid #c8ebd7;
}
.privacy-shield {
  flex: 0 0 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #0d3928;
  color: var(--green);
  font-weight: 900;
}
.privacy-card strong,
.privacy-clause h3 {
  font-size: 0.9rem;
}
.privacy-card p,
.privacy-clause p {
  margin: 4px 0 0;
  color: #496057;
  font-size: 0.78rem;
  line-height: 1.5;
}
.privacy-clause {
  margin: 13px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfb;
}
.privacy-clause h3 {
  margin: 0 0 7px;
}
.privacy-clause p + p {
  margin-top: 10px;
}
.danger-button {
  width: 100%;
  border: 1px solid #f0c5c8;
  border-radius: 14px;
  padding: 14px;
  background: #fff1f2;
  color: #a62d37;
  font-weight: 850;
}
.settings-sheet .secondary {
  margin-top: 8px;
}
.signed-out-screen {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--forest);
}
.signed-out-screen[hidden] {
  display: none;
}
.signed-out-card {
  width: min(100%, 390px);
  padding: 30px 24px;
  border-radius: 24px;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}
.signed-out-card .brand-mark {
  margin: 0 auto 20px;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 1.55rem;
}
.signed-out-card .eyebrow {
  margin-bottom: 8px;
}
.signed-out-card h2 {
  margin: 0;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}
.signed-out-card p {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.session-locked {
  overflow: hidden;
}
.welcome-overlay {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: rgba(3, 18, 12, 0.88);
  backdrop-filter: blur(8px);
}
.welcome-overlay[hidden] {
  display: none;
}
.welcome-card {
  width: min(100%, 440px);
  padding: 25px 21px 18px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}
.welcome-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 15px;
  background: var(--mint);
  color: var(--forest);
  font-size: 1.6rem;
  font-weight: 900;
}
.welcome-card h2 {
  margin: 5px 0 9px;
  color: var(--forest);
  font-size: 1.65rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.welcome-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.welcome-steps {
  display: grid;
  gap: 11px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}
.welcome-steps li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 11px;
  align-items: start;
}
.welcome-steps li > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #e9f9f0;
  color: var(--forest);
  font-weight: 900;
}
.welcome-steps strong {
  color: var(--forest);
  font-size: 0.92rem;
}
.welcome-steps p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}
.welcome-privacy {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 9px;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 14px;
  background: #f2f7f4;
}
.welcome-privacy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}
.welcome-privacy strong {
  color: var(--forest);
}
.welcome-card .primary {
  width: 100%;
}
.welcome-later {
  width: 100%;
  padding: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
}
.onboarding-focus {
  outline: 3px solid var(--mint);
  outline-offset: 3px;
}
@media (max-height: 700px) {
  .welcome-overlay { place-items: start center; }
  .welcome-card { padding-top: 20px; }
  .welcome-steps { margin: 13px 0; }
}
.plan-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 13px;
  padding: 14px;
  border-radius: 16px;
  background: var(--forest);
  color: #fff;
}
.plan-card span,
.plan-card strong,
.plan-card p {
  display: block;
}
.plan-card span {
  color: var(--mint);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}
.plan-card strong {
  margin-top: 4px;
  font-size: 1rem;
}
.plan-card p {
  margin: 2px 0 0;
  color: #b8c7bf;
  font-size: 0.75rem;
}
.plan-card > b {
  color: var(--green);
  font-size: 1.25rem;
  white-space: nowrap;
}
.plan-card b small {
  color: #b8c7bf;
  font-size: 0.7rem;
}
* {
  box-sizing: border-box;
}
html {
  background: #dce6df;
}
body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% -10%, #d4ffe8 0, transparent 35%), #eaf0ec;
  min-height: 100vh;
}
button,
input,
select {
  font: inherit;
}
.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: auto;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding-bottom: 34px;
}
.topbar {
  height: 76px;
  background: var(--forest);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  color: white;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: white;
  text-decoration: none;
  font-weight: 760;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--green);
  color: #062216;
  font-weight: 900;
}
.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  padding: 10px;
}
.icon-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero {
  background: var(--forest);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 22px 34px;
}
.hero > div:first-child {
  min-width: 0;
}
.eyebrow {
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  margin: 0 0 8px;
  color: #708078;
}
.hero .eyebrow {
  color: var(--mint);
}
h1 {
  font-size: clamp(2.15rem, 10vw, 2.75rem);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.06em;
  white-space: nowrap;
}
h1 small {
  font-size: 1rem;
  color: #a6b8ae;
  font-weight: 550;
  letter-spacing: 0;
}
.yearly {
  margin: 9px 0 0;
  color: #b8c7bf;
  font-size: 0.85rem;
}
.balance-indicator {
  flex: 0 0 104px;
  width: 104px;
  height: 104px;
  border: 7px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  transition: border-color 0.2s;
}
.balance-indicator.ahead {
  border-top-color: var(--green);
  border-right-color: var(--green);
}
.balance-indicator.deficit {
  border-bottom-color: var(--rose);
  border-left-color: var(--rose);
}
.balance-indicator .balance-arrow {
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 0.8;
}
.balance-indicator.ahead .balance-arrow,
.balance-indicator.ahead strong {
  color: var(--green);
}
.balance-indicator.deficit .balance-arrow,
.balance-indicator.deficit strong {
  color: var(--rose);
}
.balance-indicator.neutral .balance-arrow,
.balance-indicator.neutral strong {
  color: #b8c7bf;
}
.balance-indicator strong {
  display: block;
  margin-top: 5px;
  font-size: 1rem;
  line-height: 1;
}
.balance-indicator small {
  display: block;
  margin-top: 5px;
  color: #b8c7bf;
  font-size: 0.5rem;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: 0.09em;
}
.impact-grid {
  margin: -1px 16px 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: white;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 8px 24px rgba(7, 21, 15, 0.07);
  overflow: hidden;
}
.impact-grid article {
  padding: 17px 10px 15px;
  text-align: center;
  border-right: 1px solid #edf0ee;
}
.impact-grid article:last-child {
  border: 0;
}
.impact-grid strong {
  display: block;
  font-size: 1.08rem;
}
.impact-grid small {
  color: var(--muted);
  font-size: 0.7rem;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
}
.amber {
  background: var(--amber);
}
.green {
  background: var(--green);
}
.rose {
  background: var(--rose);
}
.section-head {
  padding: 0 20px 12px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}
.section-head h2,
.sheet h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}
.add-button {
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  padding: 10px 13px;
  font-weight: 750;
}
.add-button span {
  color: var(--green);
  font-size: 1.2rem;
}
.subscription-list {
  padding: 0 14px;
  display: grid;
  gap: 9px;
}
.subscription {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  box-shadow: 0 4px 14px rgba(7, 21, 15, 0.035);
}
.service-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e9f8ef;
  color: #11603c;
  font-weight: 900;
  font-size: 1.1rem;
}
.subscription h3 {
  font-size: 0.97rem;
  margin: 0 0 4px;
}
.subscription p {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}
.price {
  text-align: right;
}
.price strong {
  display: block;
  font-size: 0.92rem;
}
.cancel-button {
  border: 0;
  background: none;
  color: #b6424b;
  padding: 4px 0;
  font-size: 0.72rem;
  font-weight: 800;
}
.empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--muted);
  background: white;
  border: 1px dashed #cdd5d0;
  border-radius: 18px;
}
.promise {
  margin: 24px 16px 0;
  background: #e8f8ef;
  border: 1px solid #c8ebd7;
  border-radius: 18px;
  padding: 15px;
  display: flex;
  gap: 12px;
}
.promise-icon {
  flex: 0 0 30px;
  height: 30px;
  border-radius: 10px;
  background: #0d3928;
  color: var(--green);
  display: grid;
  place-items: center;
  font-weight: 900;
}
.promise strong {
  font-size: 0.84rem;
}
.promise p {
  font-size: 0.75rem;
  line-height: 1.45;
  color: #496057;
  margin: 3px 0 0;
}
dialog {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(100% - 20px, 460px);
  max-height: calc(100vh - 24px);
}
dialog::backdrop {
  background: rgba(1, 12, 7, 0.66);
  backdrop-filter: blur(3px);
}
.sheet {
  position: relative;
  background: white;
  border-radius: 24px;
  padding: 26px 20px 22px;
  box-shadow: var(--shadow);
  overflow: auto;
}
.sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 10px;
  background: #d8dedb;
  position: absolute;
  top: 10px;
  left: calc(50% - 21px);
}
.close {
  position: absolute;
  right: 16px;
  top: 17px;
  border: 0;
  background: #eff2f0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
}
.sheet h2 {
  margin-bottom: 20px;
}
.sheet label {
  display: grid;
  gap: 7px;
  color: #435049;
  font-size: 0.78rem;
  font-weight: 750;
  margin: 13px 0;
}
.sheet input,
.sheet select {
  width: 100%;
  padding: 13px;
  border: 1px solid #ccd5d0;
  border-radius: 12px;
  background: white;
  color: var(--ink);
  font-size: 16px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.primary,
.secondary {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px;
  font-weight: 850;
  margin-top: 10px;
}
.primary {
  background: var(--green);
  color: #052415;
}
.secondary {
  background: #eef2ef;
  color: #39483f;
}
.savings-callout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--forest);
  color: white;
  border-radius: 16px;
  padding: 15px;
  margin-bottom: 18px;
}
.savings-callout span {
  color: #b8c9c0;
  font-size: 0.82rem;
}
.savings-callout strong {
  color: var(--green);
}
.steps {
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: item;
}
.steps li {
  counter-increment: item;
  position: relative;
  padding: 0 0 18px 42px;
  min-height: 40px;
  font-size: 0.86rem;
  line-height: 1.45;
}
.steps li:before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: -2px;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #e6f8ee;
  color: #0a5c38;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.steps li strong {
  display: block;
  margin-bottom: 2px;
}
.note {
  background: #fff8e8;
  border: 1px solid #f5dfae;
  border-radius: 14px;
  padding: 13px;
  margin: 2px 0 8px;
}
.note strong {
  font-size: 0.8rem;
}
.note p {
  font-size: 0.74rem;
  line-height: 1.4;
  color: #655936;
  margin: 3px 0 0;
}
.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 20px);
  background: #07150f;
  color: white;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 0.82rem;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transition: 0.22s;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 370px) {
  .balance-indicator {
    flex-basis: 92px;
    width: 92px;
    height: 92px;
  }
  .hero {
    padding-left: 17px;
    padding-right: 17px;
  }
}
@media (min-width: 600px) {
  body {
    padding: 28px 0;
  }
  .app-shell {
    width: min(calc(100% - 48px), 820px);
    min-height: calc(100vh - 56px);
    border-radius: 28px;
    overflow: hidden;
  }
  .topbar {
    height: 76px;
    padding-inline: 32px;
  }
  .brand {
    font-size: 1.15rem;
  }
  .hero {
    padding: 34px 32px 42px;
  }
  .hero h1 {
    font-size: 3rem;
  }
  .balance-indicator {
    flex-basis: 124px;
    width: 124px;
    height: 124px;
  }
  .impact-grid {
    margin: -1px 24px 30px;
  }
  .impact-grid article {
    padding: 20px 14px 18px;
  }
  .dashboard-section {
    margin-left: 24px;
    margin-right: 24px;
  }
  .dashboard-section > summary {
    min-height: 82px;
    padding: 20px 22px;
  }
  .dashboard-section > summary strong {
    font-size: 1.15rem;
  }
  .section-panel {
    padding: 22px;
  }
  .subscription-list {
    padding: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .promise {
    margin: 26px 24px 0;
    padding: 18px;
  }
  .section-actions {
    margin-bottom: 18px;
  }
  dialog {
    width: min(calc(100% - 48px), 720px);
  }
  .sheet {
    padding: 34px 30px 28px;
  }
  .sheet h2 {
    font-size: 1.55rem;
  }
  .toast {
    font-size: 0.9rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
