/* ============================================================
   XOOLAR — design system
   Clean, trustworthy fintech · deep-navy anchor · blue/violet AI accents
   Type: Manrope (UI/body) + Sora (display & data)
   Icons: Material Symbols Rounded
   ============================================================ */

:root {
  /* — surfaces — */
  --bg:        #eef1f7;
  --surface:   #ffffff;
  --surface-2: #f4f6fb;
  --surface-3: #eceff6;

  /* — ink (deep navy family) — */
  --navy:      #0b1020;   /* hero / immersive dark */
  --navy-2:    #10162b;
  --navy-3:    #1a2240;
  --ink:       #141a2e;   /* primary text */
  --muted:     #5a6178;   /* secondary text */
  --faint:     #8b91a6;   /* tertiary text */
  --line:      #e4e7f0;   /* hairlines */
  --line-2:    #d4d9e6;

  /* — accents (harmonised) — */
  --primary:    #2f6bff;  /* actions / AI / brand */
  --primary-d:  #1f54e0;
  --primary-2:  #4d82ff;
  --sky:        #38bdf8;  /* AI glow */
  --violet:     #8b5cf6;  /* premium / secondary */
  --eco:        #12b886;  /* savings / impact / positive */
  --eco-d:      #0e9a72;
  --solar:      #f5a524;  /* energy production / sun */
  --danger:     #e5484d;

  /* tint backgrounds */
  --primary-tint: #eef3ff;
  --eco-tint:     #e7f8f1;
  --violet-tint:  #f3effe;
  --solar-tint:   #fef4e2;

  /* — radii — */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* — shadow — */
  --sh-sm: 0 1px 2px rgba(16,22,43,.06), 0 1px 3px rgba(16,22,43,.04);
  --sh-md: 0 2px 8px rgba(16,22,43,.06), 0 8px 24px rgba(16,22,43,.06);
  --sh-lg: 0 6px 18px rgba(16,22,43,.08), 0 24px 56px rgba(16,22,43,.12);
  --sh-primary: 0 8px 22px rgba(47,107,255,.30);

  --ease: cubic-bezier(.22,.61,.36,1);
  --font-display: 'Sora', system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--ink);
  background: #c9cedd;
}

/* ---- typography helpers ---- */
.font-display { font-family: var(--font-display); }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

h1,h2,h3,h4 { margin: 0; font-weight: 700; letter-spacing: -.02em; }

.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
}

/* ---- material symbols ---- */
.ms {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal;
  line-height: 1; letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; word-wrap: normal;
  direction: ltr; -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
  overflow: hidden;
  vertical-align: middle;
  transition: opacity 0.1s ease;
}
html:not(.icons-ready) .ms {
  opacity: 0;
  width: 1em;
  min-width: 1em;
  max-width: 1em;
}
html.icons-ready .ms {
  opacity: 1;
  width: auto;
  max-width: none;
}
.ms.fill { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }

/* ---- app scroll area ---- */
.scrollarea { height: 100%; overflow-y: auto; overflow-x: hidden; }
.scrollarea::-webkit-scrollbar { width: 0; height: 0; }

/* hide number input spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 16px;
  border: none; cursor: pointer; border-radius: var(--r-pill);
  padding: 0 22px; height: 52px; transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s;
  white-space: nowrap; letter-spacing: -.01em;
}
.btn:active { transform: scale(.975); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--sh-primary); }
.btn-primary:hover { background: var(--primary-d); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-block { display: flex; width: 100%; }
.btn-lg { height: 56px; font-size: 17px; }

/* ---- cards ---- */
.card {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); border: 1px solid var(--line);
}

/* ---- chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 13px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; background: var(--surface-2);
  color: var(--muted); border: 1px solid transparent; cursor: pointer;
  transition: all .15s var(--ease);
}
.chip.active { background: var(--primary); color: #fff; }

/* ---- generic image placeholder ---- */
.ph {
  position: relative; overflow: hidden; background: var(--surface-2);
  background-image: repeating-linear-gradient(135deg,
     rgba(47,107,255,.05) 0 10px, rgba(47,107,255,0) 10px 20px);
  display: flex; align-items: center; justify-content: center;
  color: var(--faint);
}
.ph .ph-label {
  font-family: 'Sora', monospace; font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; text-align: center;
  padding: 4px 8px; border-radius: 6px; background: rgba(255,255,255,.7);
  border: 1px dashed var(--line-2); color: var(--muted);
}

/* ---- transitions for screen stack ---- */
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes slideBack { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideUpSheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes pulseGlow { 0%,100% { opacity:.5; } 50% { opacity:1; } }
@keyframes teslaLivePulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.55; transform:scale(.85); } }
@keyframes teslaPinRipple { 0% { transform:scale(.55); opacity:.65; } 100% { transform:scale(2.4); opacity:0; } }
@keyframes teslaPinRippleWarn { 0% { transform:scale(.55); opacity:.5; } 100% { transform:scale(2.2); opacity:0; } }
@keyframes teslaPinBreathe { 0%,100% { box-shadow:0 0 14px rgba(61,214,140,.4), 0 4px 12px rgba(0,0,0,.45); } 50% { box-shadow:0 0 26px rgba(61,214,140,.65), 0 4px 16px rgba(0,0,0,.5); } }

.screen-anim-fwd  { animation: slideIn .34s var(--ease); }
.screen-anim-back { animation: slideBack .34s var(--ease); }
.screen-anim-fade { animation: fadeUp .34s var(--ease); }

.stagger > * { animation: fadeUp .45s var(--ease) backwards; }
.stagger > *:nth-child(1){animation-delay:.03s}
.stagger > *:nth-child(2){animation-delay:.08s}
.stagger > *:nth-child(3){animation-delay:.13s}
.stagger > *:nth-child(4){animation-delay:.18s}
.stagger > *:nth-child(5){animation-delay:.23s}
.stagger > *:nth-child(6){animation-delay:.28s}
.stagger > *:nth-child(7){animation-delay:.33s}
.stagger > *:nth-child(8){animation-delay:.38s}

/* utility */
.xrange { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px;
  background: var(--line-2); outline: none; }
.xrange::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px;
  border-radius: 50%; background: var(--primary); cursor: pointer; border: 4px solid #fff;
  box-shadow: var(--sh-md); }
.xrange::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--primary);
  cursor: pointer; border: 4px solid #fff; box-shadow: var(--sh-md); }

.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap4{gap:4px}.gap6{gap:6px}.gap8{gap:8px}.gap10{gap:10px}.gap12{gap:12px}.gap14{gap:14px}.gap16{gap:16px}.gap20{gap:20px}.gap22{gap:22px}.gap24{gap:24px}.gap32{gap:32px}
.grow{flex:1}
.center{align-items:center;justify-content:center}
.between{justify-content:space-between}
