:root {
  --green-900: #0c2b1c;
  --green-700: #14532d;
  --green-500: #16a34a;
  --green-100: #dcfce7;
  --sand: #f7f6f1;
  --ink: #1c1f1d;
  --muted: #5b6660;
  --amber: #d97706;
  --red: #dc2626;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--sand);
  color: var(--ink);
  line-height: 1.55;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 1.25rem; }

.hero {
  background: linear-gradient(150deg, var(--green-900), var(--green-700));
  color: #fff;
  padding: 3.5rem 0 4.5rem;
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}
.brand span { color: #86efac; }

.hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.15; max-width: 22ch; }
.hero .sub { margin-top: 1rem; max-width: 55ch; opacity: 0.85; }

main { margin-top: -2.5rem; padding-bottom: 3rem; }

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(12, 43, 28, 0.08);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.field { flex: 1 1 100%; }
.field.half { flex: 1 1 calc(50% - 0.75rem); }

.field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.field .val { color: var(--green-500); font-variant-numeric: tabular-nums; font-weight: 700; }

input[type="range"] { width: 100%; accent-color: var(--green-500); }

select, input[type="email"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d7ddd9;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
}

.result { display: block; }

.total {
  font-size: 3rem;
  font-weight: 800;
  color: var(--green-700);
  font-variant-numeric: tabular-nums;
}
.total small { font-size: 1rem; font-weight: 600; color: var(--muted); margin-left: 0.4rem; }

.bars { margin: 1.25rem 0; display: grid; gap: 0.55rem; }

.bar-row { display: grid; grid-template-columns: 90px 1fr 70px; align-items: center; gap: 0.75rem; font-size: 0.88rem; }
.bar-row .label { color: var(--muted); }
.bar-row .track { background: var(--green-100); border-radius: 99px; height: 12px; overflow: hidden; }
.bar-row .fill { background: var(--green-500); height: 100%; border-radius: 99px; transition: width 0.25s ease; }
.bar-row .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }

.compare { font-size: 0.95rem; padding: 0.9rem 1rem; border-radius: 10px; background: var(--green-100); }
.compare.over { background: #fef3c7; }
.compare.way-over { background: #fee2e2; }
.compare strong { font-variant-numeric: tabular-nums; }

.save { display: flex; gap: 0.75rem; margin-top: 1.25rem; flex-wrap: wrap; }
.save input { flex: 1 1 260px; }

button {
  background: var(--green-700);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.7rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}
button:hover { background: var(--green-900); }
button:disabled { opacity: 0.6; cursor: default; }

.status { margin-top: 0.6rem; font-size: 0.88rem; color: var(--green-700); min-height: 1.2em; }
.status.error { color: var(--red); }

.community {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0.5rem 0 1rem;
}
.community strong { color: var(--green-700); }

footer {
  background: var(--green-900);
  color: #cde8d8;
  padding: 1.4rem 0;
  font-size: 0.88rem;
  text-align: center;
}
