/* CrowdCPI — main.css */
/* Dark theme. Mobile-first. One number at a time. */

:root {
  --bg: #0d0d0d;
  --surface: #1a1a1a;
  --border: #2a2a2a;
  --text: #f0f0f0;
  --muted: #888;
  --red: #dc3232;
  --green: #2d9c2d;
  --official-color: #888;
  --submitted-color: #f0f0f0;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ─────────────────────────────────────────────────────────────── */

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.nav-tagline {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  margin-right: auto;
  vertical-align: baseline;
}

@media (max-width: 600px) {
  .nav-tagline { display: none; }
  .nav-brand { margin-right: auto; }
}

.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a { color: var(--muted); font-size: 14px; }
.nav-cta {
  background: var(--red);
  color: white !important;
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
}

/* ── Flash messages ──────────────────────────────────────────────────── */

.flash-container { padding: 0 24px; }
.flash { padding: 12px 16px; border-radius: 4px; margin: 12px 0; }
.flash-error { background: #3a0000; color: #ff9999; }
.flash-success { background: #003a00; color: #99ff99; }

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.tagline {
  font-size: clamp(18px, 3.5vw, 28px);
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 32px;
  letter-spacing: -0.01em;
}

/* ── Product switcher ────────────────────────────────────────────────── */

.product-switcher {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 32px;
  scrollbar-width: none;
}
.product-switcher::-webkit-scrollbar { display: none; }

.product-pill {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.15s;
}
.product-pill:hover { border-color: #555; color: var(--text); text-decoration: none; }
.product-pill.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

/* ── Gap Card ────────────────────────────────────────────────────────── */

.gap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  margin-bottom: 32px;
}

.product-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 20px;
}

.price-comparison {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.price-label {
  color: var(--muted);
  font-size: 16px;
  flex-shrink: 0;
  min-width: 160px;
}

.price-value {
  font-size: 24px;
  font-weight: 600;
}
.price-value.highlight {
  font-size: 32px;
  font-weight: 800;
}

.price-row.official .price-value { color: var(--official-color); }
.price-row.submitted .price-value { color: var(--submitted-color); }

/* The gap number — hero element */
.gap-number {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  padding: 16px 0 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.gap-over { color: var(--red); }

.gap-context {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 20px;
}

.gap-inconclusive {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 16px 0 20px;
  padding: 12px 16px;
  border-left: 3px solid var(--border);
}

.btn-submit {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  margin-top: 8px;
}
.btn-submit:hover { background: #b52a2a; text-decoration: none; color: white; }

.no-data-cta {
  color: var(--muted);
  margin-bottom: 16px;
}

/* ── Shrinkflation overlay ───────────────────────────────────────────── */

/* Secondary per-unit gap number — appears below the primary gap number in Tier 3 gap cards */
.gap-number-secondary {
  font-size: clamp(16px, 2.8vw, 22px);
  font-weight: 700;
  padding: 8px 0 4px;
  color: #c04a0a; /* orange-red: distinct from primary gap red, same family */
}

.gap-number-secondary .gap-pct {
  font-size: 0.75em;
  font-weight: 500;
  opacity: 0.85;
}

/* "What you're actually getting" one-sentence stat block */
.shrinkflation-stat {
  background: rgba(255, 140, 0, 0.07);
  border: 1px solid rgba(255, 140, 0, 0.25);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.shrinkflation-stat p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}

/* ── Chart section ───────────────────────────────────────────────────── */

.chart-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.chart-headline {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 20px;
  color: var(--text);
}

.chart-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.range-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.range-btn:hover {
  border-color: var(--muted);
  color: var(--text);
}

.range-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.chart-wrapper {
  position: relative;
  height: 280px;
}

/* ── Product detail ──────────────────────────────────────────────────── */

.product-detail {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--muted);
}
.product-detail summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

/* ── How it works ─────────────────────────────────────────────────────── */

.how-it-works {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px;
  border-top: 1px solid var(--border);
}
.how-it-works h2 { font-size: 18px; margin: 0 0 12px; }
.how-it-works p { color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ── Submission form ─────────────────────────────────────────────────── */

.submit-section {
  max-width: 520px;
  margin: 0 auto;
  padding: 40px 20px;
}
.submit-section h1 { font-size: 28px; margin-bottom: 8px; }
.submit-intro { color: var(--muted); margin-bottom: 32px; }

.submit-form { display: flex; flex-direction: column; gap: 20px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; }
.optional { font-weight: 400; color: var(--muted); font-size: 13px; }

.field input, .field select {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 18px;
  width: 100%;
  -webkit-appearance: none;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--red);
}
.field input[type="file"] { font-size: 14px; padding: 10px; }
.field small { color: var(--muted); font-size: 13px; }

.privacy-note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin: 0;
}

/* ── Thank you page ──────────────────────────────────────────────────── */

.thankyou-section {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px;
}
.thankyou-intro { color: var(--muted); margin-bottom: 28px; }
.gap-card-result { margin-bottom: 20px; }
.local-comparison { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.share-section { margin: 24px 0; }
.btn-share {
  display: inline-block;
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
}
.btn-secondary {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
}

/* ── Local view ──────────────────────────────────────────────────────── */

.local-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}
.local-section h1 { margin-bottom: 20px; }

.zip-form {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  max-width: 360px;
}
.zip-form input {
  flex: 1;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 18px;
}
.zip-form button {
  padding: 12px 20px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}

.notice { color: var(--muted); }
.local-subtitle { color: var(--muted); margin-bottom: 20px; }

.local-table-wrapper { overflow-x: auto; }
.local-table { width: 100%; border-collapse: collapse; }
.local-table th, .local-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.local-table th { color: var(--muted); font-weight: 600; }
.local-table .gap-over { color: var(--red); }
.local-table .gap-under { color: var(--green); }

/* ── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.site-footer a { color: var(--muted); }

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .nav-links .nav-cta { display: none; } /* move to hero on mobile */
  .price-label { min-width: 120px; font-size: 14px; }
  .price-value { font-size: 20px; }
  .price-value.highlight { font-size: 26px; }
  .gap-number { font-size: 20px; }
  .gap-number-secondary { font-size: 15px; }
  .chart-wrapper { height: 220px; }
  .shrinkflation-stat { padding: 12px 14px; }
  .shrinkflation-stat p { font-size: 14px; }
}

/* ── SEO content sections ─────────────────────────────────────────────── */

.product-context {
  max-width: 700px;
  margin: 48px auto 0;
  padding: 0 24px;
}
.product-context h2 {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 10px;
}
.product-context p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.related-products {
  max-width: 700px;
  margin: 36px auto 0;
  padding: 0 24px 48px;
}
.related-products h3 {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}
.related-products ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.related-products li a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.related-products li a:hover { color: var(--text); border-color: var(--muted); }

.footer-products {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.7;
}
.footer-products a { color: var(--muted); margin: 0 2px; }

/* ── Email capture — post-submission (thankyou.html) ─────────────────── */

.email-capture {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
  margin: 28px 0;
  max-width: 520px;
}

.email-capture-headline {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text);
}

.email-capture-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
}

.email-capture-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.email-capture-form input[type="email"] {
  flex: 1 1 220px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 14px;
}

.email-capture-form input[type="email"]:focus {
  outline: none;
  border-color: var(--red);
}

.email-capture-form button {
  padding: 10px 18px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.email-capture-form button:hover { background: #b92a2a; }


/* ── Email capture — inline landing page (index.html) ────────────────── */

.email-capture-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 700px;
  margin: 20px auto 0;
  padding: 16px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.email-capture-inline-text {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  flex: 0 0 auto;
}

.email-capture-inline-form {
  display: flex;
  gap: 8px;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.email-capture-inline-form input {
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 14px;
}

.email-capture-inline-form input[type="email"] { flex: 1 1 180px; }
.email-capture-inline-form input[type="text"]  { flex: 0 1 90px; }

.email-capture-inline-form input:focus {
  outline: none;
  border-color: var(--red);
}

.email-capture-inline-form button {
  padding: 8px 16px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.email-capture-inline-form button:hover { background: #b92a2a; }


/* ── Subscription status pages ───────────────────────────────────────── */

.subscribe-status-section {
  max-width: 520px;
  margin: 60px auto;
  padding: 0 24px 64px;
}

.subscribe-status-section h1 { font-size: 28px; margin-bottom: 16px; }

.subscribe-status-body {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.7;
}

.subscribe-status-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}


/* ── About page ───────────────────────────────────────────────────────── */

.about-contact { margin-top: 28px; }

.about-section {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}
.about-section h1 { font-size: 28px; margin-bottom: 8px; }
.about-intro { color: var(--muted); font-size: 16px; margin-bottom: 32px; }
.about-section h2 { font-size: 18px; margin-top: 36px; margin-bottom: 10px; }
.about-section p, .about-section li { font-size: 15px; line-height: 1.7; color: var(--muted); }
.about-section ul, .product-list { padding-left: 20px; margin: 10px 0; }
.about-section a { color: var(--text); }

.faq-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 12px;
  padding: 12px 16px;
}
.faq-item summary {
  cursor: pointer;
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}
.faq-item p { margin-top: 10px; font-size: 14px; }

/* ── Beat the Gap block (thankyou.html) ──────────────────────────────────── */

.beat-the-gap h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}

.context-headline {
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 20px;
  color: var(--text);
}

/* Percentage difference color — pct_diff display only */
.pct-above { color: var(--red); }
.pct-below { color: var(--green); }

.price-context-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

/* .price-row / .price-label / .price-value already defined globally */

.price-you {
  font-weight: 700;
  color: var(--text);
}

.price-best {
  font-weight: 600;
  color: var(--text);
}

.context-footnote {
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

@media (max-width: 390px) {
  .context-headline { font-size: 15px; }
  .beat-the-gap h2  { font-size: 17px; }
}

/* ── PWA pre-shopping brief ──────────────────────────────────────────────── */

.pwa-brief {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.pwa-brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.pwa-area {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.pwa-change-zip {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}
.pwa-change-zip:hover { color: var(--text); border-color: #555; }

.pwa-brief-intro {
  font-size: 22px;
  font-weight: 800;
  margin: 8px 0 20px;
  line-height: 1.2;
}

.pwa-brief-rows {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.pwa-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.pwa-row:last-child { border-bottom: none; }

.pwa-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.pwa-trend {
  font-size: 16px;
  color: var(--muted);
  min-width: 20px;
  text-align: center;
}

.pwa-gap {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.pwa-submit-btn {
  width: 100%;
  display: block;
  text-align: center;
}

.pwa-zip-prompt {
  max-width: 360px;
  margin: 60px auto;
  padding: 0 20px;
  text-align: center;
}

.pwa-zip-headline {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}

.pwa-zip-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 28px;
}

.pwa-zip-form {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.pwa-zip-form input {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  width: 140px;
  text-align: center;
  letter-spacing: 2px;
}
.pwa-zip-form input:focus { outline: none; border-color: var(--red); }

.pwa-zip-form button {
  padding: 14px 20px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.pwa-zip-form button:hover { background: #b52a2a; }

.pwa-loading,
.pwa-error {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 15px;
}

.pwa-no-data {
  padding: 24px 16px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  margin: 0;
}

@media (max-width: 390px) {
  .pwa-row { gap: 6px; padding: 12px 12px; }
  .pwa-name { font-size: 14px; }
  .pwa-price { font-size: 16px; }
  .pwa-gap { font-size: 12px; }
}

/* ── Basket Calculator (/basket) ─────────────────────────────────────────────── */

.basket-section {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.basket-title { font-size: 28px; font-weight: 800; margin: 0 0 10px; }
.basket-intro { color: var(--muted); font-size: 15px; margin: 0 0 6px; }
.basket-area  { color: var(--muted); font-size: 13px; margin: 0 0 28px; }

.basket-products {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 28px;
}

.basket-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
  user-select: none;
}
.basket-row:hover { border-color: #444; }
.basket-row.selected { border-color: var(--red); }

.basket-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 0;
}

.basket-check {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--red);
}
.basket-check:disabled { opacity: 0.35; }

.basket-row-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.basket-row-unit {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.basket-qty-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.basket-qty-wrap--disabled { opacity: 0.4; }

.basket-qty {
  width: 50px;
  padding: 6px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  -moz-appearance: textfield;
}
.basket-qty::-webkit-inner-spin-button,
.basket-qty::-webkit-outer-spin-button { -webkit-appearance: none; }
.basket-qty:focus { outline: none; border-color: var(--red); }
.basket-qty:disabled { opacity: 0.4; }
.basket-qty-label { color: var(--muted); font-size: 12px; white-space: nowrap; }

.basket-row-prices {
  text-align: right;
  min-width: 80px;
}
.basket-row-prices.basket-no-data { opacity: 0.5; }

.basket-unit-shopper { display: block; font-weight: 700; font-size: 15px; }
.basket-unit-official { display: block; color: var(--muted); font-size: 12px; }
.basket-unit-no-reports { display: block; color: var(--muted); font-size: 11px; font-style: italic; }

/* Results card — reuses .gap-card base */
.basket-results { margin-bottom: 20px; }

.basket-results-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
}

.basket-line-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.basket-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.basket-line-name { color: var(--muted); font-size: 14px; flex: 1; }
.basket-line-prices { display: flex; gap: 10px; white-space: nowrap; flex-shrink: 0; }
.basket-line-shopper { font-weight: 600; font-size: 14px; }
.basket-line-official { color: var(--muted); font-size: 13px; }

.basket-totals {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.basket-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
}
.basket-total-row span:first-child { color: var(--muted); }
.basket-total-row span:last-child  { font-weight: 700; }

.basket-total-gap-row span:last-child { font-size: 18px; }

/* Annual gap hero — largest number on the page */
.basket-hero-block {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--border);
  padding: 16px 0 20px;
  margin-top: 8px;
}

.basket-hero-label {
  font-size: 16px;
  color: var(--muted);
}

.basket-hero-number {
  font-size: clamp(32px, 6vw, 44px);
  font-weight: 800;
  line-height: 1;
}

.basket-share-btn {
  margin-top: 4px;
  cursor: pointer;
  background: var(--red);
  color: white;
  border: none;
  font-size: 18px;
  font-weight: 700;
}

.basket-share-confirm {
  font-size: 13px;
  color: var(--green);
  text-align: center;
  margin: 8px 0 0;
}

.basket-footnote {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.6;
}
.basket-footnote a { color: var(--muted); text-decoration: underline; }

@media (max-width: 580px) {
  .basket-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px 10px;
  }
  .basket-row-left  { grid-column: 1; grid-row: 1; }
  .basket-row-unit  { grid-column: 2; grid-row: 1; }
  .basket-qty-wrap  { grid-column: 1; grid-row: 2; }
  .basket-row-prices { grid-column: 2; grid-row: 2; }
}

@media (max-width: 390px) {
  .basket-row-name   { font-size: 14px; }
  .basket-hero-number { font-size: 30px; }
}

/* ── Personal Inflation Rate (/my-inflation) ─────────────────────────────────── */

.my-inflation-section {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.my-inflation-header  { margin-bottom: 28px; }
.my-inflation-title   { font-size: 28px; font-weight: 800; margin: 0 0 10px; }
.my-inflation-intro   { color: var(--muted); font-size: 15px; margin: 0; }

/* Notice cards (no-token, invalid, no official data) */
.my-inflation-notice  { margin-top: 0; }
.my-inflation-notice-headline {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 12px;
}
.my-inflation-notice-body {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 10px;
  line-height: 1.6;
}

/* Pending / not-enough-data card */
.my-inflation-pending { margin-top: 0; }
.my-inflation-progress {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}
.my-inflation-progress-count { color: var(--text); }
.my-inflation-progress-label { font-size: 18px; font-weight: 400; color: var(--muted); }
.my-inflation-pending-body {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 24px;
  line-height: 1.6;
}

/* Section label inside cards */
.my-inflation-section-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 20px;
}

/* Per-product list */
.my-inflation-products { margin-bottom: 16px; }

.my-inflation-product-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.my-inflation-product-row {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}
.my-inflation-product-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.my-inflation-product-name {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 10px;
}
.my-inflation-product-unit {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  margin-left: 6px;
}

.my-inflation-product-prices {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.my-inflation-product-you,
.my-inflation-product-govt,
.my-inflation-product-gap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
}

.my-inflation-price-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.my-inflation-price-value {
  font-size: 20px;
  font-weight: 700;
}
.my-inflation-official { color: var(--official-color); font-weight: 600; }

.my-inflation-product-count {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

/* Summary metrics card */
.my-inflation-summary { margin-bottom: 16px; }

.my-inflation-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.my-inflation-metric-row:first-of-type { padding-top: 0; }

.my-inflation-metric-label {
  font-size: 15px;
  color: var(--text);
  flex: 1;
}
.my-inflation-metric-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.my-inflation-metric-value {
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Hero block — annual dollar gap */
.my-inflation-hero-block {
  padding: 20px 0 8px;
}
.my-inflation-hero-label {
  display: block;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 1.5;
}
.my-inflation-hero-number {
  display: block;
  font-size: clamp(36px, 7vw, 52px);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}
.my-inflation-hero-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.5;
}

/* Share button + confirm */
.my-inflation-share-btn {
  cursor: pointer;
  background: var(--red);
  color: white;
  border: none;
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
}
.my-inflation-share-confirm {
  font-size: 13px;
  color: var(--green);
  text-align: center;
  margin: 8px 0 0;
}

/* Footnote */
.my-inflation-footnote {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.6;
}
.my-inflation-footnote a { color: var(--muted); text-decoration: underline; }

@media (max-width: 520px) {
  .my-inflation-metric-row { flex-direction: column; gap: 4px; }
  .my-inflation-metric-value { font-size: 20px; }
  .my-inflation-product-prices { gap: 16px; }
  .my-inflation-price-value { font-size: 17px; }
}

@media (max-width: 390px) {
  .my-inflation-title { font-size: 24px; }
  .my-inflation-hero-number { font-size: 34px; }
}
