:root {
  color-scheme: dark;
  --bg: #0b0b09;
  --panel: #151512;
  --panel-2: #1c1c18;
  --line: #34332d;
  --ink: #f7f3e8;
  --muted: #a7a399;
  --gold: #f4bd24;
  --gold-soft: #ffe08a;
  --green: #70ca91;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: #050504; }

body {
  display: grid;
  place-items: start center;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

p { margin: 0; }

.dashboard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(0.65rem, 1.5vh, 1rem);
  width: min(100%, 430px);
  min-height: 100svh;
  padding:
    max(1.1rem, env(safe-area-inset-top))
    1rem
    max(1rem, env(safe-area-inset-bottom));
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 5%, rgba(244, 189, 36, 0.12), transparent 15rem),
    var(--bg);
}

.dashboard::before {
  position: absolute;
  z-index: 0;
  right: -2.8rem;
  top: 5.5rem;
  content: "10";
  color: rgba(244, 189, 36, 0.035);
  font-size: 15rem;
  font-weight: 950;
  line-height: 0.8;
  letter-spacing: -0.13em;
  pointer-events: none;
}

.dashboard > * { position: relative; z-index: 1; }

.topbar,
.day-banner,
.savings-topline,
.progress-labels,
.method-card,
.pace-row,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar { min-height: 2.4rem; }

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.brand-ten { color: var(--gold); font-size: 1.8rem; }
.brand-arrow { color: #666258; font-size: 0.9rem; }
.brand-year { font-size: 1rem; }

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(21, 21, 18, 0.8);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-pill span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0.2rem rgba(112, 202, 145, 0.11);
}

.day-banner {
  align-items: flex-end;
  min-height: clamp(5.5rem, 12vh, 7rem);
  padding: 0.8rem 0.15rem 0.3rem;
}

.day-banner p,
.savings-topline p,
.method-card p,
.stat-card p,
.pace-row p {
  color: var(--muted);
  font-size: clamp(0.58rem, 1.45vw, 0.68rem);
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.day-banner > div:first-child { display: flex; align-items: baseline; gap: 0.8rem; }
.day-banner > div:first-child strong { color: var(--gold); font-size: clamp(4rem, 18vw, 5.3rem); line-height: 0.8; letter-spacing: -0.09em; }
.day-total { display: flex; align-items: baseline; gap: 0.35rem; padding-bottom: 0.15rem; color: var(--muted); }
.day-total span { font-size: 0.75rem; }
.day-total strong { color: var(--ink); font-size: 1.15rem; }

.savings-card {
  padding: clamp(1rem, 2.8vh, 1.35rem);
  border: 1px solid #484231;
  border-radius: 1.1rem;
  background: linear-gradient(145deg, #211e15, var(--panel));
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.23);
}

.savings-topline strong { color: var(--gold-soft); font-size: 0.72rem; letter-spacing: 0.06em; }

.total {
  margin: clamp(0.6rem, 1.8vh, 1rem) 0 clamp(0.65rem, 1.6vh, 0.9rem);
  font-size: clamp(3.25rem, 15vw, 4.5rem);
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.progress-track {
  height: 0.62rem;
  overflow: hidden;
  border-radius: 99px;
  background: #3a382f;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d89c00, var(--gold-soft));
  transition: width 500ms ease;
}

.progress-labels { margin-top: 0.55rem; color: var(--muted); font-size: 0.58rem; }
.progress-labels strong { color: var(--ink); }

.method-card {
  justify-content: flex-start;
  gap: 0.7rem;
  min-height: clamp(3.8rem, 8vh, 4.4rem);
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--panel);
}

.method-icon {
  display: grid;
  flex: 0 0 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 0.7rem;
  background: var(--gold);
  color: #18140a;
  font-size: 1.2rem;
  font-weight: 950;
}

.method-card strong { display: block; margin-top: 0.1rem; font-size: 1rem; letter-spacing: -0.02em; }
.method-check { margin-left: auto; color: var(--green); font-size: 1.2rem; font-weight: 950; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.45rem, 1vh, 0.65rem);
}

.stat-card {
  min-height: clamp(4.2rem, 9vh, 5rem);
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--panel);
}

.stat-card.accent { border-color: #5a4b20; background: linear-gradient(145deg, #211e15, var(--panel)); }
.stat-card strong { display: block; margin-top: 0.3rem; font-size: clamp(1.35rem, 6vw, 1.75rem); line-height: 1; letter-spacing: -0.055em; }
.stat-card small { color: var(--muted); font-size: 0.55rem; letter-spacing: 0; }

.pace-row {
  min-height: clamp(3.5rem, 7vh, 4rem);
  padding: 0.65rem 0.85rem;
  border-block: 1px solid var(--line);
}

.pace-row > div:last-child { text-align: right; }
.pace-row strong { font-size: 1rem; }

footer {
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.15rem;
}

footer > div { display: flex; flex-direction: column; }
footer strong { color: var(--gold); font-size: 0.72rem; letter-spacing: 0.08em; }
footer span, footer time { color: var(--muted); font-size: 0.52rem; }
footer time { max-width: 8rem; text-align: right; }

.data-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (min-width: 431px) {
  body { padding-block: 1.5rem; }
  .dashboard {
    min-height: min(900px, calc(100vh - 3rem));
    border: 1px solid var(--line);
    border-radius: 1.6rem;
    box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.5);
  }
}

@media (max-height: 720px) {
  .dashboard { gap: 0.48rem; }
  .day-banner { min-height: 4.4rem; }
  .day-banner > div:first-child strong { font-size: 3.6rem; }
  .savings-card { padding-block: 0.8rem; }
  .total { margin-block: 0.45rem; font-size: 3rem; }
  .method-card { min-height: 3.3rem; }
  .stat-card { min-height: 3.75rem; padding-block: 0.6rem; }
  .pace-row { min-height: 3.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
