:root {
  color-scheme: light;
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  background: #f6f7fb;
  color: #172033;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, #dff7ef 0, transparent 38rem),
    #f6f7fb;
}

main {
  width: min(54rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4rem 0;
}

.eyebrow {
  color: #087f68;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 14ch;
  margin: 0.5rem 0 1rem;
  font-size: clamp(2.6rem, 8vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.lede {
  max-width: 38rem;
  color: #596174;
  font-size: 1.1rem;
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.card {
  padding: 1.25rem;
  border: 1px solid #e0e4eb;
  border-radius: 1rem;
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 0.75rem 2rem rgb(44 55 78 / 8%);
}

.card strong {
  display: block;
  margin-bottom: 0.4rem;
}

.card span {
  color: #6b7280;
  line-height: 1.45;
}

.status {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 2rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: #e7f8f2;
  color: #086f5d;
  font-size: 0.9rem;
  font-weight: 700;
}

.status::before {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #12a37f;
  content: "";
}

a { color: #087f68; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { border: 0; border-radius: .7rem; padding: .7rem 1rem; background: #087f68; color: white; font-weight: 750; cursor: pointer; }
button.secondary { background: #e8ecef; color: #172033; }
button.danger { background: #ad2e3e; }
label { display: grid; gap: .4rem; margin: .85rem 0; font-weight: 700; }
input, textarea, select { width: 100%; padding: .7rem; border: 1px solid #ccd3dc; border-radius: .65rem; background: white; color: #172033; }
textarea { min-height: 6rem; resize: vertical; }
fieldset { margin: 1rem 0; border: 1px solid #dce1e8; border-radius: .7rem; }
.check { display: inline-flex; grid-template-columns: auto 1fr; align-items: center; margin: .5rem .8rem .5rem 0; }
.check input { width: auto; }
.topbar { display: flex; align-items: center; gap: 1.2rem; min-height: 4rem; padding: .7rem max(1rem, calc((100vw - 54rem) / 2)); background: rgb(255 255 255 / 92%); border-bottom: 1px solid #e0e4eb; }
.topbar nav { display: flex; gap: 1rem; flex: 1; }
.brand { color: #172033; font-size: 1.1rem; font-weight: 850; }
.page-heading, .section-head, .task-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.page-title { font-size: clamp(2rem, 6vw, 3.4rem); }
.balance { padding: .6rem .9rem; border-radius: 999px; background: #e7f8f2; color: #086f5d; font-weight: 850; }
.big-balance { color: #086f5d; }
.narrow { width: min(35rem, calc(100% - 2rem)); }
.panel, .task, .empty { padding: 1.25rem; border: 1px solid #e0e4eb; border-radius: 1rem; background: rgb(255 255 255 / 92%); box-shadow: 0 .75rem 2rem rgb(44 55 78 / 7%); }
.task-list, .ledger { display: grid; gap: 1rem; }
.task h2 { margin: .35rem 0; }
.task.overdue { border-color: #e9a4ad; }
.pill { display: inline-block; padding: .2rem .55rem; border-radius: 999px; background: #edf0f5; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.money, .positive { color: #087f68; }
.negative, .error { color: #ad2e3e; }
.status-line { text-transform: capitalize; font-weight: 800; }
.admin-grid, .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.row-link, .ledger > div, .compact { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid #e6e9ee; color: #172033; }
.row-link span, .compact span, .ledger span { display: grid; gap: .2rem; }
small, .muted, .task p { color: #687185; }
.inline { display: inline; margin: 0; }
.compact input { max-width: 7rem; }
.answer { margin: 1rem 0; padding: 1rem; border-radius: .75rem; background: #f3f5f8; }
.week-progress { margin-bottom: 1rem; }
.week-progress h2 { margin: .35rem 0; }
.week-progress progress { width: 100%; height: .8rem; accent-color: #087f68; }
.week-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: .6rem; margin-top: 1rem; }
.week-day { display: grid; gap: .2rem; padding: .7rem; border-radius: .7rem; background: #f3f5f8; text-align: center; }

@media (max-width: 42rem) {
  main { padding: 2rem 0; }
  .topbar { flex-wrap: wrap; gap: .7rem; }
  .topbar nav { order: 3; width: 100%; }
  .topbar > strong { margin-left: auto; }
  .page-heading .balance { display: none; }
  .compact { align-items: end; flex-wrap: wrap; }
  .week-days { grid-template-columns: repeat(2, 1fr); }
}
