/* ==========================================================================
   SMART MONEY SCAN – UI REFRESH
   Clean indigo fintech look (light default + matching dark).
   Scoped to [data-theme="smartmoney"] so the other palettes still work.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
[data-theme="smartmoney"][data-appearance="light"],
[data-theme="smartmoney"].light {
  --background: #F5F6FB;
  --foreground: #14162B;
  --card: #FFFFFF;
  --card-foreground: #14162B;
  --primary: #4F46E5;
  --primary-foreground: #FFFFFF;
  --secondary: #EEF0F8;
  --secondary-foreground: #14162B;
  --muted: #EEF0F8;
  --muted-foreground: #667085;
  --border: #E4E7F2;
  --accent: #4F46E5;
  --bullish: #059669;
  --bearish: #DC2626;
  --success: #059669;
  --danger: #DC2626;
  --pro-gold: #D97706;
  --sms-shadow: 0 1px 2px rgba(20, 22, 43, .04), 0 4px 16px rgba(79, 70, 229, .06);
  --sms-shadow-hover: 0 2px 4px rgba(20, 22, 43, .06), 0 10px 28px rgba(79, 70, 229, .12);
  --sms-ring: rgba(79, 70, 229, .22);
}

[data-theme="smartmoney"][data-appearance="dark"],
[data-theme="smartmoney"].dark {
  --background: #0F1020;
  --foreground: #EEF0FF;
  --card: #171933;
  --card-foreground: #EEF0FF;
  --primary: #818CF8;
  --primary-foreground: #0F1020;
  --secondary: #1E2142;
  --secondary-foreground: #EEF0FF;
  --muted: #1E2142;
  --muted-foreground: #9AA0C3;
  --border: #272B52;
  --accent: #818CF8;
  --bullish: #34D399;
  --bearish: #F87171;
  --success: #34D399;
  --danger: #F87171;
  --pro-gold: #FBBF24;
  --sms-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 4px 16px rgba(0, 0, 0, .25);
  --sms-shadow-hover: 0 2px 4px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .4);
  --sms-ring: rgba(129, 140, 248, .3);
}

/* ---------- 2. Base ---------- */
html[data-theme="smartmoney"] body {
  background: var(--background) !important;
  background-image: none !important;
  font-size: 14px;
  line-height: 1.5;
}
html[data-theme="smartmoney"] .kt-brand-title {
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}
html[data-theme="smartmoney"] ::selection { background: var(--sms-ring); }
html[data-theme="smartmoney"] ::-webkit-scrollbar-track { background: transparent; }
html[data-theme="smartmoney"] ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
html[data-theme="smartmoney"] :focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ---------- 3. Header ---------- */
html[data-theme="smartmoney"] header {
  background: color-mix(in srgb, var(--card) 92%, transparent) !important;
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 1px 0 var(--border), 0 8px 24px rgba(79, 70, 229, .04);
  position: relative;
  z-index: 40;
}
html[data-theme="smartmoney"] .sms-logo { filter: drop-shadow(0 4px 10px rgba(79, 70, 229, .35)); }
html[data-theme="smartmoney"] .kt-logo-wrapper:hover .sms-logo { transform: rotate(-4deg) scale(1.05); }
html[data-theme="smartmoney"] .sms-logo { transition: transform .2s ease; }

/* header "PRO" chip */
html[data-theme="smartmoney"] .kt-logo-wrapper span.font-mono {
  background: linear-gradient(135deg, #6366F1, #4338CA) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 999px;
  padding: 2px 8px;
  letter-spacing: .08em;
}

/* Search */
html[data-theme="smartmoney"] #globalStockSearch {
  border-radius: 12px !important;
  background: var(--secondary) !important;
  border: 1px solid transparent !important;
  height: 38px;
  transition: all .15s ease;
}
html[data-theme="smartmoney"] #globalStockSearch:hover { border-color: var(--border) !important; }
html[data-theme="smartmoney"] #globalStockSearch:focus {
  background: var(--card) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px var(--sms-ring) !important;
}

/* Header buttons: soft, rounded */
html[data-theme="smartmoney"] header button {
  border-radius: 10px;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
html[data-theme="smartmoney"] header button:active { transform: scale(.97); }
html[data-theme="smartmoney"] #btnHeaderUpgrade {
  background: linear-gradient(135deg, #F59E0B, #F97316) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, .35) !important;
}
html[data-theme="smartmoney"] #btnTriggerScan {
  background: linear-gradient(135deg, #6366F1, #4F46E5) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, .35) !important;
}
html[data-theme="smartmoney"] #btnTriggerScan:hover { filter: brightness(1.07); }

/* Sub-rows of the header (regime bar & indices strip) */
html[data-theme="smartmoney"] header > div + div { border-top-color: var(--border) !important; }
html[data-theme="smartmoney"] #marketRegimeBanner {
  border-radius: 999px !important;
  padding: 4px 12px !important;
  box-shadow: none !important;
}
html[data-theme="smartmoney"] .quick-stock-btn {
  border-radius: 999px !important;
  padding: 3px 10px !important;
  background: var(--card) !important;
  transition: all .15s ease;
}
html[data-theme="smartmoney"] .quick-stock-btn:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: var(--secondary) !important;
}
html[data-theme="smartmoney"] #chipNifty50,
html[data-theme="smartmoney"] #chipBankNifty,
html[data-theme="smartmoney"] [id^="chip"] {
  border-radius: 10px !important;
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
}

/* ---------- 4. Navigation tabs (scrollable pill rail) ---------- */
html[data-theme="smartmoney"] .nav-tabs-rail {
  background: transparent !important;
  border-top: 1px solid var(--border) !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  gap: 6px !important;
  scrollbar-width: none;
}
html[data-theme="smartmoney"] .nav-tab {
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 999px;
  color: var(--muted-foreground);
  border: 1px solid transparent;
  background: transparent;
}
html[data-theme="smartmoney"] .nav-tab:hover {
  color: var(--foreground);
  background: var(--secondary) !important;
  border-color: transparent;
}
html[data-theme="smartmoney"] .nav-tab.active {
  color: #fff !important;
  background: linear-gradient(135deg, #6366F1, #4F46E5) !important;
  border: 1px solid transparent !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, .32) !important;
}

/* ---------- 5. Cards, KPI tiles, panels ---------- */
html[data-theme="smartmoney"] .stat-card {
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--sms-shadow);
  border: 1px solid var(--border) !important;
}
html[data-theme="smartmoney"] .stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary) !important;
  box-shadow: var(--sms-shadow-hover);
}
html[data-theme="smartmoney"] .stat-val {
  font-family: 'Inter', sans-serif !important;
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
}
html[data-theme="smartmoney"] .stat-card > div:first-child span:first-child {
  font-size: 10.5px;
  letter-spacing: .08em;
}

/* Generic rounded panels used across the tabs */
html[data-theme="smartmoney"] main .bg-card,
html[data-theme="smartmoney"] main [class*="bg-card"],
html[data-theme="smartmoney"] main .rounded-xl,
html[data-theme="smartmoney"] main .rounded-2xl {
  border-color: var(--border);
}
html[data-theme="smartmoney"] main .rounded-xl.border,
html[data-theme="smartmoney"] main .rounded-2xl.border,
html[data-theme="smartmoney"] main .rounded-lg.border.bg-card {
  border-radius: 16px;
  box-shadow: var(--sms-shadow);
}
html[data-theme="smartmoney"] .modal-content,
html[data-theme="smartmoney"] [id$="Modal"] > div {
  border-radius: 20px;
}

/* ---------- 6. Tables ---------- */
html[data-theme="smartmoney"] table { border-collapse: separate; border-spacing: 0; }
html[data-theme="smartmoney"] thead th {
  background: var(--secondary) !important;
  color: var(--muted-foreground) !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: .07em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border) !important;
  position: sticky;
  top: 0;
  z-index: 2;
}
html[data-theme="smartmoney"] tbody tr { transition: background .12s ease; }
html[data-theme="smartmoney"] tbody tr:hover { background: color-mix(in srgb, var(--primary) 6%, transparent) !important; }
html[data-theme="smartmoney"] tbody td { border-bottom: 1px solid var(--border) !important; padding-top: 10px; padding-bottom: 10px; }

/* ---------- 7. Inputs & buttons in content ---------- */
html[data-theme="smartmoney"] main select,
html[data-theme="smartmoney"] main input[type="text"],
html[data-theme="smartmoney"] main input[type="number"] {
  border-radius: 10px !important;
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  transition: border-color .15s, box-shadow .15s;
}
html[data-theme="smartmoney"] main select:focus,
html[data-theme="smartmoney"] main input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px var(--sms-ring) !important;
  outline: none;
}
html[data-theme="smartmoney"] main button { border-radius: 10px; }

/* ---------- 8. Readability fixes for light mode ----------
   Tailwind "-400" shades were tuned for dark backgrounds. */
html[data-theme="smartmoney"].light .text-emerald-400,
html[data-theme="smartmoney"].light .text-green-400 { color: #059669 !important; }
html[data-theme="smartmoney"].light .text-rose-400,
html[data-theme="smartmoney"].light .text-red-400 { color: #DC2626 !important; }
html[data-theme="smartmoney"].light .text-amber-400,
html[data-theme="smartmoney"].light .text-yellow-400 { color: #B45309 !important; }
html[data-theme="smartmoney"].light .text-blue-400,
html[data-theme="smartmoney"].light .text-cyan-400,
html[data-theme="smartmoney"].light .text-sky-400 { color: #4338CA !important; }
html[data-theme="smartmoney"].light .text-purple-400,
html[data-theme="smartmoney"].light .text-violet-400 { color: #6D28D9 !important; }
html[data-theme="smartmoney"].light .bg-cyan-950 { background: #EEF2FF !important; }
html[data-theme="smartmoney"].light .border-cyan-800 { border-color: #C7D2FE !important; }
html[data-theme="smartmoney"].light .text-white { color: var(--foreground); }
html[data-theme="smartmoney"].light header .text-white,
html[data-theme="smartmoney"].light .nav-tab.active,
html[data-theme="smartmoney"].light button.bg-primary,
html[data-theme="smartmoney"].light #btnHeaderUpgrade { color: #fff !important; }

/* ---------- 9. Hero "Market Pulse" strip ---------- */
.sms-hero { display: none; }
html[data-theme="smartmoney"] .sms-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 22px 26px;
  border-radius: 20px;
  background:
    radial-gradient(900px 260px at 0% 0%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%),
    var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--sms-shadow);
}
.sms-hero .sms-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--primary);
  display: inline-flex; align-items: center; gap: 8px;
}
.sms-hero .sms-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #10B981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .18);
  animation: smsPulse 2s ease-in-out infinite;
}
@keyframes smsPulse { 50% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); } }
.sms-hero h2 {
  margin: 8px 0 6px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--foreground);
}
.sms-hero p { margin: 0; font-size: 13.5px; color: var(--muted-foreground); max-width: 56ch; }
.sms-hero .sms-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.sms-hero .sms-btn {
  padding: 9px 16px; border-radius: 12px; font-weight: 700; font-size: 12.5px; cursor: pointer;
  border: 1px solid var(--border); background: var(--card); color: var(--foreground);
  transition: all .15s ease;
}
.sms-hero .sms-btn:hover { border-color: var(--primary); color: var(--primary); }
.sms-hero .sms-btn.primary {
  background: linear-gradient(135deg, #6366F1, #4F46E5); color: #fff; border: 0;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .3);
}
.sms-hero .sms-btn.primary:hover { color: #fff; filter: brightness(1.07); }
.sms-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sms-metric {
  padding: 12px 14px; border-radius: 14px; background: var(--secondary);
  border: 1px solid var(--border);
}
.sms-metric .l { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-foreground); }
.sms-metric .v { margin-top: 4px; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--foreground); }
.sms-metric .s { font-size: 11.5px; font-weight: 600; margin-top: 2px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.sms-metric .s.up { color: var(--bullish); }
.sms-metric .s.down { color: var(--bearish); }
.sms-breadth { grid-column: 1 / -1; }
.sms-breadth .bar { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--bearish) 35%, transparent); overflow: hidden; margin-top: 8px; }
.sms-breadth .bar > i { display: block; height: 100%; background: var(--bullish); border-radius: 999px; transition: width .5s ease; }
@media (max-width: 900px) {
  html[data-theme="smartmoney"] .sms-hero { grid-template-columns: 1fr; padding: 18px; }
}

/* ---------- 10. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html[data-theme="smartmoney"] * { animation: none !important; transition: none !important; }
}

/* ---------- 11. Intro splash keeps its dark cinematic look even in the light theme ---------- */
html[data-theme="smartmoney"] #landingIntroExperience {
  --background: #0F1020; --foreground: #EEF0FF; --card: #171933; --card-foreground: #EEF0FF;
  --primary: #818CF8; --primary-foreground: #0F1020; --secondary: #1E2142; --secondary-foreground: #EEF0FF;
  --muted: #1E2142; --muted-foreground: #9AA0C3; --border: #272B52;
  color: var(--foreground);
}
html[data-theme="smartmoney"] #landingIntroExperience .stat-card,
html[data-theme="smartmoney"] #landingIntroExperience [class*="bg-card"] { background: rgba(23, 25, 51, .78) !important; }

/* ---------- 12. Installed-app polish ---------- */
@media (display-mode: standalone) {
  html[data-theme="smartmoney"] body { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); overscroll-behavior-y: none; }
  html[data-theme="smartmoney"] #btnReplayIntro { display: none; }
}
@media (max-width: 640px) {
  html[data-theme="smartmoney"] .sms-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-theme="smartmoney"] .sms-hero h2 { font-size: 1.35rem; }
}

/* Keep bright accent text inside the dark intro splash */
html[data-theme="smartmoney"].light #landingIntroExperience .text-emerald-400,
html[data-theme="smartmoney"].light #landingIntroExperience .text-green-400 { color: #34D399 !important; }
html[data-theme="smartmoney"].light #landingIntroExperience .text-rose-400,
html[data-theme="smartmoney"].light #landingIntroExperience .text-red-400 { color: #FB7185 !important; }
html[data-theme="smartmoney"].light #landingIntroExperience .text-amber-400,
html[data-theme="smartmoney"].light #landingIntroExperience .text-yellow-400 { color: #FBBF24 !important; }
html[data-theme="smartmoney"].light #landingIntroExperience .text-blue-400,
html[data-theme="smartmoney"].light #landingIntroExperience .text-cyan-400,
html[data-theme="smartmoney"].light #landingIntroExperience .text-sky-400 { color: #67E8F9 !important; }
html[data-theme="smartmoney"].light #landingIntroExperience .text-purple-400,
html[data-theme="smartmoney"].light #landingIntroExperience .text-violet-400 { color: #C4B5FD !important; }
html[data-theme="smartmoney"].light #landingIntroExperience .text-white { color: #fff !important; }


/* ---------- 13. Compact header on phones (app-like) ---------- */
@media (max-width: 640px) {
  html[data-theme="smartmoney"] body > header:not(#landingIntroExperience header) > div:nth-child(2),
  html[data-theme="smartmoney"] body > header:not(#landingIntroExperience header) > div:nth-child(3) {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scrollbar-width: none;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }
  html[data-theme="smartmoney"] body > header > div:nth-child(2)::-webkit-scrollbar,
  html[data-theme="smartmoney"] body > header > div:nth-child(3)::-webkit-scrollbar { display: none; }
  html[data-theme="smartmoney"] body > header > div:nth-child(2) > *,
  html[data-theme="smartmoney"] body > header > div:nth-child(3) > * { flex-shrink: 0; flex-wrap: nowrap !important; }
  html[data-theme="smartmoney"] body > header > div:nth-child(4) { display: none; }
  html[data-theme="smartmoney"] #headerThemeNameLabel,
  html[data-theme="smartmoney"] #btnExportCsv { display: none !important; }
}

@media (max-width: 640px) {
  html[data-theme="smartmoney"] .sms-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .sms-metric { padding: 10px; }
  .sms-metric .v { font-size: 1rem; }
  .sms-metric .l { font-size: 9.5px; letter-spacing: .05em; }
}

/* ==========================================================================
   14. CHART PANEL (TradingView Lightweight Charts) – layout & readability
   ========================================================================== */
html[data-theme="smartmoney"] #chartViewportWrapper { background: var(--card); }
html[data-theme="smartmoney"] #tradingViewChart,
html[data-theme="smartmoney"] #tradingViewRsiChart { touch-action: pan-y; }

/* HUD legend: compact, never taller than one/two lines, doesn't block the chart */
html[data-theme="smartmoney"] #chartLegendHud {
  top: 8px; left: 10px;
  max-width: calc(100% - 90px);
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 88%, transparent) !important;
  box-shadow: 0 2px 10px rgba(20, 22, 43, .06);
  padding: 4px 10px !important;
}
@media (max-width: 640px) {
  html[data-theme="smartmoney"] #chartLegendHud {
    font-size: 10px !important;
    flex-wrap: nowrap !important;
    overflow: hidden;
    white-space: nowrap;
    max-width: calc(100% - 20px);
    gap: 6px !important;
    padding: 3px 8px !important;
  }
  html[data-theme="smartmoney"] #chartLegendHud > *:nth-child(n+7) { display: none; }
}

/* Toolbar: tidy wrapping + touch-friendly scroll */
html[data-theme="smartmoney"] #mSubViewChart .overflow-x-auto { scrollbar-width: none; flex-wrap: wrap; row-gap: 6px; }
html[data-theme="smartmoney"] .chart-tf-btn,
html[data-theme="smartmoney"] .ind-pill,
html[data-theme="smartmoney"] .draw-tool-btn { white-space: nowrap; border-radius: 8px; }
html[data-theme="smartmoney"] .chart-tf-btn.active { background: var(--primary) !important; color: #fff !important; }
html[data-theme="smartmoney"] .draw-tool-btn.active,
html[data-theme="smartmoney"] .draw-tool-btn[class*="bg-primary"] {
  background: color-mix(in srgb, var(--primary) 14%, transparent) !important;
  color: var(--primary) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
}
html[data-theme="smartmoney"] #rsiSubPaneContainer { background: var(--card) !important; }
html[data-theme="smartmoney"] #mVcpEmaStatusBar { border-radius: 0; border-left: 0; border-right: 0; }

/* Light theme: the dark "-950" tinted pills/badges become soft tints */
html[data-theme="smartmoney"].light [class*="bg-cyan-950"],
html[data-theme="smartmoney"].light [class*="bg-blue-950"] { background: #EEF2FF !important; border-color: #C7D2FE !important; }
html[data-theme="smartmoney"].light [class*="bg-amber-950"] { background: #FFFBEB !important; border-color: #FDE68A !important; }
html[data-theme="smartmoney"].light [class*="bg-emerald-950"] { background: #ECFDF5 !important; border-color: #A7F3D0 !important; }
html[data-theme="smartmoney"].light [class*="bg-rose-950"],
html[data-theme="smartmoney"].light [class*="bg-red-950"] { background: #FEF2F2 !important; border-color: #FECACA !important; }
html[data-theme="smartmoney"].light [class*="bg-purple-950"] { background: #F5F3FF !important; border-color: #DDD6FE !important; }
html[data-theme="smartmoney"].light .text-emerald-300 { color: #047857 !important; }
html[data-theme="smartmoney"].light .text-amber-300 { color: #B45309 !important; }
html[data-theme="smartmoney"].light .text-cyan-300,
html[data-theme="smartmoney"].light .text-blue-300 { color: #4338CA !important; }
html[data-theme="smartmoney"].light .text-purple-300 { color: #6D28D9 !important; }
html[data-theme="smartmoney"].light .text-rose-300 { color: #BE123C !important; }
html[data-theme="smartmoney"].light .text-slate-300,
html[data-theme="smartmoney"].light .text-slate-400 { color: var(--muted-foreground) !important; }

/* ==========================================================================
   15. INTRO – "Follow the smart money"
   ========================================================================== */
.smsi-top { background: linear-gradient(180deg, rgba(2,4,10,.85), rgba(2,4,10,0)); }
.smsi-brand { font: 800 15px/1 Inter, sans-serif; letter-spacing: -.01em; color: #EEF0FF; }
.smsi-livepill {
  align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px;
  font: 600 11.5px Inter, sans-serif; color: #6EE7B7;
  background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.28);
}
.smsi-live, .smsi-stat.live i {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #10B981;
  box-shadow: 0 0 0 0 rgba(16,185,129,.55); animation: smsiPing 1.8s ease-out infinite; flex-shrink: 0;
}
.smsi-stat.live i { margin-right: 8px; vertical-align: middle; }
@keyframes smsiPing { 70% { box-shadow: 0 0 0 9px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
.smsi-skip {
  padding: 7px 14px; border-radius: 10px; cursor: pointer; font: 700 12px Inter, sans-serif; color: #C7CCF5;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); transition: all .15s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.smsi-skip:hover { background: rgba(255,255,255,.12); color: #fff; }
.smsi-skip kbd, .smsi-hint kbd {
  font: 700 10.5px 'JetBrains Mono', ui-monospace, monospace; padding: 2px 6px; border-radius: 6px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #E0E3FF;
}

/* staggered reveal */
.smsi-r { opacity: 0; transform: translateY(18px) scale(.985); }
.sms-intro-play .smsi-r { animation: smsiIn .85s cubic-bezier(.2,.8,.2,1) var(--d, 0s) forwards; }
@keyframes smsiIn { to { opacity: 1; transform: none; } }

/* logo */
.smsi-logo-wrap { position: relative; width: 116px; height: 116px; display: grid; place-items: center; margin-bottom: 22px; }
.smsi-logo { width: 100%; height: 100%; filter: drop-shadow(0 14px 40px rgba(99,102,241,.6)); }
.smsi-draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.sms-intro-play .smsi-draw { animation: smsiDraw 1.4s cubic-bezier(.65,0,.35,1) .35s forwards; }
@keyframes smsiDraw { to { stroke-dashoffset: 0; } }
.smsi-dot { opacity: 0; transform-origin: 96px 60px; }
.sms-intro-play .smsi-dot { animation: smsiDot .5s ease 1.65s forwards, smsiBeat 2s ease-in-out 2.2s infinite; }
@keyframes smsiDot { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes smsiBeat { 50% { transform: scale(1.35); } }
.smsi-ring {
  position: absolute; inset: -14px; border-radius: 38px; border: 1.5px solid rgba(129,140,248,.55);
  opacity: 0; pointer-events: none;
}
.sms-intro-play .smsi-ring { animation: smsiRing 2.8s ease-out 1s infinite; }
.sms-intro-play .smsi-ring.r2 { animation-delay: 2.1s; }
@keyframes smsiRing { 0% { opacity: .7; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.55); } }

/* text */
.smsi-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
  font: 700 11px Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #A5B4FC;
  background: rgba(99,102,241,.12); border: 1px solid rgba(129,140,248,.3);
}
.smsi-title {
  margin: 0; font: 800 clamp(2.2rem, 7vw, 4.6rem)/1.04 Inter, sans-serif; letter-spacing: -.04em; color: #F4F5FF;
  text-shadow: 0 6px 40px rgba(99,102,241,.35);
}
.smsi-grad {
  background: linear-gradient(100deg, #818CF8 0%, #22D3EE 40%, #34D399 70%, #818CF8 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: smsiShimmer 6s linear infinite;
}
@keyframes smsiShimmer { to { background-position: -220% 0; } }
.smsi-sub { margin: 16px 0 0; max-width: 52ch; font: 500 clamp(.95rem, 2.4vw, 1.2rem)/1.6 Inter, sans-serif; color: #AEB4DC; }
.smsi-rot {
  display: inline-block; font-weight: 700; color: #E6E8FF; border-bottom: 2px solid #6366F1;
  transition: opacity .3s ease, transform .3s ease;
}
.smsi-rot.out { opacity: 0; transform: translateY(6px); }

/* stats + chips */
.smsi-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; width: min(760px, 100%); margin-top: 30px; }
.smsi-stat {
  padding: 14px 10px; border-radius: 16px; text-align: center;
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(10px);
  transition: transform .2s ease, border-color .2s ease;
}
.smsi-stat:hover { transform: translateY(-3px); border-color: rgba(129,140,248,.55); }
.smsi-stat b { display: block; font: 800 1.7rem/1.1 Inter, sans-serif; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }
.smsi-stat span { display: block; margin-top: 4px; font: 600 11px Inter, sans-serif; letter-spacing: .04em; color: #9AA0C3; }
.smsi-stat.live b { color: #6EE7B7; }
.smsi-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; max-width: 760px; }
.smsi-chips span {
  padding: 6px 13px; border-radius: 999px; font: 600 12px Inter, sans-serif; color: #C7CCF5;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
}

/* CTA */
.smsi-cta {
  position: relative; overflow: hidden; margin-top: 30px; padding: 15px 30px; border: 0; border-radius: 16px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 12px; color: #fff; font: 800 15px Inter, sans-serif; letter-spacing: -.01em;
  background: linear-gradient(135deg, #6366F1, #4F46E5 55%, #0EA5E9);
  box-shadow: 0 12px 36px rgba(79,70,229,.5), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .18s ease, box-shadow .18s ease;
}
.smsi-cta:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 18px 46px rgba(79,70,229,.62), inset 0 1px 0 rgba(255,255,255,.3); }
.smsi-cta:active { transform: scale(.98); }
.smsi-cta svg { transition: transform .18s ease; }
.smsi-cta:hover svg { transform: translateX(4px); }
.smsi-cta::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg);
  animation: smsiShine 3.4s ease-in-out 2s infinite;
}
@keyframes smsiShine { 60%, 100% { left: 130%; } }
.smsi-hint { margin-top: 14px; font: 500 12px Inter, sans-serif; color: #7F86B2; }

@media (max-width: 640px) {
  .smsi-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
  .smsi-stat b { font-size: 1.4rem; }
  .smsi-logo-wrap { width: 92px; height: 92px; margin-bottom: 16px; }
  .smsi-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .smsi-r { opacity: 1 !important; transform: none !important; }
  .smsi-draw { stroke-dashoffset: 0 !important; }
  .smsi-dot { opacity: 1 !important; }
}

.smsi-logo-wrap { margin-bottom: 34px; }
@media (max-width: 640px) {
  .smsi-logo-wrap { margin-bottom: 28px; }
  .smsi-eyebrow { font-size: 10px; letter-spacing: .08em; padding: 5px 12px; text-align: center; }
  .smsi-title { font-size: 2.35rem; }
}
