* {
  box-sizing: border-box;
}
:root {
  color-scheme: dark;
  --bg: #080d17;
  --panel: #111827;
  --line: #263346;
  --text: #f8fafc;
  --muted: #a1aec0;
  --accent: #34d399;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.55 system-ui,
    Arial,
    sans-serif;
}
body.light {
  color-scheme: light;
  --bg: #f2f6f5;
  --panel: #fff;
  --line: #d4e0dc;
  --text: #14251f;
  --muted: #52675e;
  --accent: #047857;
}
main {
  max-width: 720px;
  margin: auto;
  padding: 24px 20px 110px;
}
h1 {
  font-size: 29px;
  line-height: 1.25;
  margin: 12px 0;
}
h2 {
  font-size: 17px;
}
p {
  margin: 10px 0;
}
small,
.eyebrow,
label {
  color: var(--muted);
  font-size: 13px;
}
button,
input,
select {
  font: inherit;
  border-radius: 12px;
  min-height: 48px;
  max-width: 100%;
  min-width: 0;
}
button {
  border: 0;
  background: #34d399;
  color: #05251b;
  font-weight: 700;
  padding: 12px 16px;
  cursor: pointer;
}
input,
select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 12px;
  width: 100%;
}
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
form {
  display: grid;
  gap: 12px;
}
label {
  margin-bottom: -8px;
}
.secondary,
.quiet {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.quiet {
  border: 0;
  color: var(--accent);
}
.login {
  max-width: 420px;
  margin: 6vh auto 0;
}
.login p {
  color: var(--muted);
  margin-bottom: 24px;
}
.login .quiet {
  display: block;
  margin-inline-start: auto;
}
.login .google {
  width: 100%;
}
.brandmark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  background: #34d399;
  color: #05251b;
  border-radius: 20px;
  font-size: 36px;
  font-weight: 900;
  margin: 24px 0 12px;
}
.wordmark {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  direction: ltr;
  display: inline-block;
}
.wordmark span {
  color: var(--accent);
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 30px;
}
#sync {
  font-size: 12px;
  color: var(--muted);
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  margin: 20px 0;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}
.grid > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
}
.grid > div:nth-child(3) {
  grid-column: 1/-1;
  grid-row: 1;
  background: linear-gradient(120deg, #064e3b, #12382f);
  color: #d1fae5;
  padding: 24px;
}
.grid > div:nth-child(3) strong {
  color: #fff;
  font-size: 32px;
}
.grid > div:nth-child(2) strong {
  color: #f87171;
}
.grid > div:last-child {
  grid-column: 1/-1;
}
strong {
  display: block;
  font-size: clamp(17px, 4.5vw, 25px);
  color: var(--accent);
  direction: ltr;
  text-align: start;
  overflow-wrap: anywhere;
  margin-top: 8px;
}
.quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
#month {
  width: auto;
  display: block;
  margin-top: 14px;
}
article {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
article button {
  min-height: 36px;
  padding: 6px 12px;
  margin: 8px 4px 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
}
progress {
  display: block;
  width: 100%;
  accent-color: var(--accent);
  margin: 12px 0;
}
nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 720px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  z-index: 5;
}
nav button {
  background: none;
  color: var(--muted);
  padding: 5px;
  display: grid;
  justify-items: center;
  gap: 2px;
}
nav button span {
  font-size: 25px;
  line-height: 1;
}
nav button.active,
nav button.active small {
  color: var(--accent);
}
#settings .panel button {
  display: block;
  width: 100%;
  margin: 10px 0;
}
.danger {
  background: transparent;
  color: #f87171;
  border: 1px solid #f87171;
}
#account {
  overflow-wrap: anywhere;
}
#authstatus {
  color: #f87171 !important;
}
[hidden] {
  display: none !important;
}
:root {
  --bg: #0d1917;
  --panel: #142420;
  --line: #2b4039;
  --text: #eff8f3;
  --muted: #a1b9ae;
  --accent: #6de3a4;
}
main {
  padding: 16px 16px 130px;
  max-width: 650px;
}
header {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 4;
  padding: 12px 0;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--line);
}
header .wordmark {
  font-size: 25px;
}
svg {
  width: 25px;
  height: 25px;
}
.iconbtn,
.monthbar button {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 10px;
  display: grid;
  place-items: center;
}
.monthbar {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 7px;
  border-radius: 20px;
  margin-bottom: 22px;
}
.monthbar input {
  flex: 1;
  text-align: center;
  border: 0;
  background: transparent;
  margin: 0 !important;
  width: 0 !important;
}
.monthbar button {
  font-size: 25px;
  min-width: 44px;
}
.grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.grid > div {
  padding: 12px 8px;
  text-align: center;
}
.grid > div:last-child {
  grid-column: auto;
}
.grid > div:nth-child(3) {
  background: radial-gradient(ellipse at top right, #245640, #142420 75%);
  text-align: start;
  padding: 24px;
}
.grid > div:nth-child(3) strong {
  font-size: 40px;
}
.grid strong {
  font-size: clamp(12px, 3.5vw, 20px);
  text-align: center;
}
.grid > div:nth-child(3) strong {
  text-align: start;
}
.quick {
  grid-template-columns: repeat(3, 1fr);
}
.quick button {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--accent);
  min-height: 76px;
  padding: 8px;
}
.panel {
  border-radius: 24px;
  padding: 18px;
}
.hero {
  font-size: 25px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--panel), #245640);
  color: #eff8f3;
}
nav {
  grid-template-columns: repeat(5, 1fr);
  max-width: 650px;
  backdrop-filter: blur(16px);
}
nav button {
  padding: 8px 0;
  min-width: 0;
}
nav small {
  font-size: 11px;
}
#fab {
  position: fixed;
  bottom: calc(88px + env(safe-area-inset-bottom));
  left: max(16px, calc((100vw - 650px) / 2 + 16px));
  width: 56px;
  height: 56px;
  border-radius: 20px;
  font-size: 32px;
  line-height: 1;
  z-index: 3;
  box-shadow: 0 8px 24px #0004;
  background: #6de3a4;
}
.donut {
  width: min(68%, 240px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 25px auto;
}
.donut > div {
  width: 66%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--panel);
  display: grid;
  place-items: center;
  font-weight: 800;
  direction: ltr;
  font-size: clamp(12px, 4vw, 22px);
}
#legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.legendrow {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  padding-inline-start: 8px;
  font-size: 13px;
}
.bars {
  display: flex;
  gap: 8px;
  height: 170px;
  direction: ltr;
}
.barcol {
  flex: 1;
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.barpair {
  flex: 1;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 4px;
}
.barpair div {
  width: 36%;
  border-radius: 5px 5px 0 0;
}
.filters {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
}
button {
  background: #6de3a4;
}
body.light .grid > div:nth-child(3) {
  background: linear-gradient(135deg, #16634b, #245640);
}
main {
  padding-bottom: 165px;
}
header {
  flex-wrap: wrap;
}
header .quiet {
  font-size: 0.75rem;
  padding: 6px;
}
.quick {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.quick button {
  font-size: 0.83rem;
  min-height: 58px;
}
#stats {
  background: linear-gradient(155deg, #214637, #122b23);
  padding: 12px;
  border: 1px solid #355747;
  border-radius: 26px;
  gap: 6px;
}
#stats > div {
  border: 0;
  background: #ffffff0b;
  color: #c0d6ca;
  border-radius: 12px;
}
#stats > div:nth-child(3) {
  background: none;
  padding: 14px 6px;
  color: #bcd5c8;
}
#stats strong {
  color: #9aefb9;
  font-variant-numeric: tabular-nums;
}
#stats > div:nth-child(2) strong {
  color: #f5a1a5;
}
#stats > div:nth-child(3) strong {
  font-size: clamp(25px, 8vw, 44px);
  color: white;
}
dialog {
  width: min(92vw, 420px);
  max-height: 84dvh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  color: var(--text);
  padding: 22px;
}
dialog::backdrop {
  background: #03120dcc;
}
dialog label {
  display: grid;
  gap: 5px;
  margin: 0;
}
dialog textarea {
  min-height: 100px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  padding: 12px;
  border-radius: 10px;
}
dialog p:empty {
  display: none;
}
.masked :is(#bars, #legend, #donut, progress) {
  visibility: hidden;
}
#connections button,
#schedule button,
#payday button {
  margin: 4px 2px;
}
body.light #stats {
  color: white;
}
#budgetsummary p {
  font-size: 15px;
}
nav {
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}
#fab {
  bottom: calc(80px + env(safe-area-inset-bottom));
}
article {
  line-height: 1.6;
}
header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 2px 8px;
}
header .wordmark {
  grid-column: 1;
  grid-row: 1;
  font-size: 22px;
}
header #sync {
  grid-column: 1;
  grid-row: 2;
  font-size: 10px;
}
header .quiet {
  grid-column: 2;
  grid-row: 1/3;
}
header .iconbtn {
  grid-column: 3;
  grid-row: 1/3;
}
.monthselect {
  flex: 1;
  position: relative;
  text-align: center;
  font-weight: 650;
  font-size: 15px;
  color: var(--text);
  margin: 0;
}
.monthselect #month {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100% !important;
  height: 100%;
}
.monthselect #month::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  cursor: pointer;
}
.check {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}
.check input {
  width: 18px;
  min-height: 20px;
}
.filters + .filters {
  margin-top: 8px;
}
#forecast {
  margin: 8px 0 16px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}
#forecast h2,
#forecast strong {
  font-size: 15px;
  margin: 0;
}
#forecast p {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 12px;
}
#forecast small {
  grid-column: 1/-1;
}
.monthbar button {
  min-height: 40px;
}
#home > .panel h2 {
  margin-top: 0;
}
header .wordmark {
  justify-self: start;
}
.grid > div:nth-child(3) strong {
  direction: inherit;
  text-align: start;
}
.quick button::before {
  display: block;
  font: 22px/1.3 system-ui;
  margin-bottom: 4px;
}
#quickexpense::before {
  content: "↗";
}
#quickincome::before {
  content: "↙";
}
#bank::before {
  content: "✉";
}
.quick [data-page="saving"]::before {
  content: "◎";
}
