/* ================================================================
   SAvive — Consumer stylesheet
   Ubuntu font · SA flag palette · Mobile-first
   ================================================================ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --green:   #007A4D;
  --gold:    #FFB81C;
  --red:     #DE3831;
  --blue:    #002395;

  --bg:        #F8F4EF;
  --card-bg:   #FFFFFF;
  --text:      #1A1A1A;
  --text-sub:  #555555;
  --text-muted:#888888;
  --border:    #E5E0D8;

  --alert-high-bg:     #FEF0EF;
  --alert-high-border: #DE3831;
  --alert-medium-bg:   #FFF8E6;
  --alert-medium-border:#FFB81C;
  --alert-low-bg:      #EEF7F3;
  --alert-low-border:  #007A4D;

  --radius:  12px;
  --shadow:  0 2px 12px rgba(0,0,0,.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,.10);
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, canvas { display: block; max-width: 100%; }

/* ── Base ──────────────────────────────────────────────────────── */
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Ubuntu', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* ── SA Flag Stripe ─────────────────────────────────────────────── */
.flag-stripe {
  height: 6px;
  background: linear-gradient(to right,
    #000000  0%   16.6%,
    #007A4D  16.6% 33.3%,
    #FFB81C  33.3% 50%,
    #DE3831  50%   66.6%,
    #002395  66.6% 83.3%,
    #FFFFFF  83.3% 100%
  );
}

/* ── Site Header ───────────────────────────────────────────────── */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-text strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.1;
}

.brand-text small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* ── Header right cluster (region toggle + fuel pill) ───────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ── Region Toggle ──────────────────────────────────────────────── */
.region-toggle {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.35rem 0.2rem 0.55rem;
  font-size: 0.72rem;
}

.region-toggle-label {
  font-size: 0.82rem;
  margin-right: 0.1rem;
  flex-shrink: 0;
}

.region-btn {
  background: none;
  border: none;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.region-btn:hover { background: var(--border); }

.region-btn--active {
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

/* Fuel Pill */
.fuel-pill {
  background: var(--green);
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  cursor: default;
}

.fuel-pill--urgent {
  background: var(--red);
}

.fuel-pill-tag {
  background: rgba(255,255,255,.25);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Site Nav ───────────────────────────────────────────────────── */
.site-nav {
  background: var(--card-bg);
  border-bottom: 2px solid var(--border);
  padding: 0 1rem;
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0;
}
.site-nav::-webkit-scrollbar { display: none; }

.nav-tab {
  flex-shrink: 0;
  padding: 0.8rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-sub);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color .15s;
  white-space: nowrap;
}

.nav-tab:hover { color: var(--green); }

.nav-tab--active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 700;
}

/* ── Main ───────────────────────────────────────────────────────── */
.site-main {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}

/* ── Alert Banner ───────────────────────────────────────────────── */
.alert-banner {
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  margin-bottom: 1.5rem;
  border-left: 5px solid transparent;
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}

.alert-banner--high   { background: var(--alert-high-bg);   border-color: var(--red); }
.alert-banner--medium { background: var(--alert-medium-bg); border-color: var(--gold); }
.alert-banner--low,
.alert-banner--none   { background: var(--alert-low-bg);    border-color: var(--green); }

.alert-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }

.alert-headline {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.alert-detail {
  font-size: 0.825rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.alert-detail strong { color: var(--text); }

.alert-meta {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── Cards Grid ─────────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Full-width card on small screens, normal on larger */
.card--full { grid-column: 1 / -1; }

@media (min-width: 640px) {
  .card--full { grid-column: auto; }
}

/* ── Metric Card ────────────────────────────────────────────────── */
.metric-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.0625rem 1.125rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: box-shadow .2s;
}

.metric-card:hover { box-shadow: var(--shadow-md); }

/* Coming soon state */
.metric-card--coming-soon {
  opacity: 0.55;
}

/* Card header row: label + pill */
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Status / coming-soon pills */
.pill {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.pill--red    { background: #FFEAEA; color: #B91C1C; }
.pill--amber  { background: #FFF3CC; color: #78490A; }
.pill--green  { background: #DFFFEE; color: #046030; }
.pill--grey   { background: #F0F0F0; color: #666; }

/* Big value */
.card-value {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}

.card-value--red   { color: var(--red); }
.card-value--amber { color: #8B6000; }
.card-value--green { color: var(--green); }
.card-value--muted { color: var(--text-muted); }

/* Sparkline canvas */
.sparkline-wrap {
  height: 72px;
  margin: 0.15rem -0.25rem;
}

.sparkline-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Context text below sparkline */
.card-context {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.card-context strong { color: var(--text-sub); font-weight: 600; }

.card-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}

.card-link:hover { text-decoration: underline; }

/* ── Electricity dual-rate row ──────────────────────────────────── */
.elec-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.elec-row-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.1rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.elec-row-divider {
  font-size: 1.1rem;
  color: var(--text-muted);
  padding-bottom: 0.3rem;
}

/* ── Municipality picker ─────────────────────────────────────────── */
.muni-picker-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.6rem 0 0.25rem;
}

.muni-picker-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.muni-picker-form { display: inline; }

.muni-select {
  font-size: 0.78rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

.muni-select:focus { outline: none; border-color: var(--green); }

.muni-rate-badge {
  font-size: 0.72rem;
  color: var(--text-sub);
  background: #EEF7F3;
  border: 1px solid #C3E6D5;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  white-space: nowrap;
}

.muni-rate-badge span {
  color: var(--text-muted);
  font-style: italic;
}

/* ── Impact Strip ───────────────────────────────────────────────── */
.impact-strip {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.375rem;
  margin-top: 0.25rem;
}

.impact-strip-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.impact-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

@media (min-width: 560px) {
  .impact-items { grid-template-columns: repeat(3, 1fr); }
}

.impact-item-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.impact-item-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.impact-item-sub {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  color: var(--text-muted);
}
.impact-item-sub--context {
  font-style: italic;
  opacity: 0.75;
}

/* ── Card severity accent (top border) ──────────────────────────── */
.metric-card--high   { border-top: 3px solid var(--red); }
.metric-card--medium { border-top: 3px solid var(--gold); }
.metric-card--low    { border-top: 3px solid var(--green); }
.metric-card--none   { border-top: 3px solid var(--border); }

/* ── Card label (short all-caps category) ───────────────────────── */
.card-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}

/* Small unit label inside the big value */
.card-value-unit {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
}

/* Status line — sits below the value, grows to push button to bottom */
.card-status {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  flex-grow: 1;
}

.card-status--red   { color: #B91C1C; }
.card-status--amber { color: #78490A; }
.card-status--green { color: #046030; }

/* "See detail" button — separated from content by a top border */
.card-detail-btn {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green);
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.card-detail-btn:hover { color: #004f32; }

.text-warn { color: #B91C1C; }

/* ── Modal ──────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 900;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-panel {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 1;
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  font-family: inherit;
}

.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Stat row inside modal */
.modal-stat-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.modal-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.modal-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--text);
}

.modal-stat-value--muted { color: var(--text-sub); }

/* Chart inside modal */
.modal-chart-wrap {
  height: 180px;
}

.modal-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.modal-caption {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.modal-caption strong { color: var(--text-sub); }

/* ── Under-recovery block ───────────────────────────────────────── */
.ur-block {
  border-radius: 8px;
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ur-block--down { background: #FEF0EF; border-left: 4px solid var(--red); }
.ur-block--up   { background: #EEF7F3; border-left: 4px solid var(--green); }

.ur-headline {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ur-headline strong { font-weight: 700; }

.ur-info-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: none;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
  transition: background .15s, color .15s;
}

.ur-info-btn:hover {
  background: var(--text-muted);
  color: #fff;
}

.ur-info-panel {
  font-size: 0.78rem;
  color: var(--text-sub);
  line-height: 1.55;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(0,0,0,.06);
}

.ur-info-panel strong { color: var(--text); }
.ur-info-panel em     { font-style: italic; }

.ur-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ── Basket breakdown (item-level) ────────────────────────── */
.basket-breakdown {
  margin: 0.75rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.basket-breakdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
  min-width: 0;
}
.basket-breakdown-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.basket-breakdown-shop-tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  flex-shrink: 0;
}
.bst {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.bst:hover { background: var(--border); color: var(--text); }
.bst.active { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }
.basket-loading {
  padding: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}
.basket-cat {
  border-bottom: 1px solid var(--border);
}
.basket-cat:last-child { border-bottom: none; }
.basket-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}
.basket-cat-header::-webkit-details-marker { display: none; }
.basket-cat-subtotal {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}
.basket-cat-items { padding: 0 0 0.25rem; }
.basket-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem 0.75rem 0.3rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
}
.basket-item-name { color: var(--text); flex: 1; }
.basket-item-price {
  font-weight: 600;
  color: var(--text);
  min-width: 3.5rem;
  text-align: right;
}

/* ── Basket shop comparison table ─────────────────────────── */
.basket-shop-table {
  margin: 0.75rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.basket-shop-table-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem 0.35rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.basket-shop-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.basket-shop-row:last-child { border-bottom: none; }
.basket-shop-row--empty { opacity: 0.45; }
.basket-shop-name {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text);
}
.basket-shop-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  min-width: 3rem;
  text-align: right;
}
.basket-shop-price--na { color: var(--text-muted); font-weight: 400; }
.basket-shop-items-warn {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--gold);
  margin-left: 0.3rem;
}
.basket-shop-date {
  font-size: 0.68rem;
  color: var(--text-muted);
  min-width: 5rem;
  text-align: right;
}

/* Municipality row inside modal */
.modal-muni-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 8px;
}

/* ── Why So Expensive page ───────────────────────────────────────── */
.why-hero {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  max-width: 680px;
  margin: 0 auto 2rem;
}
.why-hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.why-hero-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.why-hero-sub {
  font-size: 1rem;
  color: var(--text-sub);
  line-height: 1.6;
}

/* Chain section header */
.why-chain-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}
.why-chain-header--fuel {
  background: #FFF8E6;
  border-left: 4px solid var(--gold);
}
.why-chain-header--elec {
  background: #FEF0EF;
  border-left: 4px solid var(--red);
}
.why-chain-icon { font-size: 1.75rem; line-height: 1; }
.why-chain-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.why-chain-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* Steps — accordion */
.why-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.5rem;
}
.why-step {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.why-step--hit {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px #FFB81C22;
}

/* Summary row — always visible */
.why-step-summary {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.why-step-summary::-webkit-details-marker { display: none; }
.why-step-summary::marker { display: none; }

.why-step-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 1.6rem;
  flex-shrink: 0;
}
.why-step-summary .why-step-icon {
  font-size: 1.25rem;
  margin-right: 0.6rem;
  flex-shrink: 0;
  line-height: 1;
}
.why-step-summary .why-step-title {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  line-height: 1.3;
}
.why-step-chevron {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}
.why-step-chevron::after { content: '›'; font-size: 1.1rem; display: block; transform: rotate(90deg); }
details[open] .why-step-chevron::after { transform: rotate(270deg); }

/* Expanded body */
.why-step-content {
  padding: 0 1rem 1rem 3.1rem;
}
.why-step-title {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.why-step-text {
  font-size: 0.88rem;
  color: var(--text-sub);
  line-height: 1.65;
  margin-bottom: 0.6rem;
}
.why-step-text:last-of-type { margin-bottom: 0.75rem; }

/* Hover state on summary */
.why-step-summary:hover { background: var(--bg); }
details[open] > .why-step-summary { border-bottom: 1px solid var(--border); }

/* Personal impact callout */
.why-impact {
  background: #EEF7F3;
  border-left: 3px solid var(--green);
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1rem;
  margin-top: 0.25rem;
}
.why-impact-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  margin-bottom: 0.35rem;
}
.why-impact-text {
  font-size: 0.875rem;
  color: #1A1A1A;
  line-height: 1.6;
}

/* Divider between chains */
.why-chain-divider {
  text-align: center;
  padding: 1.25rem 1rem;
  margin: 0.5rem 0 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-sub);
  border-top: 2px dashed var(--border);
  border-bottom: 2px dashed var(--border);
}

/* Bottom summary */
.why-bottom {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  margin-bottom: 2rem;
}
.why-bottom-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.why-bottom-text {
  font-size: 0.93rem;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.why-bottom-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.why-bottom-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}
.why-bottom-card-icon { font-size: 1.4rem; margin-bottom: 0.4rem; }
.why-bottom-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.why-bottom-card-text {
  font-size: 0.78rem;
  color: var(--text-sub);
  line-height: 1.55;
}
.why-bottom-nav { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.why-nav-btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--border);
  color: var(--text-sub);
  background: var(--bg);
}
.why-nav-btn--primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.why-nav-btn:hover { opacity: 0.85; }

@media (max-width: 480px) {
  .why-step-summary { padding: 0.75rem 0.75rem; }
  .why-step-summary .why-step-title { font-size: 0.86rem; }
  .why-step-content { padding: 0 0.75rem 0.9rem 2.8rem; }
  .why-step-text { font-size: 0.84rem; }
  .why-impact-text { font-size: 0.82rem; }
}

/* ── Item price search ───────────────────────────────────────────── */
.item-search { margin: 0 0 1.25rem; }
.item-search-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.item-search-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.item-search-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Ubuntu', sans-serif;
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.item-search-input:focus { border-color: var(--green); }
.item-search-btn {
  padding: 0.5rem 1rem;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Ubuntu', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.item-search-btn:hover { background: #005f3b; }
.item-search-msg { font-size: 0.82rem; color: var(--text-muted); padding: 0.4rem 0; }
.item-search-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 0.25rem;
}
.item-search-table th {
  text-align: left;
  padding: 0.35rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border);
}
.item-search-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--border); }
.item-search-name { font-weight: 500; color: var(--text); }
.item-search-price { color: var(--text-sub); text-align: right; }
.item-search-cheapest {
  color: var(--green);
  font-weight: 700;
  text-align: right;
}
.item-search-na { color: var(--text-muted); text-align: right; }

/* ── Item price history chart ───────────────────────────────────── */
.item-history-wrap {
  margin-top: 1rem;
  display: none;
}
.item-history-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.item-history-canvas-wrap {
  position: relative;
  height: 200px;
}

/* ── What Can I Do — Action page ────────────────────────────────── */
.action-hero {
  background: linear-gradient(135deg, #EEF7F3 0%, #F8F4EF 100%);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid #C8E6D7;
}
.action-hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 0.5rem;
}
.action-hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.action-hero-sub {
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.5;
  max-width: 640px;
}

/* Sub-tab bar */
.action-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 1.25rem;
  padding-bottom: 0.25rem;
}
.action-tabs::-webkit-scrollbar { display: none; }

.action-tab {
  flex-shrink: 0;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-sub);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.action-tab:hover { border-color: var(--green); color: var(--green); }
.action-tab--active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  font-weight: 700;
}

/* Info banner at top of each section */
.action-banner {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  background: #EEF7F3;
  border: 1px solid #C8E6D7;
  border-radius: var(--radius);
  padding: 1rem 1.125rem;
  margin-bottom: 1.25rem;
}
.action-banner-icon { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }
.action-banner-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.action-banner-sub {
  font-size: 0.83rem;
  color: var(--text-sub);
  line-height: 1.5;
}

/* Accordion steps (shared by all tabs) */
.action-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.action-step {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.action-step-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.action-step-summary::-webkit-details-marker { display: none; }
.action-step-summary::marker { display: none; }
.action-step-summary:hover { background: var(--bg); }
details[open] > .action-step-summary { border-bottom: 1px solid var(--border); }

.action-step-icon { font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
.action-step-title {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.action-step-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}
.action-step-badge--green { background: #D4EDDA; color: #155724; }
.action-step-badge--gold  { background: #FFF3CD; color: #856404; }

.action-step-chevron {
  flex-shrink: 0;
  width: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s;
}
.action-step-chevron::after { content: '›'; font-size: 1.1rem; display: block; transform: rotate(90deg); }
details[open] .action-step-chevron::after { transform: rotate(270deg); }

.action-step-content {
  padding: 0.875rem 1rem 1rem 1rem;
}
.action-step-text {
  font-size: 0.875rem;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.action-impact {
  background: #EEF7F3;
  border-left: 3px solid var(--green);
  border-radius: 0 8px 8px 0;
  padding: 0.6rem 0.875rem;
  margin-top: 0.75rem;
}
.action-impact-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  margin-bottom: 0.3rem;
}
.action-impact-text {
  font-size: 0.83rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.action-list {
  padding-left: 1.25rem;
  margin: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.action-list li {
  font-size: 0.875rem;
  color: var(--text-sub);
  line-height: 1.5;
}

/* Stockpile grid */
.action-stockpile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  margin-top: 0.75rem;
}
@media (min-width: 480px) { .action-stockpile-grid { grid-template-columns: repeat(3, 1fr); } }
.action-stockpile-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  color: var(--text-sub);
}

/* Grants contact block */
.action-grant-contact {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  text-align: center;
}
.action-grant-contact-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.action-grant-contact-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}
.action-grant-contact-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.action-grant-note {
  background: #FFF8E6;
  border: 1px solid #FFD966;
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  font-size: 0.82rem;
  color: var(--text-sub);
  margin-top: 1rem;
  line-height: 1.5;
}

/* Seasonal grow section */
.action-season-header {
  margin-bottom: 1rem;
}
.action-season-badge {
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.action-season-sub {
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.action-season-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
@media (min-width: 480px) { .action-season-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) { .action-season-grid { grid-template-columns: repeat(5, 1fr); } }

.action-crop-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.6rem;
  text-align: center;
}
.action-crop-icon { font-size: 1.6rem; margin-bottom: 0.3rem; }
.action-crop-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.action-crop-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 480px) {
  .action-hero-title { font-size: 1.4rem; }
  .action-step-summary { padding: 0.75rem 0.75rem; }
  .action-step-title { font-size: 0.88rem; }
  .action-step-content { padding: 0.75rem; }
}

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  line-height: 1.6;
}
