:root {
  --ink: #10201a;
  --muted: #60726b;
  --line: #d9e7df;
  --paper: #fbfdfb;
  --soft: #eff8f3;
  --green: #248464;
  --green-dark: #0f6a4d;
  --mint: #dff5ea;
  --gold: #d8a640;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 10%, rgba(36, 132, 100, 0.14), transparent 28rem),
    linear-gradient(180deg, #f8fcfa 0%, #ffffff 62%);
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

.app-header {
  min-height: 76px;
  padding: 18px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand,
.back-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 1.2rem;
}

.back-link {
  color: var(--muted);
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.landing {
  overflow: hidden;
}

.hero {
  min-height: calc(88vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  align-items: center;
  gap: clamp(32px, 7vw, 104px);
  padding: 68px 0 44px;
}

.eyebrow,
.card-label {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.55rem, 7vw, 5.65rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lede {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.7;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-pills span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.84);
  font-size: 0.92rem;
  font-weight: 900;
}

.primary-action,
.secondary-action {
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid var(--green);
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
}

.primary-action {
  color: white;
  background: var(--green);
  box-shadow: 0 12px 32px rgba(36, 132, 100, 0.24);
}

.secondary-action {
  color: var(--green-dark);
  background: white;
}

.note {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.score-card,
.wealth-preview,
.benefit-card,
.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(33, 68, 55, 0.08);
}

.score-card {
  padding: 28px;
  display: grid;
  gap: 24px;
}

.wealth-preview {
  position: relative;
  padding: 24px;
  display: grid;
  gap: 22px;
  min-width: 0;
  overflow: hidden;
}

.preview-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: flex-start;
}

.preview-top .status-pill {
  max-width: 100%;
  white-space: nowrap;
}

.score-ring {
  width: 190px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  justify-self: center;
  background:
    radial-gradient(circle at center, white 58%, transparent 59%),
    conic-gradient(var(--green) 72%, var(--mint) 0);
}

.score-ring span {
  font-size: 4.8rem;
  font-weight: 900;
}

.score-ring small {
  margin-left: -24px;
  align-self: end;
  padding-bottom: 48px;
  color: var(--muted);
  font-weight: 800;
}

.preview-bars {
  display: grid;
  gap: 16px;
}

.preview-bars div {
  display: grid;
  gap: 8px;
}

.preview-bars div > span {
  color: var(--muted);
  font-weight: 800;
}

.preview-bars strong {
  font-size: 1.2rem;
}

.gold-bar span {
  background: var(--gold);
}

.benefits {
  padding: 20px 0 76px;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.benefit-card {
  padding: 22px;
}

.benefit-card span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 20px;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
}

.benefit-card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.benefit-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.dashboard {
  padding: 48px 0 72px;
}

.dashboard-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}

.dashboard h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 22px;
}

.metric-card p,
.metric-card span {
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 8px 0 2px;
  font-size: 2.4rem;
}

.metric-card.accent {
  background: var(--green);
  color: white;
}

.metric-card.accent p,
.metric-card.accent span {
  color: rgba(255, 255, 255, 0.82);
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -8px 0 22px;
}

.flow-steps span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--green-dark);
  background: var(--soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.workbench {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}

.form-grid label {
  display: grid;
  gap: 8px;
  color: #40534c;
  font-weight: 800;
}

.form-grid input,
.form-grid select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 800;
}

.money-input {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.money-input span {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-weight: 900;
}

.money-input input {
  min-height: 46px;
  border: 0;
  border-radius: 0;
  padding-left: 6px;
}

.check-row {
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 0 12px;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.form-submit {
  grid-column: 1 / -1;
}

.small-action {
  min-height: 38px;
  padding-inline: 14px;
}

.history-panel {
  margin-top: 16px;
}

.history-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.history-item {
  display: grid;
  grid-template-columns: 90px repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.history-item strong {
  display: block;
}

.history-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--paper);
}

.panel {
  padding: 24px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.habit-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}

.habit-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.plant-panel {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  align-items: center;
}

.plant {
  position: relative;
  height: 210px;
}

.stem {
  position: absolute;
  left: 73px;
  bottom: 54px;
  width: 8px;
  height: 112px;
  border-radius: 999px;
  background: var(--green);
}

.leaf {
  position: absolute;
  width: 70px;
  height: 42px;
  border-radius: 70% 12px 70% 12px;
  background: #49b985;
  top: 52px;
}

.leaf.left {
  left: 16px;
  transform: rotate(-18deg);
}

.leaf.right {
  right: 12px;
  transform: scaleX(-1) rotate(-18deg);
}

.pot {
  position: absolute;
  left: 36px;
  bottom: 22px;
  width: 86px;
  height: 54px;
  border-radius: 8px 8px 20px 20px;
  background: var(--gold);
}

.progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--mint);
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

@media (max-width: 820px) {
  .app-header {
    padding-inline: 20px;
  }

  .hero,
  .panel-grid,
  .plant-panel,
  .workbench {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 42px 0;
  }

  .score-card {
    order: -1;
  }

  .wealth-preview {
    order: -1;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .form-grid,
  .history-item,
  .benefit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 28px, 1120px);
  }

  h1 {
    font-size: clamp(2.25rem, 12vw, 3.35rem);
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-top {
    display: grid;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .panel-heading {
    display: grid;
  }

  .flow-steps span {
    width: 100%;
  }
}
