/* ================================================================
   Solo - Home / Dashboard (Cream redesign, v2.0.0)
   Hero status card · RecCard list · QuietRow background · Latest
   ================================================================ */

/* ── Greeting ───────────────────────────────────────────────── */
.home-greeting {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
  padding-left: 2px;
  letter-spacing: -0.1px;
}

/* ── Hero status card ───────────────────────────────────────── */
.home-hero {
  position: relative;
  overflow: hidden;
  margin-top: 12px;
  padding: 28px var(--content-pad) 26px;
  border-radius: 28px;
  /* Soft coral wash anchored at top-right corner - replaces the
     positioned + blurred .home-hero-orb that was clipping awkwardly
     against the card's 28px corner radius. As a CSS background layer
     it's fully resolution-independent and never produces a hard edge. */
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(224, 120, 86, 0.20), rgba(224, 120, 86, 0) 58%),
    radial-gradient(90% 70% at 0% 100%, rgba(127, 166, 140, 0.07), rgba(127, 166, 140, 0) 60%),
    linear-gradient(165deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 1px 2px rgba(31, 27, 22, 0.04),
    0 14px 36px rgba(31, 27, 22, 0.06);
  /* Entrance handled by the .anim-in stagger (body.ss-intro), once per open */
}
html[data-theme="dark"] .home-hero {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 48px rgba(0, 0, 0, 0.32);
}

/* Legacy decoration - kept in markup, hidden visually. The wash is now
   part of .home-hero's background gradient. */
.home-hero-orb { display: none; }

.home-hero-status {
  display: flex; align-items: center; gap: 8px;
  position: relative;
}

.home-hero-headline {
  position: relative;
  margin-top: 12px;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.8px;
  font-weight: 500;
  color: var(--ink);
  text-wrap: pretty;
}
.home-hero-headline em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-ink);
  letter-spacing: 0;
}

.home-hero-saving {
  position: relative;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px;
}

.home-hero-saving-label { display: block; }

.home-hero-rate {
  font-size: 13px;
  color: var(--good);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
  padding-bottom: 4px;
}

/* Savings from in-flight switches - deliberately quieter than the locked
   figure so "on the way" never reads as money already banked. */
.home-hero-pending {
  position: relative;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}
.home-hero-pending strong { color: var(--ink); font-weight: 600; }

/* ── Sections (Needs your approval, In the background, Latest) ── */
.home-section { margin-top: 24px; }

.home-section-label {
  display: block;
  margin-bottom: 10px;
  padding-left: 4px;
}

.home-section-headrow {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px 10px;
}

.home-link {
  background: none; border: 0; cursor: pointer;
  font-size: 12px; color: var(--ink-3);
  font-family: inherit;
  padding: 4px 6px;
  border-radius: 8px;
}
.home-link:hover { color: var(--ink-2); }

/* ── Empty Home state (no bills) ────────────────────────────── */
.home-empty {
  margin-top: 8px;
  padding: 36px var(--content-pad) 30px;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--surface) 70%);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.home-empty-eyebrow {
  font-size: 11px;
  color: var(--accent-ink);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.home-empty-headline {
  font-size: 34px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.8px;
  margin-top: 8px;
  line-height: 1.05;
  text-wrap: pretty;
}
.home-empty-headline em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-ink);
  letter-spacing: 0;
}
.home-empty-body {
  font-size: 14.5px;
  color: var(--ink-2);
  margin-top: 12px;
  line-height: 1.5;
  text-wrap: pretty;
}
.home-empty-actions {
  margin-top: 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.home-supported-hint {
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  margin-top: 2px;
  line-height: 1.4;
}

/* Example bills - static stacked list (ship blend: no rotation) */
.hero-example-stack {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero-example {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.hero-example-glyph {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.hero-example-body { flex: 1; min-width: 0; }
.hero-example-name {
  font-size: 13px; font-weight: 600;
  color: var(--ink);
}
.hero-example-meta {
  font-size: 11px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  margin-top: 1px;
}
.hero-example-save { color: var(--good); }
.hero-example-spark {
  color: var(--accent);
  display: flex; align-items: center;
}
/* Trust micro-cards under the empty state */
.trust-cards {
  margin-top: 28px;
  display: flex;
  gap: 10px;
}
.trust-card {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.35;
  letter-spacing: -0.05px;
}
.trust-card-icon {
  display: block;
  color: var(--good);
  margin-bottom: 6px;
}

/* ── Home footer (Privacy / Terms / Contact) ─────────────────── */
.home-footer {
  margin-top: 40px;
  padding: 18px 0 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-3);
}
.home-footer a {
  color: var(--ink-3);
  text-decoration: none;
}
.home-footer a:hover {
  color: var(--ink);
}
.home-footer-dot {
  color: var(--ink-3);
  opacity: 0.6;
}


/* ── Switch history (legacy on home) ─────────────────────────── */
/* Kept simple: setting-row pattern still works */

/* ── Bill List (legacy used on Bills tab) ───────────────────── */
.bill-list {
  display: flex; flex-direction: column; gap: 0;
}

/* ── Bill Card (current row layout, restyled) ───────────────── */
.bill-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.1s ease;
}
.bill-card:hover { background: rgba(31, 27, 22, 0.02); border-radius: 14px; }
.bill-card:last-child { border-bottom: none; }
.bill-card:active { transform: scale(0.99); transition: transform 80ms var(--ease-tap); }

.bill-card .chip { transition: background 400ms var(--ease), color 400ms var(--ease); }
.bill-card-switch-btn { transition: background 400ms var(--ease), color 400ms var(--ease); }

.bill-card-icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: var(--surface-2);
  color: var(--ink);
  overflow: hidden;
}
.bill-card-icon .sf-icon { width: 56%; height: 56%; display: inline-flex; align-items: center; justify-content: center; }
.bill-card-icon .sf-icon svg { width: 100% !important; height: 100% !important; stroke-width: 1.8; }
.bill-card-icon > svg { width: 56% !important; height: 56% !important; stroke-width: 1.8; }

/* Category-tinted icon boxes */
.bill-card-icon.utilities    { background: var(--warn-soft);   color: #8B6420; }
.bill-card-icon.internet     { background: var(--accent-soft); color: var(--accent-ink); }
.bill-card-icon.insurance    { background: var(--good-soft);   color: var(--good-ink); }
.bill-card-icon.finance      { background: var(--purple-soft); color: var(--purple); }
.bill-card-icon.subscriptions { background: var(--purple-soft); color: var(--purple); }
.bill-card-icon.vehicle      { background: var(--purple-soft); color: var(--purple); }
.bill-card-icon.lifestyle    { background: var(--warn-soft);   color: #8B6420; }
.bill-card-icon.childcare    { background: var(--good-soft);   color: var(--good-ink); }

.bill-card-body { flex: 1; min-width: 0; }
.bill-card-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.2px;
}
.bill-card-provider {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.bill-scanned-badge { opacity: 0.45; }
.bill-scanned-badge .sf-icon-xs svg { width: 11px; height: 11px; }

.bill-card-right { text-align: right; flex-shrink: 0; }
.bill-card-amount {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.bill-card-amount .text-xs { font-size: 11px; }
.bill-card-amount-unit { font-size: 11px; font-weight: 400; color: var(--ink-3); }

.bill-card-checking {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
  margin-top: 2px;
  animation: checking-pulse 1.6s ease-in-out infinite;
}
@keyframes checking-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.bill-card-switch-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  margin-top: 2px;
}
.bill-card-switch-btn .sf-icon-xs svg { width: 11px; height: 11px; }

/* ── Status Indicators (legacy) ─────────────────────────────── */
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.status-dot--switch    { background: var(--accent); }
.status-dot--progress  { background: var(--good); animation: pulse 2s ease-in-out infinite; }
.status-dot--optimised { background: var(--good); }
.status-dot--neutral   { background: var(--ink-3); }

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(127, 166, 140, 0.4); }
  50%      { opacity: 0.7; box-shadow: 0 0 0 6px rgba(127, 166, 140, 0); }
}

/* ── Subscription Overlap Card ─────────────────────────────── */
.overlap-section {
  display: flex; flex-direction: column; gap: 10px;
}

.overlap-card {
  background: var(--surface);
  border: 1px solid rgba(217, 164, 65, 0.30);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color var(--duration-fast) ease, transform 80ms var(--ease-tap);
  -webkit-tap-highlight-color: transparent;
}
.overlap-card:active { transform: scale(0.98); }
.overlap-card:hover { border-color: rgba(217, 164, 65, 0.5); }

.overlap-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
}

/* ── Legacy savings hero (still referenced in some renderers) ── */
.savings-hero {
  text-align: center;
  padding: 32px var(--content-pad);
  animation: heroEnter 500ms var(--ease-tap);
}
.savings-hero-label {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 4px;
}
.savings-hero-amount {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 54px;
  font-weight: 400;
  color: var(--good);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.savings-hero-amount.potential { color: var(--accent); }
.savings-hero-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 6px;
}
.savings-locked {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px;
  background: var(--good-soft);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  color: var(--good-ink);
  margin-top: 12px;
}

/* ── Savings tab (value for money, July 2026) ─────────────────────
   Two cards: "Your unit costs" (the user's own c/kWh, c/MJ, $/GB,
   $/Mbps, each tap-through to its working) and "Switch wins" (the
   ledger: every executed switch as a win or loss by unit cost, with
   the honest annual dollar impact alongside). */
.savings-card { padding: var(--space-4); }
.savings-card + .savings-card { margin-top: var(--space-3); }
.savings-card-title {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.savings-empty {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.55;
  margin: var(--space-2) 0 var(--space-3);
}
.savings-note {
  font-size: var(--text-xs);
  color: var(--ink-3);
  line-height: 1.5;
  margin-top: var(--space-2);
}

/* Unit-cost scoreboard rows */
.uc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  appearance: none;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-light);
  padding: 10px 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: inherit;
}
.uc-row:last-of-type { border-bottom: none; }
.uc-row--empty { cursor: default; }
.uc-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.uc-row-name { font-size: var(--text-sm); font-weight: 600; }
.uc-row-src { font-size: var(--text-xs); color: var(--ink-3); }
.uc-row-figure { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: 0 0 auto; }
.uc-row-value {
  font-size: var(--text-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.uc-trend { font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.uc-trend--down { color: var(--good-ink); }
.uc-trend--up { color: var(--red); }
.uc-row-scan { flex: 0 0 auto; font-size: var(--text-xs); padding: 6px 12px; }

/* Wins ledger rows */
.ledger-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: var(--space-2);
}
.ledger-total { font-size: var(--text-xs); color: var(--text-muted); }
.ledger-total b { color: var(--ink-1); font-variant-numeric: tabular-nums; }
.ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  appearance: none;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-light);
  padding: 10px 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: inherit;
}
.ledger-row:last-of-type { border-bottom: none; }
.ledger-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ledger-top { display: flex; align-items: center; gap: 8px; }
.ledger-name { font-size: var(--text-sm); font-weight: 600; }
.ledger-sub { font-size: var(--text-xs); color: var(--text-muted); }
.ledger-sub--tier { color: var(--ink-3); }
.ledger-unit { font-variant-numeric: tabular-nums; }
.ledger-amount {
  flex: 0 0 auto;
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--good-ink);
}
.ledger-amount--neg { color: var(--red); }

/* Receipt sheets (unit-cost and switch workings) */
.receipt-sheet { padding: 4px 4px 8px; }
.receipt-figure {
  font-size: var(--text-2xl);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin: 6px 0 12px;
}
.receipt-verdict { margin: 6px 0 12px; }
.receipt-calc {
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: var(--space-2);
  line-height: 1.5;
}
.receipt-history { margin-top: var(--space-3); }
