*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f0f5fb;
  color: #0f1f3d;
  min-height: 100vh;
  line-height: 1.6;
}
:root {
  --primary:   #0078d4;
  --primary-d: #005a9e;
  --primary-l: #e6f2fb;
  --text:      #0f1f3d;
  --muted:     #5a7a96;
  --card:      #ffffff;
  --border:    #cddbe8;
  --green:     #107c10;
  --green-bg:  #e6f4e6;
  --red:       #c50f1f;
  --red-bg:    #fde7e9;
  --amber:     #a37400;
  --amber-bg:  #fff9e6;
  --radius:    12px;
  --shadow:    0 2px 16px rgba(0,78,130,0.07);
  --shadow-md: 0 8px 32px rgba(0,78,130,0.13);
  --shadow-blue: 0 8px 36px rgba(0,120,212,0.22);
}
a { text-decoration: none; color: inherit; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid rgba(0,120,212,0.1);
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 20px rgba(0,78,130,0.08);
}
.nav-inner {
  max-width: 1000px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 1.06rem; color: var(--text);
  transition: opacity 0.2s;
}
.nav-brand:hover { opacity: 0.85; }
.nav-back {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.85rem; font-weight: 500; color: var(--muted);
  transition: color 0.2s;
}
.nav-back:hover { color: var(--primary); }

/* ── Page layout ── */
.page { max-width: 900px; margin: 0 auto; padding: 44px 24px 80px; }

/* ── Hero ── */
.page-hero {
  background: linear-gradient(135deg, #0078d4 0%, #005a9e 60%, #003a6e 100%);
  border-radius: var(--radius);
  padding: 52px 48px;
  margin-bottom: 32px;
  color: #fff;
  position: relative; overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.page-hero-content { position: relative; }
.hero-tag {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.1);
  padding: 5px 14px; border-radius: 4px; margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(1.6rem, 3.8vw, 2.3rem);
  font-weight: 900; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 14px;
}
.hero-sub {
  font-size: 1rem; color: rgba(255,255,255,0.82); line-height: 1.7;
  max-width: 580px; margin-bottom: 22px;
}
.hero-trust {
  display: flex; gap: 20px; flex-wrap: wrap;
  font-size: 0.82rem; font-weight: 500; color: rgba(255,255,255,0.78);
}

/* ── Calculator card ── */
.calc-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 32px;
}

/* ── Input section ── */
.input-section { padding: 44px 48px 40px; }

@media (max-width: 640px) { .input-section { padding: 28px 22px; } }

.input-label {
  font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 16px;
}
.input-wrap {
  display: flex; align-items: center;
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 20px;
  background: #fff;
}
.input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,120,212,0.12);
}
.input-prefix, .input-suffix {
  padding: 16px 14px;
  font-size: 1.25rem; font-weight: 700;
  color: var(--muted);
  background: var(--primary-l);
  border: none; flex-shrink: 0;
  line-height: 1;
}
.spend-input {
  flex: 1;
  border: none; outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 1.6rem; font-weight: 800;
  color: var(--text);
  padding: 14px 16px;
  min-width: 0;
  -moz-appearance: textfield;
}
.spend-input::-webkit-outer-spin-button,
.spend-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.quick-label {
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  margin-bottom: 10px;
}
.quick-chips {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px;
}
.chip-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem; font-weight: 600;
  color: var(--primary);
  background: var(--primary-l);
  border: 1.5px solid rgba(0,120,212,0.25);
  border-radius: 6px; padding: 8px 16px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}
.chip-btn:hover { background: #cce4f6; border-color: var(--primary); transform: translateY(-1px); }
.chip-btn.active {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
}

.btn-calc {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 18px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-d) 100%);
  color: #fff; border: none; border-radius: 8px;
  font-family: 'Inter', sans-serif; font-size: 1.05rem; font-weight: 700;
  cursor: pointer; letter-spacing: -0.01em;
  box-shadow: 0 4px 18px rgba(0,120,212,0.38);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.btn-calc:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,120,212,0.5); filter: brightness(1.07); }
.btn-calc:active { transform: scale(0.99); }

.input-note {
  font-size: 0.78rem; color: var(--muted);
  text-align: center; margin-top: 14px; line-height: 1.55;
}

/* ── Results section ── */
.results-section { display: none; }
.results-section.visible { display: block; }

.results-hero {
  background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
  padding: 44px 48px;
  color: #fff;
}
@media (max-width: 640px) { .results-hero { padding: 28px 22px; } }

.results-context {
  font-size: 0.88rem; color: rgba(255,255,255,0.72); margin-bottom: 12px;
}
.results-context strong { color: #fff; }

.waste-label {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.72);
  margin-bottom: 10px;
}
.waste-amount {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.waste-low, .waste-high {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 900; letter-spacing: -0.04em; color: #50e6ff;
}
.waste-dash { font-size: 2rem; color: rgba(255,255,255,0.5); font-weight: 300; }
.waste-unit { font-size: 1.1rem; color: rgba(255,255,255,0.65); font-weight: 400; }

.annual-line {
  font-size: 1rem; color: rgba(255,255,255,0.82); line-height: 1.65;
  max-width: 620px; margin-bottom: 28px;
}
.annual-line strong { color: #fff; font-weight: 700; }
.annual-line em { font-style: italic; color: #ff6b6b; }

/* Waste meter */
.meter-wrap { margin-top: 4px; }
.meter-bar {
  position: relative;
  height: 14px; background: rgba(255,255,255,0.15);
  border-radius: 7px; overflow: visible;
  margin-bottom: 10px;
}
.meter-fill {
  height: 100%; border-radius: 7px;
  background: linear-gradient(90deg, #50e6ff, #0078d4);
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0%;
}
.meter-label-low, .meter-label-high, .meter-label-pct {
  position: absolute; font-size: 0.72rem; font-weight: 600;
}
.meter-label-low { left: 0; top: 20px; color: rgba(255,255,255,0.55); }
.meter-label-high { right: 0; top: 20px; color: rgba(255,255,255,0.55); }
.meter-label-pct {
  top: -22px;
  transform: translateX(-50%);
  color: #50e6ff; font-size: 0.8rem;
  white-space: nowrap;
  transition: left 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.meter-legend {
  display: flex; gap: 18px; margin-top: 28px;
  font-size: 0.78rem; color: rgba(255,255,255,0.65);
  align-items: center;
}
.legend-dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0;
}
.waste-dot { background: #50e6ff; }
.keep-dot { background: rgba(255,255,255,0.25); }

/* ── Breakdown ── */
.breakdown-section { padding: 36px 48px; border-bottom: 1px solid var(--border); }
@media (max-width: 640px) { .breakdown-section { padding: 24px 22px; } }

.breakdown-title {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--primary);
  margin-bottom: 20px;
}
.breakdown-list { display: flex; flex-direction: column; gap: 14px; }

.breakdown-item {
  display: grid; grid-template-columns: 26px 1fr auto;
  align-items: center; gap: 12px;
}
.bd-icon { font-size: 1.25rem; }
.bd-info { min-width: 0; }
.bd-name { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.bd-bar-wrap {
  height: 8px; background: var(--primary-l);
  border-radius: 4px; overflow: hidden;
}
.bd-bar {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), #00b4d8);
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0s);
  width: 0%;
}
.bd-amount {
  font-size: 0.95rem; font-weight: 800;
  color: var(--primary); white-space: nowrap;
}

/* ── Urgency row ── */
.urgency-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.urgency-card {
  padding: 28px 20px; text-align: center;
  border-right: 1px solid var(--border);
}
.urgency-card:last-child { border-right: none; }
.urgency-card.highlight { background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%); }
.urgency-card.highlight .urgency-val { color: #50e6ff; }
.urgency-card.highlight .urgency-lbl { color: rgba(255,255,255,0.72); }
.urgency-icon { font-size: 1.6rem; margin-bottom: 8px; }
.urgency-val {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 900; color: var(--primary);
  letter-spacing: -0.03em; margin-bottom: 4px;
}
.urgency-lbl { font-size: 0.8rem; color: var(--muted); font-weight: 500; }

@media (max-width: 540px) {
  .urgency-row { grid-template-columns: 1fr; }
  .urgency-card { border-right: none; border-bottom: 1px solid var(--border); }
  .urgency-card:last-child { border-bottom: none; }
}

/* ── CTA ── */
.results-cta { padding: 40px 48px; text-align: center; background: #fafcff; }
@media (max-width: 640px) { .results-cta { padding: 28px 22px; } }

.cta-note {
  font-size: 0.92rem; color: var(--muted); line-height: 1.7;
  max-width: 580px; margin: 0 auto 28px;
}
.cta-note em { font-style: italic; color: var(--text); }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }

.btn-primary-lg {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-d) 100%);
  color: #fff; font-family: 'Inter', sans-serif;
  font-weight: 700; font-size: 1rem;
  padding: 16px 32px; border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0,120,212,0.38);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  white-space: nowrap;
}
.btn-primary-lg:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,120,212,0.5); filter: brightness(1.07); }

.btn-ghost-lg {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--primary);
  font-family: 'Inter', sans-serif;
  font-weight: 600; font-size: 1rem;
  padding: 16px 28px; border-radius: 8px;
  border: 1.5px solid var(--primary);
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}
.btn-ghost-lg:hover { background: var(--primary-l); transform: translateY(-2px); }

.cta-trust {
  font-size: 0.8rem; color: var(--muted); margin-top: 4px;
}

.btn-recalc {
  display: block; width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem; font-weight: 500; color: var(--muted);
  background: var(--primary-l);
  border: none; border-top: 1px solid var(--border);
  padding: 14px; text-align: center;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.btn-recalc:hover { color: var(--primary); background: #d8ecf8; }

/* ── Proof strip ── */
.proof-strip {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.proof-item { padding: 28px 32px; text-align: center; flex: 1; min-width: 140px; }
.proof-val { font-size: 1.8rem; font-weight: 900; color: var(--primary); letter-spacing: -0.03em; }
.proof-lbl { font-size: 0.8rem; color: var(--muted); margin-top: 4px; font-weight: 500; }
.proof-divider { width: 1px; height: 60px; background: var(--border); flex-shrink: 0; }

@media (max-width: 600px) {
  .proof-strip { flex-direction: column; }
  .proof-divider { width: 80%; height: 1px; }
}

/* ── Finds preview ── */
.finds-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow);
}
@media (max-width: 640px) { .finds-preview { padding: 24px 20px; } }

.finds-title {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 20px;
}
.finds-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 700px) { .finds-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .finds-grid { grid-template-columns: 1fr; } }

.find-item {
  background: var(--primary-l);
  border: 1px solid rgba(0,120,212,0.15);
  border-radius: 10px; padding: 18px 16px;
}
.find-icon { font-size: 1.5rem; display: block; margin-bottom: 8px; }
.find-name { font-size: 0.88rem; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.35; }
.find-range { font-size: 0.8rem; font-weight: 700; color: var(--green); }

/* ── Footer ── */
.footer {
  background: #0f1f3d; padding: 22px 0 24px;
  margin-top: 0;
}
.footer-legal-row {
  max-width: 900px; margin: 0 auto;
  padding: 0 24px 14px;
  display: flex; flex-wrap: wrap; gap: 12px 22px;
  justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 14px;
}
.footer-legal-row a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  transition: color 0.15s;
}
.footer-legal-row a:hover { color: #50e6ff; }
.footer-inner {
  max-width: 900px; margin: 0 auto; padding: 0 24px;
  display: flex; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
  font-size: 0.76rem; color: rgba(255,255,255,0.38);
}
.footer-inner a { color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-inner a:hover { color: #fff; }
