/* Wiserlytics — premium app layout (teal accents) */
:root {
  --wl-sidebar-w: 272px;
  --wl-teal: #0d9488;
  --wl-teal-2: #14b8a6;
  --wl-teal-soft: rgba(13,148,136,0.09);
  --wl-bg: #f6f7fb;
  --wl-card: #ffffff;
  --wl-text: #0f172a;
  --wl-muted: #64748b;
  --wl-border: #e5e7eb;
  --wl-green: #10b981;
  --wl-red: #f43f5e;
  --wl-header-h: 80px;
}

* { box-sizing: border-box; }

body.wl-app {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--wl-bg);
  color: var(--wl-text);
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════
   WELCOME SCREEN — no-scroll, data-rich layout
   ═══════════════════════════════════════════════════ */
body.wl-app:not(.wl-has-data) {
  height: 100vh;
  overflow: hidden;
}
body.wl-app:not(.wl-has-data) .wl-app-main {
  height: 100vh;
  overflow: hidden;
}
body.wl-app:not(.wl-has-data) .wl-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 14px 22px 10px;
  display: flex;
  flex-direction: column;
}
body.wl-app:not(.wl-has-data) .wl-foot {
  flex-shrink: 0;
  padding: 10px 22px 12px;
}

/* Welcome root */
.wl-welcome {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  animation: wl-fade-up 0.5s ease-out both;
}

/* ── Facts bar ── */
.wl-facts-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--wl-border);
  border-radius: 12px;
  padding: 0;
  flex-shrink: 0;
  overflow: hidden;
}
.wl-fact-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 12px;
}
.wl-fact-chip strong {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--wl-text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.wl-fact-chip span {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--wl-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.wl-fact-sep {
  width: 1px;
  height: 28px;
  background: var(--wl-border);
  flex-shrink: 0;
}

/* ── Main body grid ── */
.wl-body-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 12px;
  overflow: hidden;
}

/* ── Left: hero card (teal gradient) ── */
.wl-hero-card {
  position: relative;
  background: linear-gradient(145deg, #0d9488 0%, #0891b2 55%, #7c3aed 100%);
  border-radius: 18px;
  padding: 26px 28px;
  color: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: wl-pulse-glow 6s ease-in-out infinite;
}
.wl-hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.wl-hero-card-inner { position: relative; z-index: 1; }

.wl-hero-h2 {
  margin: 10px 0 8px;
  font-size: clamp(1.1rem, 1.7vw, 1.55rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: #fff;
}
.wl-hero-desc {
  margin: 0 0 14px;
  font-size: 0.84rem;
  line-height: 1.55;
  opacity: 0.9;
  max-width: 50ch;
  color: #fff;
}
.wl-hero-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.wl-hero-pill {
  padding: 4px 10px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.26);
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 700;
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ── Right: data column ── */
.wl-data-col {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

/* Unit economics preview */
.wl-spend-card {
  background: var(--wl-card);
  border: 1px solid var(--wl-border);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
  overflow: hidden;
}
.wl-spend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.wl-spend-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--wl-text);
}
.wl-spend-tag {
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: var(--wl-teal-soft);
  color: var(--wl-teal);
  padding: 3px 8px;
  border-radius: 999px;
}
.wl-spend-note {
  margin: 0;
  font-size: 0.65rem;
  color: var(--wl-muted);
  text-align: center;
  flex-shrink: 0;
}

/* 2×2 insight tiles */
.wl-insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex-shrink: 0;
}
.wl-insight-tile {
  background: var(--wl-card);
  border: 1px solid var(--wl-border);
  border-radius: 12px;
  padding: 11px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wl-insight-tile:hover {
  border-color: rgba(13,148,136,0.32);
  box-shadow: 0 3px 10px rgba(15,23,42,0.06);
}
.wl-insight-tile--teal {
  background: linear-gradient(135deg, rgba(13,148,136,0.07), rgba(20,184,166,0.05));
  border-color: rgba(13,148,136,0.2);
}
.wl-insight-tile--amber {
  background: linear-gradient(135deg, rgba(245,158,11,0.07), rgba(217,119,6,0.05));
  border-color: rgba(245,158,11,0.2);
}
.wl-insight-num {
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--wl-text);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.wl-insight-label {
  font-size: 0.63rem;
  color: var(--wl-muted);
  font-weight: 600;
  margin-top: 3px;
  line-height: 1.35;
}

/* ── Mobile simplification ── */
@media (max-width: 900px) {
  .wl-body-grid { grid-template-columns: 1fr; }
  .wl-data-col { display: none; }
  .wl-hero-card { border-radius: 14px; padding: 22px 20px; }
}
@media (max-width: 600px) {
  .wl-facts-bar { display: none; }
}

.wl-app-main { min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 1024px) { .wl-app-main { margin-left: var(--wl-sidebar-w); } }

/* Header */
.wl-top {
  height: var(--wl-header-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--wl-border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
  flex-shrink: 0;
}

.wl-top-left, .wl-top-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.wl-top-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 12px;
  border-radius: 10px;
  font-family: inherit;
  color: inherit;
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.wl-top-title:hover { background: rgba(13,148,136,0.07); }

.wl-top-title h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.wl-top-title p,
.wl-powered-by {
  margin: 0;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--wl-muted);
  opacity: 0.72;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.wl-icon-btn {
  width: 40px; height: 40px;
  border: 1px solid var(--wl-border); background: #fff;
  border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--wl-muted); position: relative;
  transition: background 0.15s, color 0.15s;
}
.wl-icon-btn:hover { background: var(--wl-teal-soft); color: var(--wl-teal); }

.wl-badge {
  position: absolute; top: -4px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 5px;
  background: var(--wl-teal); color: #fff;
  font-size: 9px; font-weight: 800;
  border-radius: 999px; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
}

.wl-upload-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--wl-teal), var(--wl-teal-2));
  color: #fff; border: none; border-radius: 10px;
  font-weight: 700; font-size: 0.87rem;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 6px 18px rgba(13,148,136,0.32);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.wl-upload-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(13,148,136,0.4);
}

/* Leaderboard button — upload-style, green */
.wl-leaderboard-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #059669, var(--wl-green));
  color: #fff; border: none; border-radius: 10px;
  font-weight: 700; font-size: 0.87rem;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 6px 18px rgba(16,185,129,0.32);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.wl-leaderboard-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(16,185,129,0.42);
}

/* Body — fills full width */
.wl-body { flex: 1; padding: 22px 26px 20px; width: 100%; }
.wl-error { color: #b91c1c; font-size: 13px; padding: 10px 26px 0; width: 100%; }
.wl-foot {
  margin-top: auto;
  border-top: 1px solid var(--wl-border);
  padding: 12px 26px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 11.5px;
  background: #fff;
  flex-shrink: 0;
}
.wl-foot-brand {
  color: var(--wl-muted);
  font-weight: 600;
  flex-shrink: 0;
}
.wl-foot-ai-note {
  flex: 1;
  min-width: 0;
  font-size: 10px;
  line-height: 1.45;
  color: #ca8a04;
  text-align: center;
}
.wl-foot-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.wl-foot-links a {
  color: var(--wl-muted);
  text-decoration: none;
  font-weight: 600;
}
.wl-foot-links a:hover { color: #0d9488; }

/* ═══ ODOO-STYLE LAYOUT ═══ */
.wl-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  animation: wl-fade-up 0.45s ease-out both;
}
.wl-kpi-tile {
  background: var(--wl-card);
  border: 1px solid var(--wl-border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.wl-kpi-tile:hover {
  border-color: rgba(13, 148, 136, 0.35);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}
.wl-kpi-tile-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wl-muted);
  margin-bottom: 6px;
}
.wl-kpi-tile-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--wl-text);
  line-height: 1.1;
  margin-bottom: 4px;
}
.wl-kpi-tile-hint {
  font-size: 0.72rem;
  color: var(--wl-muted);
  font-weight: 600;
}

.wl-hero-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.wl-side-panel {
  background: var(--wl-card);
  border: 1px solid var(--wl-border);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
}
.wl-side-panel h3 { margin: 0 0 14px; font-size: 0.9rem; font-weight: 800; color: var(--wl-text); }
.wl-side-preview {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--wl-border);
}
.wl-side-preview-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wl-muted);
  margin-bottom: 10px;
}
.wl-side-preview .wl-bar-row { margin-bottom: 8px; }
.wl-side-preview .wl-bar-track { height: 6px; }

/* Features */
.wl-features-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  animation: wl-fade-up 0.5s ease-out 0.1s both;
}
.wl-feature-row {
  background: var(--wl-card);
  border: 1px solid var(--wl-border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.wl-feature-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  border-color: rgba(13, 148, 136, 0.35);
}
.wl-feature-icon-sm {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--wl-teal-soft);
  color: var(--wl-teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.wl-feature-body { min-width: 0; }
.wl-feature-body h3 { margin: 0 0 3px; font-size: 0.85rem; font-weight: 800; color: var(--wl-text); }
.wl-feature-body p { margin: 0; font-size: 0.75rem; color: var(--wl-muted); line-height: 1.4; }

.wl-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  animation: wl-fade-up 0.55s ease-out 0.15s both;
}
.wl-panel {
  background: var(--wl-card);
  border: 1px solid var(--wl-border);
  border-radius: 16px;
  padding: 20px 24px;
}
.wl-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.wl-panel-head h3 { margin: 0; font-size: 0.95rem; font-weight: 800; color: var(--wl-text); }
.wl-panel-tag {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--wl-teal);
  background: var(--wl-teal-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.wl-panel-foot { margin: 14px 0 0; font-size: 0.72rem; color: var(--wl-muted); }

.wl-check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wl-check-list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.85rem;
  color: var(--wl-text);
  line-height: 1.5;
}
.wl-check-list li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 0;
  width: 18px; height: 18px;
  background: var(--wl-teal-soft);
  color: var(--wl-teal);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
}

/* Welcome animations */
@keyframes wl-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wl-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes wl-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes wl-pulse-glow { 0%,100% { box-shadow: 0 20px 60px rgba(13,148,136,0.28); } 50% { box-shadow: 0 24px 72px rgba(13,148,136,0.42); } }
@keyframes wl-bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.wl-welcome { animation: wl-fade-up 0.5s ease-out both; }

/* Hero */
.wl-hero {
  position: relative;
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 55%, #6366f1 100%);
  border-radius: 18px;
  padding: 32px 34px 30px;
  color: #fff;
  overflow: hidden;
  animation: wl-pulse-glow 6s ease-in-out infinite;
}
.wl-hero::before {
  content: ''; position: absolute;
  top: -60%; right: -20%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 60%);
  pointer-events: none;
}
.wl-hero::after {
  content: ''; position: absolute;
  bottom: -50%; left: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.wl-hero-inner { position: relative; z-index: 1; max-width: 640px; }

.wl-hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(255,255,255,0.18);
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}
.wl-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 900; letter-spacing: -0.03em; line-height: 1.15;
}
.wl-hero p {
  margin: 0 0 18px;
  font-size: 0.95rem; line-height: 1.55; opacity: 0.92;
  max-width: 52ch;
}
.wl-hero-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  background: #fff; color: var(--wl-teal);
  border: none; border-radius: 12px;
  font-weight: 800; font-size: 0.95rem;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}
.wl-hero-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  background-size: 200% 100%;
  animation: wl-shimmer 3s ease-in-out infinite;
  pointer-events: none;
}
.wl-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.24);
}
.wl-hero-hint { margin: 14px 0 0; font-size: 0.78rem; opacity: 0.8; }

.wl-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 20px;
}
.wl-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  min-width: 110px;
}
.wl-hero-stat strong {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.wl-hero-stat span {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.wl-hero-orbs {
  position: absolute; top: 0; right: 0;
  width: 300px; height: 100%;
  pointer-events: none; z-index: 0;
}
.wl-hero-orb {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  animation: wl-float 4s ease-in-out infinite;
}
.wl-hero-orb--1 { top: 20px; right: 40px; width: 70px; height: 70px; animation-delay: 0s; }
.wl-hero-orb--2 { top: 100px; right: 140px; width: 44px; height: 44px; animation-delay: 1s; }
.wl-hero-orb--3 { bottom: 40px; right: 80px; width: 90px; height: 90px; animation-delay: 2s; }

/* Features */
.wl-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  margin-bottom: 22px;
  animation: wl-fade-up 0.55s ease-out 0.1s both;
}
.wl-feature {
  background: var(--wl-card); border: 1px solid var(--wl-border);
  border-radius: 16px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.wl-feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15,23,42,0.08);
  border-color: rgba(13,148,136,0.35);
}
.wl-feature-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--wl-teal-soft); color: var(--wl-teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.wl-feature h3 { margin: 0; font-size: 0.92rem; font-weight: 800; }
.wl-feature p { margin: 0; font-size: 0.8rem; color: var(--wl-muted); line-height: 1.5; }

/* Preview */
.wl-preview-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  animation: wl-fade-up 0.55s ease-out 0.2s both;
}
.wl-preview-panel {
  background: var(--wl-card); border: 1px solid var(--wl-border);
  border-radius: 18px; padding: 24px 26px;
}
.wl-preview-panel h3 { margin: 0 0 6px; font-size: 1.02rem; font-weight: 800; }
.wl-preview-panel .wl-hint { margin: 0 0 18px; font-size: 0.82rem; color: var(--wl-muted); }

.wl-preview-tag {
  display: inline-block;
  font-size: 0.68rem; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--wl-teal); background: var(--wl-teal-soft);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}

.wl-preview-bars { display: grid; gap: 12px; }
.wl-bar-row { }
.wl-bar-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.83rem; font-weight: 600; margin-bottom: 6px;
}
.wl-bar-track { height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.wl-bar-fill {
  height: 100%; border-radius: 4px;
  transform-origin: left;
  animation: wl-bar-grow 0.9s cubic-bezier(0.4,0,0.2,1) both;
}

.wl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.wl-steps li { display: flex; gap: 14px; align-items: flex-start; font-size: 0.87rem; line-height: 1.55; }
.wl-step-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--wl-teal), var(--wl-teal-2));
  color: #fff; font-size: 0.82rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(13,148,136,0.28);
}

.wl-cta-secondary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 22px; padding: 13px 18px;
  background: linear-gradient(135deg, var(--wl-teal), var(--wl-teal-2));
  color: #fff; border: none; border-radius: 12px;
  cursor: pointer; width: 100%;
  font-weight: 800; font-size: 0.9rem; font-family: inherit;
  box-shadow: 0 8px 22px rgba(13,148,136,0.28);
  transition: transform 0.15s, filter 0.15s;
}
.wl-cta-secondary:hover { transform: translateY(-1px); filter: brightness(1.06); }
.wl-cta-hint { margin: 10px 0 0; text-align: center; font-size: 0.74rem; color: var(--wl-muted); }

/* Post-upload dashboard */
.wl-dash { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; animation: wl-fade-up 0.4s ease-out both; }
.wl-span-full { grid-column: 1 / -1; }

.wl-card {
  background: var(--wl-card); border: 1px solid var(--wl-border);
  border-radius: 16px; padding: 22px 24px;
}
.wl-card h3 { margin: 0 0 14px; font-size: 0.95rem; font-weight: 800; }
.wl-card p { font-size: 0.87rem; line-height: 1.55; color: var(--wl-muted); margin: 0 0 4px; }

.wl-story p { color: var(--wl-text) !important; font-size: 0.98rem !important; line-height: 1.6; }
.wl-period {
  display: inline-block; margin-top: 12px;
  font-size: 0.72rem;
  background: var(--wl-teal-soft); color: var(--wl-teal);
  padding: 4px 12px; border-radius: 999px; font-weight: 700;
}

.wl-kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wl-kpi-grid--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .wl-kpi-grid--wide { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .wl-kpi-grid--wide { grid-template-columns: 1fr; } }
.wl-kpi-item { background: var(--wl-bg); border-radius: 12px; padding: 14px 16px; }
.wl-kpi-label {
  font-size: 0.7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--wl-muted); margin-bottom: 6px;
}
.wl-kpi-value { font-size: 1.15rem; font-weight: 800; color: var(--wl-text); }

.wl-insight {
  background: linear-gradient(135deg, rgba(13,148,136,0.08), rgba(20,184,166,0.04));
  border-color: rgba(13,148,136,0.28);
}
.wl-insight p { color: var(--wl-text) !important; font-size: 0.94rem !important; font-weight: 500; }

.wl-peer-status { font-size: 0.98rem; font-weight: 800; margin: 0 0 6px; }
.wl-good { color: #15803d; }
.wl-warn { color: #c2410c; }
.wl-mid { color: #64748b; }

.wl-muted { color: var(--wl-muted); font-size: 0.85rem; }

/* Loading + modal */
.wl-loading[hidden], .wl-modal[hidden] { display: none !important; }
.wl-loading {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9900; backdrop-filter: blur(4px);
}
.wl-loading-box {
  background: #fff; padding: 32px 40px;
  border-radius: 18px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.24);
}
.wl-spinner {
  width: 34px; height: 34px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--wl-teal); border-radius: 50%;
  animation: wl-spin 0.8s linear infinite; margin: 0 auto 14px;
}
@keyframes wl-spin { to { transform: rotate(360deg); } }

.wl-modal {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.55);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 9800; backdrop-filter: blur(4px);
}
.wl-modal-panel {
  background: #fff; width: 100%; max-width: min(960px,100%);
  max-height: 78vh; border-radius: 22px 22px 0 0;
  padding: 26px 26px 32px; overflow-y: auto;
  animation: wl-fade-up 0.3s ease-out both;
}
.wl-modal-panel h2 { margin: 0 0 6px; font-size: 1.15rem; font-weight: 800; }

.wl-tl-item {
  padding: 14px 16px;
  border: 1px solid var(--wl-border); border-radius: 12px;
  margin-bottom: 10px; transition: border-color 0.15s;
}
.wl-tl-item:hover { border-color: var(--wl-teal); }
.wl-tl-item.active { border-color: var(--wl-teal); background: var(--wl-teal-soft); }
.wl-tl-item strong { display: block; font-size: 0.92rem; }
.wl-tl-item span { display: block; font-size: 0.76rem; color: var(--wl-muted); margin-top: 4px; }

/* Mobile */
@media (max-width: 1023px) {
  .wl-app-main { margin-left: 0; }
  .wl-body { padding: 16px 14px; }
  .wl-error, .wl-foot { padding-left: 14px; padding-right: 14px; }
  .wl-foot { flex-wrap: wrap; gap: 8px 12px; }
  .wl-foot-ai-note { flex: 1 1 100%; text-align: left; order: 3; }
  .wl-top { padding: 0 14px; height: 72px; gap: 8px; }
  .wl-top-title h1 { font-size: 1.35rem; }
  .wl-top-title p,
  .wl-powered-by { font-size: 0.52rem; }
  .wl-upload-btn-text { display: none; }
  .wl-upload-btn { padding: 10px 12px; }
  .wl-leaderboard-btn-text { display: none; }
  .wl-leaderboard-btn { padding: 10px 12px; }
  .wl-hero { padding: 26px 20px; border-radius: 16px; }
  .wl-hero h1 { font-size: 1.35rem; }
  .wl-hero-orbs { display: none; }
  .wl-kpi-strip { grid-template-columns: 1fr 1fr; }
  .wl-hero-row { grid-template-columns: 1fr; }
  .wl-features-row { grid-template-columns: 1fr 1fr; }
  .wl-split-row { grid-template-columns: 1fr; }
  .wl-preview-grid { grid-template-columns: 1fr; }
  .wl-dash { grid-template-columns: 1fr; }
  .wl-kpi-grid { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .wl-kpi-strip { grid-template-columns: 1fr; }
  .wl-features-row { grid-template-columns: 1fr; }
  .wl-kpi-tile-value { font-size: 1.35rem; }
}
