:root {
  color-scheme: dark;
  --paper: #101d19;
  --ink: #f4faf6;
  --muted: #b8cabf;
  --line: #527264;
  --green: #3eb187;
  --surface: #193c2f;
  font-family: system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  background: radial-gradient(ellipse 85% 32rem at 90% 0%, #1d844a 0%, #193c2f 55%, transparent 100%), var(--paper);
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #78dbb1;
}
.wrap {
  width: min(1080px, calc(100% - 48px));
  margin: auto;
}
header {
  border-bottom: 1px solid var(--line);
  background: #101d1940;
}
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 10px;
}
.brand {
  font-weight: 650;
  font-size: 25px;
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand span {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--green);
  color: #101d19;
  font-size: 13px;
}
.quiet,
p,
dt,
.filter {
  color: var(--muted);
}
.heading,
.section-head,
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.heading {
  margin-top: 50px;
}
.heading p {
  margin: 8px 0 0;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font:
    650 clamp(30px, 4vw, 44px)/1.08 system-ui, sans-serif;
  letter-spacing: -0.04em;
}
h2 {
  font-size: 17px;
  font-weight: 650;
}
button,
select,
input {
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
}
button:hover {
  filter: brightness(0.94);
}
.primary {
  background: var(--green);
  color: var(--ink);
  border-color: #78dbb1;
  font-weight: 650;
}
.link {
  background: none;
  border: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: #78dbb1;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 18px;
}
#status {
  min-height: 31px;
  padding: 5px 0;
  font-size: 14px;
}
.panel,
.balance {
  border-radius: 18px;
  padding: 25px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
}
.balance {
  isolation: isolate;
  background: linear-gradient(125deg, #13241f, #193c2f);
  border: 1px solid var(--line);
  color: #fff;
  overflow: hidden;
  position: relative;
  min-height: 206px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
}
.balance::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 270px;
  height: 270px;
  right: -95px;
  top: -58px;
  border: 1px solid #1ec67760;
  border-radius: 50%;
  box-shadow:
    0 0 0 28px #1ec67720,
    0 0 0 56px #1ec67720;
}
.balance strong {
  font:
    550 clamp(44px, 7vw, 68px)/1 system-ui, sans-serif;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.balance p {
  color: #ecf9ee;
}
.summary dl {
  margin: 12px 0 0;
}
.summary dl div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.summary dl div:last-child {
  border: 0;
  padding-bottom: 0;
}
dd {
  margin: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.goal progress {
  width: 100%;
  height: 12px;
  accent-color: #78dbb1;
  margin: 12px 0;
}
.goal p {
  overflow-wrap: anywhere;
}
.filter {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}
.filter select {
  padding: 7px;
}
.empty {
  padding: 35px 0 22px;
}
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border-bottom: 0;
}
.row p {
  font-size: 13px;
  margin-top: 3px;
}
.row strong {
  overflow-wrap: anywhere;
}
.row .link {
  padding: 6px 8px;
}
.row-right {
  text-align: right;
}
.positive {
  color: #78dbb1;
}
footer {
  padding: 22px 0 32px;
  font-size: 13px;
}
dialog {
  width: min(450px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  color: var(--ink);
  background: var(--surface);
}
dialog::backdrop {
  background: #052316b5;
}
dialog form,
dialog label {
  display: grid;
  gap: 8px;
}
dialog form {
  gap: 15px;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.error {
  color: #ffb6af;
}
.error:empty {
  display: none;
}
button[hidden] {
  display: none;
}
@media (max-width: 720px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .heading {
    margin-top: 30px;
    align-items: flex-start;
    flex-direction: column;
  }
  .heading .primary {
    width: 100%;
  }
  .panel,
  .balance {
    padding: 19px;
  }
  .masthead {
    min-height: 60px;
  }
  .masthead .quiet {
    font-size: 13px;
  }
  .balance {
    min-height: 168px;
  }
  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  footer button:first-child {
    padding-left: 0;
  }
}
