@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/*
  Palette rationale (dark-first, money-psychology driven):
  - Near-black base: reads premium, matches the dark-first defaults of the
    fintech apps people already keep open longest (Cash App, Robinhood,
    Coinbase), and is easier on the eyes for repeat visits.
  - Money-green as the primary accent: the strongest, most universal
    association with growth/profit/"good news" — used for the hero tax
    number and every primary CTA so opening the app is a small positive hit.
  - Gold stays the "set aside" motif (treasure/value being protected).
  - Coral is reserved strictly for alerts/limits so urgency never bleeds
    into the rest of the app.
  - Violet is the one purely-decorative accent (active tab, focus rings,
    the gate screen) — reads as modern/premium and avoids generic "bank blue".
*/
:root {
  --bg: #0A0E17;
  --surface: #121826;
  --surface-2: #1A2233;
  --surface-3: #222C42;
  --border: #212A3D;
  --border-soft: #1A2233;

  --text: #F3F6FC;
  --text-secondary: #96A2BC;
  --text-muted: #5D6786;

  --green: #33E28C;
  --green-dim: #1F9E63;
  --green-glow: rgba(51, 226, 140, 0.28);

  --gold: #FFC24B;
  --gold-dim: #B87F1C;
  --gold-glow: rgba(255, 194, 75, 0.22);

  --violet: #8C7BFF;
  --violet-dim: #6456CC;

  --coral: #FF5C72;
  --coral-dim: #C23F53;
  --coral-glow: rgba(255, 92, 114, 0.22);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app {
  display: flex;
  min-height: 100vh;
}

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

@keyframes fadeScaleIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes growBar {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-14px) rotate(-4deg); }
}

@keyframes orbDrift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -16px); }
}

/* ---------- Profile gate — 3D depth scene ---------- */
.gate {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  overflow: hidden;
}

.gate-scene {
  position: relative;
  width: 100%;
  max-width: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
}

.gate-orb {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  pointer-events: none;
  animation: orbDrift 9s ease-in-out infinite;
  will-change: transform;
}

.gate-orb-violet {
  background: var(--violet);
  top: -140px;
  left: -160px;
}

.gate-orb-green {
  background: var(--green);
  bottom: -160px;
  right: -150px;
  animation-delay: -4.5s;
}

.gate-float-card {
  position: absolute;
  top: -46px;
  right: -18px;
  z-index: 1;
  animation: floatCard 6s ease-in-out infinite;
  will-change: transform;
  transition: transform 0.15s var(--ease);
}

.mini-receipt {
  background: var(--surface-2);
  border: 1.5px dashed rgba(51, 226, 140, 0.5);
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
  font-family: 'IBM Plex Mono', monospace;
  text-align: center;
}

.mini-receipt-label {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

.mini-receipt-amount {
  font-size: 22px;
  font-weight: 600;
  color: var(--green);
  margin-top: 2px;
  text-shadow: 0 0 20px var(--green-glow);
}

.mini-receipt-due {
  font-size: 10px;
  color: var(--gold);
  margin-top: 2px;
}

.gate-card {
  position: relative;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 26px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.02);
  animation: fadeScaleIn 0.5s var(--ease);
  transform-style: preserve-3d;
  transition: transform 0.12s var(--ease);
}

.gate-card h1 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 30px;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.01em;
}

.gate-card .tag {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 18px;
  display: block;
}

.gate-note {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.55;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 11px 13px;
  margin-top: 18px;
  margin-bottom: 0;
}

.required-mark {
  color: var(--violet);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.gate-email-note {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 6px 0 0;
}

.gate-trust-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 14px;
}

.gate-error {
  background: linear-gradient(135deg, rgba(255, 92, 114, 0.16), rgba(255, 92, 114, 0.05));
  border-left: 3px solid var(--coral);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--text);
  margin-top: 16px;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand { padding: 0 8px 20px; }

.sidebar-brand h1 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 24px;
  margin: 0;
  letter-spacing: -0.01em;
  background: linear-gradient(120deg, var(--text) 40%, var(--green) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-brand .tag {
  font-size: 11px;
  color: var(--text-secondary);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-widgets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

.sidebar-widget {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 13px 14px;
}

.sidebar-widget .widget-label {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.sidebar-widget .widget-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.sidebar-widget.deadline .widget-value { color: var(--gold); }
.sidebar-widget.streak .widget-value { color: var(--green); }

.sidebar-widget.streak-risk {
  background: linear-gradient(135deg, rgba(255, 92, 114, 0.14), rgba(255, 92, 114, 0.04));
  box-shadow: 0 0 0 1px rgba(255, 92, 114, 0.3);
}
.sidebar-widget.streak-risk .widget-value { color: var(--coral); }
.sidebar-widget.streak-risk .widget-sub { color: var(--text); }

.sidebar-widget .widget-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 11px 12px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.nav-link:hover:not(.active) { color: var(--text); background: var(--surface-2); }

.nav-link.active {
  background: linear-gradient(135deg, var(--violet), var(--violet-dim));
  color: #fff;
  box-shadow: 0 4px 16px rgba(140, 123, 255, 0.3);
}

.sidebar-footer {
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
  margin-top: auto; /* pins to the bottom of the sidebar regardless of how many widgets render above it, instead of just trailing whatever content happens to be there */
}

.sidebar-upgrade-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(135deg, rgba(255, 194, 75, 0.14), rgba(255, 194, 75, 0.04));
  border: 1px solid rgba(255, 194, 75, 0.35);
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.sidebar-upgrade-btn:hover {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(255, 194, 75, 0.22), rgba(255, 194, 75, 0.06));
}

.sidebar-upgrade-btn .nav-icon { width: 16px; height: 16px; flex-shrink: 0; }

.upgrade-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 14, 0.72);
  backdrop-filter: blur(3px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.upgrade-modal-overlay.visible { display: flex; }

.upgrade-modal {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  max-width: 420px;
  width: 100%;
  animation: fadeSlideUp 0.25s var(--ease);
}

.upgrade-modal h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--text);
}

.upgrade-modal-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 4px;
  line-height: 1.5;
}

.upgrade-modal .upgrade-options { flex-direction: column; }
.upgrade-modal .upgrade-pill { width: 100%; text-align: center; padding: 12px; font-size: 13px; }

.upgrade-modal-note {
  font-size: 11.5px;
  color: var(--text-tertiary, var(--text-secondary));
  margin: 14px 0 0;
  line-height: 1.5;
}

.upgrade-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

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

.profile-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 0 8px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--violet);
  text-decoration: underline;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  padding: 0;
}

.sidebar-overlay {
  display: none;
}

.mobile-menu-btn {
  display: none;
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: 28px 24px 90px;
}

.main-content > * {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.legal-banner {
  background: var(--surface);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.legal-banner strong { color: var(--gold); font-weight: 600; }

.storage-error-banner {
  background: linear-gradient(135deg, rgba(255, 92, 114, 0.16), rgba(255, 92, 114, 0.05));
  border-left: 3px solid var(--coral);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 16px;
}

.storage-error-banner strong { color: var(--coral); }
.storage-error-banner .link-btn { margin-left: 8px; color: var(--text); }

.panel { display: none; }
.panel.active { display: block; animation: fadeSlideUp 0.32s var(--ease); }

/* ---------- Responsive sidebar → mobile drawer ---------- */
@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  }

  .sidebar.open { transform: translateX(0); }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
    z-index: 55;
  }

  .sidebar-overlay.visible { opacity: 1; pointer-events: auto; }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 45;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
  }

  .mobile-menu-btn svg { width: 20px; height: 20px; }

  .main-content { padding: 82px 18px 90px; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset;
  transition: box-shadow 0.2s var(--ease);
}

.card h2 {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--text);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-header-row h2 { margin: 0; }

label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  margin-top: 14px;
}

label:first-of-type { margin-top: 0; }

input[type="number"], input[type="text"], input[type="email"], select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  background: var(--surface-2);
  color: var(--text);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

input[type="number"]::placeholder, input[type="text"]::placeholder, input[type="email"]::placeholder { color: var(--text-muted); }

input[type="number"]:focus, input[type="text"]:focus, input[type="email"]:focus, select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

select { font-family: 'Inter', sans-serif; }

.filing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---------- Buttons ---------- */
button.primary {
  margin-top: 18px;
  width: 100%;
  background: linear-gradient(135deg, var(--green), var(--green-dim));
  color: #06180F;
  border: none;
  padding: 14px;
  border-radius: 11px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--green-glow);
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}

button.primary:hover { box-shadow: 0 10px 28px rgba(51, 226, 140, 0.4); transform: translateY(-1px); }
button.primary:active { transform: translateY(0) scale(0.99); }

button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 9px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

button.secondary:hover { border-color: var(--violet); background: var(--surface-2); }

button.secondary.danger { color: var(--coral); border-color: rgba(255, 92, 114, 0.4); }
button.secondary.danger:hover { border-color: var(--coral); background: rgba(255, 92, 114, 0.08); }

.chip-btn {
  background: var(--surface-3);
  border: none;
  color: var(--text);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}

.chip-btn:hover { background: var(--violet); transform: translateY(-1px); }
.chip-btn.active { background: var(--violet); }

/* ---------- Receipt card — signature element ---------- */
.receipt {
  margin-top: 20px;
  border: 1.5px dashed rgba(51, 226, 140, 0.45);
  border-radius: 14px;
  padding: 20px 18px;
  background: radial-gradient(circle at 50% 0%, rgba(51, 226, 140, 0.08), transparent 60%), var(--surface-2);
  font-family: 'IBM Plex Mono', monospace;
  animation: fadeSlideUp 0.35s var(--ease);
}

.receipt .hero {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 14px;
}

.receipt .hero .label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

.receipt .hero .amount {
  font-size: 38px;
  font-weight: 600;
  color: var(--green);
  margin-top: 6px;
  text-shadow: 0 0 24px var(--green-glow);
}

.receipt .line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  color: var(--text);
}

.receipt .line.subtle { color: var(--text-secondary); }
.receipt .line.total-line { color: var(--text); font-weight: 600; padding-top: 2px; }

.receipt .divider {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 10px 0;
}

.quarters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.quarter-box {
  background: var(--surface);
  border-radius: 10px;
  padding: 11px 12px;
  font-family: 'IBM Plex Mono', monospace;
}

.quarter-box .q-label {
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.quarter-box .q-amount {
  font-size: 17px;
  font-weight: 600;
  color: var(--gold);
}

.quarter-box .q-due {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ---------- Income log toolbar ---------- */
.log-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.log-toolbar-year {
  flex: 1;
  min-width: 140px;
}

.log-toolbar-year label {
  margin: 0 0 6px;
}

.log-toolbar-year select { padding: 9px 12px; font-size: 14px; }

.log-status {
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
  padding-bottom: 11px;
}

.trial-badge {
  background: linear-gradient(135deg, rgba(140, 123, 255, 0.18), rgba(140, 123, 255, 0.06));
  border: 1px solid rgba(140, 123, 255, 0.4);
  color: var(--violet);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
}

/* ---------- Tax Vault ---------- */
.vault-card {
  background: radial-gradient(circle at 15% 0%, rgba(255, 194, 75, 0.08), transparent 55%), var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 0 0 1px rgba(255, 194, 75, 0.14);
}

.vault-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.vault-icon {
  width: 26px;
  height: 26px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.vault-label {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.vault-sublabel {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.vault-balance {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 40px;
  font-weight: 600;
  color: var(--gold);
  text-shadow: 0 0 24px var(--gold-glow);
  line-height: 1;
  margin-bottom: 6px;
}

.vault-progress {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border);
}

.vault-alert {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

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

.vault-alert.coral {
  background: linear-gradient(135deg, rgba(255, 92, 114, 0.14), rgba(255, 92, 114, 0.04));
  box-shadow: 0 0 0 1px rgba(255, 92, 114, 0.28);
}

.vault-alert.coral strong { color: var(--coral); }

.vault-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vault-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  background: var(--surface-2);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.vault-row:hover { background: var(--surface-3); }

.vault-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.vault-row-main {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
}

.vault-row-label { color: var(--text-secondary); }
.vault-row-amount { color: var(--text); font-weight: 600; }

.vault-row-status {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 68px;
  text-align: right;
}

.vault-row.secured {
  background: var(--positive-soft, rgba(51, 226, 140, 0.08));
}

.vault-row.secured .vault-row-status { color: var(--green); }
.vault-row.secured .vault-row-label,
.vault-row.secured .vault-row-amount { color: var(--text-secondary); text-decoration: line-through; text-decoration-color: var(--border); }

/* Below ~380px even the shortened label can wrap; stack instead of letting
   a wrapped label collide with the amount next to it. */
@media (max-width: 400px) {
  .vault-row { align-items: flex-start; flex-wrap: wrap; }
  .vault-row-main { flex-direction: column; align-items: flex-start; gap: 2px; flex-basis: 100%; order: 1; margin-top: 2px; }
  .vault-row-status { order: 2; margin-left: 30px; }
}

/* ---------- Income log ---------- */
.platform-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  animation: fadeSlideUp 0.25s var(--ease);
}

.platform-picker[hidden] { display: none; }

.platform-option {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  text-align: left;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.15s var(--ease);
}

.platform-option:hover { border-color: var(--violet); background: var(--surface-3); transform: translateY(-1px); }

.income-source {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
  animation: fadeSlideUp 0.25s var(--ease);
}

.income-source:last-child { border-bottom: none; padding-bottom: 4px; }
.income-source:first-child { padding-top: 4px; }

.income-source-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.income-source-header .name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.income-source-header .total {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--green);
  font-weight: 600;
}

.remove-btn {
  background: none;
  border: none;
  color: var(--coral);
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  opacity: 0.75;
  transition: opacity 0.2s var(--ease);
}

.remove-btn:hover { opacity: 1; }

.months-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.month-input-wrap label {
  margin: 0 0 4px;
  font-size: 10px;
  color: var(--text-muted);
}

.month-input { background: var(--surface-2); }

.ytd-card .hero .amount { color: var(--green); }

.ytd-summary {
  font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 4px;
}

.ytd-summary .line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  color: var(--text-secondary);
}

.ytd-summary .line.total-line {
  color: var(--text);
  font-weight: 600;
  padding-top: 6px;
  margin-top: 2px;
  border-top: 1px dashed var(--border);
}

.limit-banner {
  background: linear-gradient(135deg, rgba(255, 194, 75, 0.12), rgba(255, 194, 75, 0.04));
  border: 1px solid rgba(255, 194, 75, 0.4);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-secondary);
  animation: fadeSlideUp 0.25s var(--ease);
}

.limit-banner strong { color: var(--gold); display: block; margin-bottom: 4px; font-family: 'Fraunces', serif; font-size: 15px; }

.upgrade-options {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.upgrade-pill {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color 0.2s var(--ease);
}

.upgrade-pill:hover { border-color: var(--violet); }

.upgrade-pill.gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #241A02;
  font-weight: 700;
  border: none;
}

.disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 24px;
  line-height: 1.6;
}

.empty-state {
  text-align: center;
  padding: 26px 10px;
  color: var(--text-secondary);
  font-size: 14px;
}

.add-expense-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.add-expense-row input { flex: 1; }
.add-expense-row button { flex-shrink: 0; }

.hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin: -4px 0 12px;
  line-height: 1.5;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  margin-top: 16px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--green);
}

.safe-harbor-inputs {
  margin-top: 10px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 10px;
  animation: fadeSlideUp 0.25s var(--ease);
}

.safe-harbor-note {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.data-controls {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.reminders-upcoming-list {
  margin-top: 18px;
}

.reminder-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  color: var(--text);
}

.reminder-row .due {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--text-secondary);
}

.reminder-row .remind-date {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--gold);
  font-weight: 600;
}

.saved-tick {
  font-size: 12px;
  color: var(--green);
  margin-top: 10px;
}

/* ---------- Insights (the paid-upgrade hook) ---------- */
.insights {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--border);
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.stat-box {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 13px 14px;
}

.stat-box .stat-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  color: var(--gold);
}

.stat-box .stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.trend-chart {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 4px;
  height: 90px;
  margin-bottom: 6px;
}

.trend-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.trend-bar {
  width: 100%;
  max-width: 18px;
  background: linear-gradient(180deg, var(--green), var(--green-dim));
  border-radius: 4px 4px 2px 2px;
  transform-origin: bottom;
  animation: growBar 0.5s var(--ease);
  min-height: 3px;
}

.trend-bar.empty { background: var(--surface-3); }

.trend-labels {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  margin-bottom: 14px;
}

.trend-labels span {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
}

.upsell-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(135deg, rgba(140, 123, 255, 0.14), rgba(140, 123, 255, 0.04));
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.upsell-teaser strong { color: var(--violet); }

@media (max-width: 420px) {
  .quarters { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
   LANDING PAGE — public marketing page
   ===================================================================== */
.landing {
  position: relative;
  background: var(--bg);
  overflow-x: hidden;
  min-height: 100vh;
}

.landing-bg-orb {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

.landing-orb-violet { background: var(--violet); top: -120px; left: -160px; }
.landing-orb-green { background: var(--green); top: 420px; right: -200px; }

.landing-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 24px;
}

.landing-logo {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  background: linear-gradient(120deg, var(--text) 40%, var(--green) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.chip-btn-lg { padding: 10px 18px; font-size: 13px; }

.nav-signin-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-signin-btn:hover { border-color: var(--violet); background: var(--surface-2); }

.gate-disclaimer-label {
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.gate-disclaimer-label input[type="checkbox"] { margin-top: 2px; }

.landing-hero {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 90px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}

.landing-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--violet);
  background: rgba(140, 123, 255, 0.12);
  border-radius: 999px;
  padding: 6px 13px;
  margin-bottom: 18px;
}

.landing-hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 46px;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
  color: var(--text);
}

.text-green { color: var(--green); }

.landing-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 28px;
  max-width: 480px;
}

.landing-cta-row {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.landing-cta {
  width: auto;
  margin-top: 0;
  padding: 14px 26px;
}

.secondary-link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.secondary-link:hover { color: var(--text); border-color: var(--text-secondary); }

.landing-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.landing-trust-row strong { color: var(--text-secondary); font-weight: 700; }
.landing-sub strong { color: var(--text); }

.landing-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-scene {
  position: relative;
  width: 100%;
  max-width: 340px;
}

.hero-receipt {
  background: radial-gradient(circle at 50% 0%, rgba(51, 226, 140, 0.1), transparent 60%), var(--surface);
  border: 1.5px dashed rgba(51, 226, 140, 0.45);
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  font-family: 'IBM Plex Mono', monospace;
  animation: floatCard 7s ease-in-out infinite;
  animation-name: floatCardStraight;
}

@keyframes floatCardStraight {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-receipt-hero { text-align: center; padding-bottom: 14px; border-bottom: 1px dashed var(--border); margin-bottom: 12px; }

.hero-receipt-label {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

.hero-receipt-amount {
  font-size: 30px;
  font-weight: 600;
  color: var(--green);
  margin-top: 4px;
  text-shadow: 0 0 20px var(--green-glow);
}

.hero-receipt-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 0;
}

.hero-receipt-line.highlight {
  color: var(--gold);
  font-weight: 600;
  gap: 8px;
  justify-content: flex-start;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px dashed var(--border);
}

.inline-icon { width: 14px; height: 14px; flex-shrink: 0; }

.hero-chip {
  position: absolute;
  top: -22px;
  right: -20px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #241A02;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 999px;
  box-shadow: 0 12px 30px var(--gold-glow);
  animation: floatCard 6s ease-in-out infinite;
  animation-delay: -2s;
}

.hero-chip .inline-icon { width: 15px; height: 15px; }

.landing-section {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 70px 24px;
  text-align: center;
}

.landing-section h2 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 32px;
  margin: 0 0 12px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.landing-section-sub {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0 auto 44px;
  max-width: 480px;
}

.landing-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
}

.landing-step {
  background: var(--surface);
  border-radius: 16px;
  padding: 26px 22px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--violet-dim));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 16px;
}

.landing-step h3 {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--text);
}

.landing-step p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  text-align: left;
}

.feature-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px 20px;
  transition: transform 0.2s var(--ease);
}

.feature-card:hover { transform: translateY(-3px); }

.feature-icon {
  width: 26px;
  height: 26px;
  color: var(--green);
  margin-bottom: 14px;
}

.feature-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 15.5px;
  margin: 0 0 8px;
  color: var(--text);
}

.feature-card p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: left;
}

.pricing-card {
  position: relative;
  background: var(--surface);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s var(--ease);
}

.pricing-card:hover { transform: translateY(-3px); }

.pricing-card.featured {
  background: linear-gradient(160deg, rgba(255, 194, 75, 0.12), var(--surface) 60%);
  box-shadow: 0 0 0 1.5px var(--gold), 0 20px 50px var(--gold-glow);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  right: 18px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #241A02;
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
}

.pricing-name {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 6px;
}

.pricing-price {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.pricing-price span { font-size: 13px; color: var(--text-secondary); font-weight: 400; }

.pricing-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 16px;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  flex: 1;
}

.pricing-features li {
  font-size: 12.5px;
  color: var(--text-secondary);
  padding: 5px 0 5px 20px;
  position: relative;
}

.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--green);
}

.pricing-btn { width: 100%; text-align: center; margin-top: 0; }

.pricing-note {
  margin-top: 28px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Migration / CPA-waitlist sections ---------- */
.migration-section, .cpa-section { padding-top: 0; padding-bottom: 0; }

.migration-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--surface);
  border-radius: 16px;
  padding: 28px;
  text-align: left;
  max-width: 680px;
  margin: 0 auto;
}

.migration-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--violet);
}

.migration-icon svg { width: 22px; height: 22px; }
.migration-icon.gold { color: var(--gold); }

.migration-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  margin: 0 0 10px;
  color: var(--text);
}

.migration-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 10px;
}

.migration-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}

.cpa-waitlist-form {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.cpa-waitlist-form input {
  flex: 1;
  min-width: 180px;
}

.cpa-waitlist-form button { flex-shrink: 0; }

@media (max-width: 560px) {
  .migration-card { flex-direction: column; }
}

/* ---------- Stakes section ---------- */
.stakes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  text-align: left;
  margin-bottom: 24px;
}

.stakes-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: 0 0 0 1px rgba(255, 92, 114, 0.14);
}

.stakes-figure {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 30px;
  font-weight: 600;
  color: var(--coral);
  margin-bottom: 8px;
}

.stakes-card p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.stakes-card p strong { color: var(--text); }

.stakes-callout {
  max-width: 680px;
  margin: 0 auto;
  background: var(--surface-2);
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  text-align: left;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.stakes-callout strong { color: var(--gold); }

sup { font-size: 9px; color: var(--text-muted); }

/* ---------- Comparison table ---------- */
.compare-table-wrap {
  overflow-x: auto;
  margin: 8px 0 20px;
  border-radius: 14px;
  background: var(--surface);
}

table.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 13px;
  text-align: left;
}

table.compare-table th, table.compare-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-secondary);
}

table.compare-table thead th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--rule-strong, var(--border));
}

table.compare-table td.ts-cell, table.compare-table th:nth-child(2) {
  background: var(--green-glow);
}

table.compare-table td:first-child { color: var(--text); font-weight: 500; }

table.compare-table .mono { font-family: 'IBM Plex Mono', monospace; }

table.compare-table .yes { color: var(--green); font-weight: 600; }
table.compare-table .yes-bad { color: var(--coral); font-weight: 600; }
table.compare-table .no { color: var(--text-muted); }

.landing-citations {
  margin-top: 14px;
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.8;
}

@media (max-width: 900px) {
  .stakes-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .stakes-grid { grid-template-columns: 1fr; }
}

.landing-final-cta {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  text-align: center;
}

.landing-final-cta h2 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 30px;
  margin: 0 0 26px;
  color: var(--text);
}

.landing-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px 24px 40px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.gate-back {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 0 14px;
  display: block;
  transition: color 0.2s var(--ease);
}

.gate-back:hover { color: var(--text); }

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .landing-hero { grid-template-columns: 1fr; padding-top: 30px; }
  .landing-hero-visual { order: -1; margin-bottom: 10px; }
  .landing-steps { grid-template-columns: 1fr; }
  .landing-features { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .landing-hero h1 { font-size: 32px; }
  .landing-features { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .landing-nav-actions { gap: 10px; }
}
