
:root {
  --background: #f8f8f6;
  --foreground: #1f2937;
  --card: #ffffff;
  --card-foreground: #1f2937;
  --primary: #1f2937;
  --primary-foreground: #ffffff;
  --secondary: #f1f3f5;
  --secondary-foreground: #1f2937;
  --muted: #eef1f3;
  --muted-foreground: #6b7280;
  --accent: #eaf1f6;
  --accent-foreground: #1f2937;
  --border: #d9e0e6;
  --input: #eef2f5;
  --ring: #1f2937;
  --finance-primary: #2eb867;
  --finance-secondary: #e9f8ef;
  --finance-accent: #1f7d45;
  --health-primary: #4a90e2;
  --health-secondary: #edf5ff;
  --health-accent: #2f6fbb;
  --receipt-line: #d7dde3;
  --receipt-total: #111827;
  --receipt-bg: #fcfcfb;
  --success: #2eb867;
  --warning: #f4b740;
  --info: #4a90e2;
  --radius: 14px;
  --shadow-sm: 0 2px 10px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 10px 30px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 18px 40px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: linear-gradient(135deg, #f8f8f6 0%, #f3f7f5 45%, #eef5fb 100%);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(46, 184, 103, 0.22);
  outline-offset: 2px;
}

.page-shell {
  min-height: 100vh;
  padding: 2rem 1rem 4rem;
}

.hero-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1rem 4.5rem;
  text-align: center;
}

.calculator-shell,
.results-shell,
.hero-shell {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.calculator-shell,
.results-shell {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(217, 224, 230, 0.8);
  border-radius: 22px;
  padding: 2rem;
  box-shadow:
    0 10px 30px rgba(17, 24, 39, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

/* Header */
.site-header {
  background: var(--finance-primary);
  color: white;
  padding: 1.15rem 1.35rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin-left: 0.85rem;
}

.site-logo {
  height: 95px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.08));
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.site-nav-link,
.primary-btn,
.secondary-btn,
.submit-btn,
.link-btn,
.habit-option,
.add-drink-row button {
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.site-nav-link,
.primary-btn,
.secondary-btn,
.submit-btn,
.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.site-nav-link {
  min-width: 150px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.08);
}

.site-nav-link::after,
.primary-btn::after,
.secondary-btn::after,
.submit-btn::after,
.habit-option::after,
.add-drink-row button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.02) 55%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

.site-nav-link:hover,
.primary-btn:hover,
.secondary-btn:hover,
.submit-btn:hover,
.link-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.12);
}

.site-nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
}

.site-nav-link:active,
.primary-btn:active,
.secondary-btn:active,
.submit-btn:active,
.link-btn:active {
  transform: translateY(0);
}

/* Hero */
.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.92);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.hero-title,
.calculator-shell h1,
.results-shell h1,
.results-card h2,
.feature-card h3,
.section-head h2,
.receipt-paper-brand,
.receipt-brand-title {
  text-wrap: balance;
}

.hero-title {
  font-size: clamp(2.6rem, 5.8vw, 4.9rem);
  line-height: 1.02;
  margin: 0 auto 1rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  max-width: 860px;
}

.hero-title-accent {
  color: var(--finance-primary);
}

.hero-subtitle {
  max-width: 760px;
  margin: 0 auto 2rem;
  font-size: 1.15rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.primary-btn,
.secondary-btn,
.submit-btn,
.link-btn {
  border: none;
  padding: 0.95rem 1.35rem;
  cursor: pointer;
}

.primary-btn,
.submit-btn {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.08);
}

.secondary-btn,
.link-btn {
  background: white;
  color: var(--foreground);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.08);
}

.secondary-btn:hover,
.link-btn:hover {
  background: #fafafa;
}

.btn-icon {
  font-size: 1rem;
  line-height: 1;
}

.svg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.svg-icon svg {
  width: 1em;
  height: 1em;
  display: block;
}

.btn-icon.svg-icon svg {
  width: 1rem;
  height: 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
  align-items: stretch;
}

.feature-card,
.results-card,
.impact-card,
.summary-card,
.buy-list-row,
.food-grid-card {
  box-shadow: var(--shadow-sm);
}

.feature-card,
.results-card,
.impact-card,
.summary-card {
  transition: box-shadow 0.16s ease, transform 0.16s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(4px);
  backface-visibility: hidden;
}

.feature-card::before,
.results-card::before,
.impact-card::before,
.summary-card::before,
.receipt-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.24) 0%,
    rgba(255, 255, 255, 0.04) 42%,
    rgba(255, 255, 255, 0) 100%
  );
}

.feature-card:hover,
.results-card:hover,
.impact-card:hover,
.summary-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.feature-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid rgba(217, 224, 230, 0.95);
  padding: 1.4rem;
  text-align: left;
}

.feature-card.finance {
  background: var(--finance-secondary);
  border-color: rgba(46, 184, 103, 0.18);
}

.feature-card.health {
  background: var(--health-secondary);
  border-color: rgba(74, 144, 226, 0.18);
}

.feature-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  font-weight: 750;
}

.feature-card p {
  margin: 0;
  line-height: 1.55;
  color: var(--muted-foreground);
  font-size: 0.96rem;
}

.feature-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  flex-shrink: 0;
}

.feature-icon.svg-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.finance-icon {
  background: rgba(46, 184, 103, 0.14);
  color: var(--finance-accent);
}

.health-icon {
  background: rgba(74, 144, 226, 0.14);
  color: var(--health-accent);
}

.receipt-icon {
  background: #f1f3f5;
  color: var(--foreground);
}

.proof-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 2.25rem auto 2rem;
  color: var(--muted-foreground);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 68ch;
}

.proof-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.proof-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.sample-receipt {
  max-width: 380px;
  margin: 0 auto;
  background: var(--receipt-bg);
  border: 1px solid var(--receipt-line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  text-align: left;
  transform: rotate(-0.3deg);
}

.sample-receipt:hover {
  transform: rotate(0deg) translateY(-1px);
  transition: transform 0.18s ease;
}

/* Shared receipt styles */
.receipt-brand {
  text-align: center;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px dashed var(--receipt-line);
}

.receipt-brand-title {
  font-weight: 800;
  letter-spacing: 0.09em;
}

.receipt-brand-sub {
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

.receipt-row,
.receipt-footer-row,
.stat-row {
  letter-spacing: -0.01em;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0;
  font-size: 0.96rem;
}

.receipt-total {
  margin-top: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--receipt-line);
  position: relative;
  z-index: 1;
}

.receipt-note {
  text-align: center;
  margin-top: 0.8rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--receipt-line);
  font-size: 0.86rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.mono-text,
.receipt-paper-brand,
.receipt-brand-title,
.receipt-row,
.receipt-footer-row,
.receipt-item-meta {
  text-rendering: optimizeLegibility;
}

/* Calculator + results headings */
.calculator-shell h1,
.results-shell h1 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.calculator-shell > p,
.results-shell > p,
.hero-subtitle,
.helper-text,
.section-sub,
.impact-sub,
.investment-caption,
.reduction-sub,
.reduction-footnote,
.proof-row,
.receipt-note {
  line-height: 1.6;
}

.calculator-shell > p,
.results-shell > p {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--muted-foreground);
}

/* Forms */
.field-group {
  margin-bottom: 1.2rem;
}

.field-group label,
.receipt-builder-section label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.field-group select,
.field-group input,
.price-input,
.small-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-group select:hover,
.field-group input:hover,
.price-input:hover,
.small-input:hover {
  border-color: rgba(46, 184, 103, 0.28);
}

.field-group select:focus,
.field-group input:focus,
.price-input:focus,
.small-input:focus {
  border-color: var(--finance-primary);
  box-shadow: 0 0 0 3px rgba(46, 184, 103, 0.14);
}

.field-group select::placeholder,
.field-group input::placeholder,
.price-input::placeholder,
.small-input::placeholder {
  color: #94a3b8;
}

.add-drink-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.add-drink-row select {
  flex: 1;
}

.add-drink-row button {
  width: 54px;
  border: none;
  border-radius: 14px;
  background: var(--finance-primary);
  color: white;
  font-size: 1.45rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

/* Calculator page */
.calculator-intro {
  margin-bottom: 1.5rem;
}

.calculator-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: stretch;
}

.calculator-panel {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(217, 224, 230, 0.8);
  border-radius: 20px;
  padding: 1.25rem;
}

.calculator-panel.receipt-paper {
  padding-top: 1.5rem;
}

.helper-text {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  max-width: 68ch;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.section-head h2,
.results-card h2 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-weight: 750;
}

.section-sub {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  max-width: 68ch;
}

.habit-toggle {
  display: inline-flex;
  width: 100%;
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}

.habit-option {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.habit-option:hover {
  color: var(--foreground);
}

.habit-option.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.receipt-items-block {
  background: var(--receipt-bg);
  border: 1px solid var(--receipt-line);
  border-radius: 18px;
  padding: 1rem;
  margin: 1.4rem 0;
}

.empty-state {
  color: var(--muted-foreground);
  margin: 0;
}

.receipt-paper {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.65)),
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.015) 0,
      rgba(0, 0, 0, 0.015) 1px,
      transparent 1px,
      transparent 28px
    );
  border: 1px solid var(--receipt-line);
  box-shadow: var(--shadow-md);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}

.receipt-paper-header {
  text-align: center;
  padding-bottom: 1.15rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px dashed var(--receipt-line);
  position: relative;
  z-index: 1;
}

.receipt-paper-brand {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.receipt-paper-sub {
  margin-top: 0.3rem;
  color: var(--muted-foreground);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.receipt-builder-section {
  margin-top: 0.15rem;
}

.receipt-builder-divider {
  border-top: 1px dashed var(--receipt-line);
  margin: 1rem 0;
}

.receipt-paper-items {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.receipt-empty-state {
  text-align: center;
  color: var(--muted-foreground);
  padding: 1.25rem 0 0.5rem;
  position: relative;
  z-index: 1;
}

.receipt-empty-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.receipt-item {
  background: #ffffff;
  border: 1px solid rgba(215, 221, 227, 0.9);
  box-shadow: none;
  border-radius: 14px;
  padding: 0.9rem;
  margin-bottom: 0.8rem;
}

.receipt-item:last-child {
  margin-bottom: 0;
}

.receipt-item-paper {
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--receipt-line);
  border-radius: 0;
  padding: 0.7rem 0;
  margin-bottom: 0;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
  position: relative;
  z-index: 1;
}

.receipt-item-paper:hover {
  background: rgba(255, 255, 255, 0.55);
}

.receipt-item-paper:last-child {
  border-bottom: none;
}

.receipt-item-main,
.receipt-item-side,
.receipt-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.receipt-item-main {
  margin-bottom: 0.65rem;
}

.receipt-item-paper .receipt-item-main {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  align-items: start;
  gap: 0.65rem;
}

.receipt-item-main span {
  font-weight: 700;
}

.receipt-item-paper .line-total {
  font-weight: 800;
}

.receipt-item-side {
  margin-bottom: 0.65rem;
}

.receipt-item-paper .receipt-item-side {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin: 0.45rem 0;
}

.receipt-item-side button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fff1f2;
  color: #dc2626;
  border: 1px solid #fecdd3;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: none;
  opacity: 0.9;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}

.receipt-item-side button:hover {
  background: #fee2e2;
  opacity: 1;
  transform: scale(1.02);
}

.receipt-item-meta {
  color: var(--muted-foreground);
  font-size: 0.86rem;
  padding-top: 0.1rem;
  border-top: 1px dashed var(--receipt-line);
}

.small-input,
.price-input {
  max-width: 140px;
  font-variant-numeric: tabular-nums;
}

.small-input {
  max-width: 85px;
  text-align: center;
}

.price-input {
  text-align: right;
}

.receipt-add-row {
  gap: 0;
  align-items: stretch;
}

.receipt-add-row select {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.receipt-add-row button {
  width: 60px;
  min-width: 60px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border: 1px solid rgba(46, 184, 103, 0.22);
  border-left: none;
  box-shadow: none;
  background: var(--finance-primary);
}

.receipt-add-row button:hover {
  filter: brightness(0.97);
}

.receipt-footer {
  padding-top: 0.45rem;
  position: relative;
  z-index: 1;
}

.receipt-footer-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.receipt-projection {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--receipt-line);
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

.calculator-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.25rem;
  align-items: stretch;
}

.summary-card {
  border-radius: 18px;
  padding: 1.1rem;
  border: 1px solid rgba(217, 224, 230, 0.95);
  box-shadow: var(--shadow-sm);
}

.finance-summary {
  background: linear-gradient(135deg, #e9f8ef 0%, #f5fff8 100%);
  border-color: rgba(46, 184, 103, 0.18);
}

.health-summary {
  background: linear-gradient(135deg, #edf5ff 0%, #f7fbff 100%);
  border-color: rgba(74, 144, 226, 0.18);
}

.summary-label {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  color: var(--muted-foreground);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.summary-value {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.summary-sub {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.92rem;
}

.totals-block {
  display: grid;
  gap: 0.5rem;
  background: #f8fbf9;
  border: 1px solid rgba(46, 184, 103, 0.2);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  margin: 1rem 0 1.25rem;
}

.totals-block p {
  margin: 0;
}

.submit-btn {
  width: 100%;
  padding: 1rem 1.2rem;
  font-size: 1rem;
}

/* Results + example */
.results-shell {
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.report-kicker {
  margin: 0 0 0.45rem;
  color: var(--finance-primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.82rem;
}

.report-header h1 {
  margin-top: 0;
  margin-bottom: 0.55rem;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.report-header p:last-child {
  margin-top: 0;
  margin-bottom: 0;
  color: var(--muted-foreground);
  font-size: 1.02rem;
}

.results-grid {
  display: grid;
  gap: 1.2rem;
  align-items: stretch;
}

.results-card {
  background: white;
  border: 1px solid rgba(217, 224, 230, 0.95);
  border-radius: 18px;
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.results-card p {
  margin: 0 0 0.5rem;
  line-height: 1.55;
}

.results-card hr {
  border: none;
  border-top: 1px dashed var(--receipt-line);
  margin: 0.85rem 0;
}

.results-card.finance {
  background: var(--finance-secondary);
  border-color: rgba(46, 184, 103, 0.18);
}

.results-card.health {
  background: var(--health-secondary);
  border-color: rgba(74, 144, 226, 0.18);
}

.receipt-card {
  background: var(--receipt-bg);
  margin-bottom: 1.1rem;
}

.receipt-card::after,
.mode-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
}

.receipt-card .receipt-brand {
  margin-bottom: 1rem;
}

.receipt-card .receipt-total {
  margin-top: 0.9rem;
}

.receipt-row-subtle {
  color: var(--muted-foreground);
  font-size: 0.88rem;
  margin-top: -0.1rem;
  margin-bottom: 0.45rem;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
  align-items: stretch;
}

.impact-card {
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(217, 224, 230, 0.95);
}

.impact-card h2 {
  margin: 0.15rem 0 0.25rem;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.05em;
}

.finance-hero {
  background: linear-gradient(135deg, #e9f8ef 0%, #f5fff8 100%);
  border-color: rgba(46, 184, 103, 0.18);
}

.health-hero {
  background: linear-gradient(135deg, #edf5ff 0%, #f7fbff 100%);
  border-color: rgba(74, 144, 226, 0.18);
}

.impact-label {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  color: var(--muted-foreground);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.impact-label-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.impact-inline-icon {
  width: 26px;
  height: 26px;
  color: inherit;
}

.finance-hero .impact-label,
.finance-hero h2 {
  color: var(--finance-accent);
}

.health-hero .impact-label,
.health-hero h2 {
  color: var(--health-primary);
}

.impact-sub {
  margin: 0.45rem 0 0;
  max-width: 68ch;
}

.mode-card {
  padding: 1.35rem;
  margin-bottom: 1.1rem;
  border-style: solid;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 250, 250, 0.92));
}

.mode-toggle-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.95rem;
}

.mode-label {
  font-weight: 800;
  transition: color 0.18s ease, opacity 0.18s ease;
  opacity: 0.8;
  letter-spacing: -0.01em;
}

.finance-label,
.health-label {
  color: var(--muted-foreground);
}

.mode-label.active {
  opacity: 1;
}

#finance-label.active {
  color: var(--finance-primary);
}

#health-label.active {
  color: var(--health-primary);
}

.mode-toggle {
  width: 64px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid #1f2937;
  background: #f3f4f6;
  position: relative;
  cursor: pointer;
  padding: 0;
  transition: background 0.18s ease, border-color 0.18s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.mode-toggle.health-mode {
  border-color: var(--health-primary);
  background: #eaf3ff;
}

.mode-knob {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: white;
  position: absolute;
  top: 3px;
  left: 4px;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.15);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.mode-toggle.health-mode .mode-knob {
  transform: translateX(30px);
}

.mode-view {
  display: none;
  animation: fadeMode 0.18s ease;
}

.mode-view.active {
  display: block;
}

@keyframes fadeMode {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-list {
  display: grid;
  gap: 0.8rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px dashed var(--receipt-line);
}

.stat-row:first-child {
  padding-top: 0.2rem;
}

.stat-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.slider-block {
  margin-top: 1rem;
}

.slider-block label {
  display: block;
  margin-bottom: 0.65rem;
  font-weight: 600;
}


.investment-value {
  margin-top: 1rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--finance-accent);
  font-variant-numeric: tabular-nums;
}

.investment-caption {
  margin-top: 0.6rem;
  max-width: 68ch;
}

.buy-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.buy-list-row,
.food-grid-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(217, 224, 230, 0.75);
  border-radius: 14px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.buy-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1rem;
}

.buy-list-row:hover,
.food-grid-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.96);
}

.buy-list-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.buy-list-icon,
.food-grid-icon {
  color: #5b6880;
}

.buy-list-icon {
  width: 28px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.buy-list-right {
  font-weight: 700;
  color: var(--muted-foreground);
  flex-shrink: 0;
  letter-spacing: -0.04em;
}

.buy-list-zero {
  opacity: 0.55;
}

.svg-icon-box {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5b6880;
  flex-shrink: 0;
}

.svg-icon-box svg {
  width: 20px;
  height: 20px;
  display: block;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  align-items: stretch;
}

.food-grid-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 1rem;
  text-align: center;
}

.food-grid-icon {
  margin-bottom: 0.55rem;
}

.food-grid-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.45rem;
  letter-spacing: -0.04em;
}

.food-grid-label {
  color: var(--muted-foreground);
  font-weight: 600;
}

.weight-summary-box {
  background: rgba(74, 144, 226, 0.08);
  border: 1px solid rgba(74, 144, 226, 0.18);
  border-radius: 16px;
  padding: 1rem;
  margin-top: 1rem;
  text-align: center;
}

.weight-summary-title {
  margin: 0 0 0.55rem;
  font-weight: 700;
  color: var(--health-primary);
}

.weight-summary-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--health-primary);
  margin-bottom: 0.4rem;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.weight-summary-sub {
  margin: 0;
  color: var(--muted-foreground);
}

.reduction-box {
  margin-top: 1.1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
}

.reduction-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
  font-weight: 700;
}



.reduction-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  font-size: 0.88rem;
  color: var(--muted-foreground);
}

.reduction-saved {
  margin-top: 1rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--health-primary);
  text-align: center;
}

.reduction-sub {
  margin: 0.2rem 0 0;
  text-align: center;
  max-width: 68ch;
}

.reduction-footnote {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  max-width: 68ch;
}

.alt-lead {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
}

.back-link {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--finance-accent);
  font-weight: 700;
}

/* Tablet */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    max-width: 700px;
  }
}

/* Mobile */
@media (max-width: 720px) {
  .page-shell {
    padding: 1rem 0.75rem 2.5rem;
  }

  .site-header-inner,
  .hero-main {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .site-header {
    padding: 0.58rem 0.9rem;
  }

  .site-header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
  }

  .site-brand-link {
    justify-content: flex-start;
    margin-left: 0;
  }

  .site-logo {
    height: 68px;
    margin: 0;
  }

  .site-nav {
    justify-content: flex-end;
  }

  .site-nav-link {
    width: auto;
    min-width: 84px;
    text-align: center;
    padding: 0.5rem 0.85rem;
    font-size: 0.92rem;
  }

  .hero-main {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .hero-title {
    max-width: 100%;
    line-height: 1.08;
  }

  .hero-badge {
    margin-bottom: 1.15rem;
  }

  .cta-row {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn,
  .link-btn {
    width: 100%;
    min-height: 48px;
  }

  .sample-receipt {
    transform: none;
  }

  .calculator-shell,
  .results-shell {
    padding: 1.25rem;
    border-radius: 20px;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
  }

  .calculator-top-grid,
  .calculator-summary,
  .impact-grid,
  .results-grid,
  .feature-grid,
  .food-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .report-header {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 1.4rem;
  }

  .results-shell {
    padding-top: 1.4rem;
    padding-bottom: 1.4rem;
  }

  .results-card,
  .impact-card {
    padding: 1.1rem;
  }

  .receipt-paper {
    padding-left: 0.95rem;
    padding-right: 0.95rem;
  }

  .receipt-paper-header {
    margin-bottom: 0.95rem;
    padding-bottom: 0.95rem;
  }

  .receipt-row,
  .receipt-footer-row,
  .stat-row {
    font-size: 0.95rem;
  }

  .mode-toggle-wrap {
    flex-wrap: wrap;
  }

  .habit-toggle {
    flex-direction: column;
  }

  .receipt-item-main,
  .receipt-item-side,
  .receipt-item-meta,
  .add-drink-row {
    flex-direction: column;
    align-items: stretch;
  }

  .receipt-item-paper .receipt-item-main {
    grid-template-columns: 1fr;
  }

  .receipt-item-paper .receipt-item-side {
    flex-direction: row;
    align-items: center;
  }

  .small-input,
  .price-input {
    max-width: none;
  }

  .add-drink-row button {
    width: 100%;
    min-width: 0;
    height: 50px;
  }

  .receipt-add-row {
    gap: 0.65rem;
  }

  .receipt-add-row select {
    border-radius: 12px;
  }

  .receipt-add-row button {
    border-radius: 12px;
    border-left: 1px solid rgba(46, 184, 103, 0.22);
  }

  .field-group select,
  .field-group input,
  .price-input,
  .small-input,
  .site-nav-link,
  .submit-btn {
    min-height: 48px;
  }
}
.save-receipt-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.save-receipt-card h2 {
  margin: 0;
}

.save-receipt-card p {
  margin: 0;
}

#save-receipt-button {
  align-self: flex-start;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  background: #22c55e;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.22);
}

#save-receipt-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(34, 197, 94, 0.28);
}

#save-receipt-button:active {
  transform: translateY(0);
  opacity: 0.95;
}

.save-receipt-message {
  min-height: 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #22c55e;
}

.saved-receipt-card {
  border: 1px solid #d7dce3;
  border-radius: 1.5rem;
  background: #ffffff;
  overflow: hidden;
  margin-top: 1rem;
}

.saved-receipt-summary {
  width: 100%;
  border: none;
  background: transparent;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
  cursor: pointer;
}

.saved-receipt-summary h3 {
  margin: 0 0 0.35rem;
}

.saved-receipt-summary p {
  margin: 0;
}

.saved-receipt-meta {
  text-align: right;
  flex-shrink: 0;
}

.saved-receipt-details {
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.saved-receipt-items {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.saved-receipt-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #eef1f4;
}

.saved-receipt-item:last-child {
  border-bottom: none;
}

.saved-receipt-item p {
  margin: 0.3rem 0 0;
  color: #6b7280;
}

.saved-receipt-totals {
  display: grid;
  gap: 0.5rem;
}

.saved-receipt-totals p {
  margin: 0;
}
.saved-receipt-actions {
  margin-top: 1.25rem;
}

.delete-receipt-button {
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.2);
}

.delete-receipt-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.26);
}

.delete-receipt-button:active {
  transform: translateY(0);
  opacity: 0.95;
}
#insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.insight-card {
  background: #ffffff;
  border: 1px solid #d7dce3;
  border-radius: 1.5rem;
  padding: 1.4rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.insight-card h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #4b5563;
}

.insight-card p {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  color: #111827;
}

@media (max-width: 700px) {
  #insights-grid {
    grid-template-columns: 1fr;
  }
}
#save-receipt-button:disabled {
  cursor: not-allowed;
  opacity: 0.75;
  transform: none;
  box-shadow: none;
}
.empty-state-message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.empty-state-message p {
  margin: 0;
}

.empty-state-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  background: #111827;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.empty-state-link:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

@media (max-width: 720px) {
  .site-header {
    padding: 0.7rem 0.9rem;
  }

  .site-header-inner {
    align-items: center;
    gap: 0.75rem;
  }

  .site-brand-link {
    margin-left: 0;
    flex-shrink: 0;
  }

  .site-logo {
    height: 72px;
  }

  .site-nav {
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .site-nav-link {
    padding: 0.42rem 0.68rem;
    font-size: 0.85rem;
    min-width: 0;
  }
}

.investment-value-label {
  margin: 1.25rem 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #4b5563;
}

.investment-value {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1;
  color: #2f944f;
}

.investment-scale {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #6b7280;
}

.investment-scale {
  position: relative;
  height: 1.2rem;
  margin-top: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
}

.investment-scale span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.investment-scale span:nth-child(1) {
  left: 0%;
  transform: none;
}

.investment-scale span:nth-child(2) {
  left: 21%;
}

.investment-scale span:nth-child(3) {
  left: 47%;
}

.investment-scale span:nth-child(4) {
  left: 74%;
}

.investment-scale span:nth-child(5) {
  right: 0;
  left: auto;
  transform: none;
}

.slider-block input[type="range"],
.reduction-box input[type="range"] {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 0.85rem;
  border-radius: 999px;
  outline: none;
  background: #d9dee6;
}

.slider-block input[type="range"] {
  --slider-fill: var(--finance-primary);
  --slider-empty: #d9dee6;
}

.reduction-box input[type="range"] {
  --slider-fill: var(--health-primary);
  --slider-empty: #d9dee6;
}

.slider-block input[type="range"]::-webkit-slider-runnable-track,
.reduction-box input[type="range"]::-webkit-slider-runnable-track {
  height: 0.85rem;
  border-radius: 999px;
  background: transparent;
}

.slider-block input[type="range"]::-webkit-slider-thumb,
.reduction-box input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: -0.25rem;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background: var(--slider-fill);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

.slider-block input[type="range"]::-moz-range-track,
.reduction-box input[type="range"]::-moz-range-track {
  height: 0.85rem;
  border-radius: 999px;
  background: var(--slider-empty);
}

.slider-block input[type="range"]::-moz-range-progress,
.reduction-box input[type="range"]::-moz-range-progress {
  height: 0.85rem;
  border-radius: 999px;
  background: var(--slider-fill);
}

.slider-block input[type="range"]::-moz-range-thumb,
.reduction-box input[type="range"]::-moz-range-thumb {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background: var(--slider-fill);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  cursor: pointer;
}
.mode-label {
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0.6;
}

.mode-label.active {
  opacity: 1;
}

.finance-label.active {
  color: var(--finance-primary);
}

.health-label.active {
  color: var(--health-primary);
}

.mode-toggle {
  transition: background-color 0.2s ease;
}

.mode-toggle.health-mode {
  background-color: var(--health-primary);
}