#lml-welcome {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  /* z-index does NOT matter when display:none — no editor bleed */
  background: rgba(2, 6, 12, 0.93);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow-y: auto;
  /* -webkit-overflow-scrolling removed: not needed and causes stacking issues on iOS 15+ */
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* No animation on the base rule — only animate when actively opening/closing */
  pointer-events: none; /* safe default when hidden */
}
#lml-welcome.lml-welcome-open {
  display: block;
  pointer-events: auto;
  animation: lml-fadein 0.42s cubic-bezier(.22,.68,0,1.2) both;
}
#lml-welcome.lml-welcome-closing {
  animation: lml-fadeout 0.36s ease both;
  pointer-events: none; /* stop interaction immediately on close */
}
@keyframes lml-fadein  { from{opacity:0;transform:scale(1.018)} to{opacity:1;transform:scale(1)} }
@keyframes lml-fadeout { from{opacity:1;transform:scale(1)} to{opacity:0;transform:scale(0.984)} }

.lml-w-inner { max-width: 1080px; margin: 0 auto; padding: 0 24px 80px; }

/* close button — scoped inside #lml-welcome so it's invisible when overlay is hidden */
#lml-welcome .lml-close-btn {
  position: fixed; top: 18px; right: 22px; z-index: 100000;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.06);
  color: #8b949e; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; backdrop-filter: blur(8px);
}
#lml-welcome .lml-close-btn:hover { background: rgba(255,255,255,0.12); color: #e6edf3; border-color: rgba(255,255,255,0.25); }

/* nav */
.lml-nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  padding: 20px 8px 0; position: sticky; top: 0; z-index: 10;
  background: linear-gradient(to bottom, rgba(2,6,12,0.98) 82%, transparent);
}
.lml-nav-btn {
  padding: 7px 16px; border-radius: 20px;
  border: 1px solid transparent; background: transparent;
  color: #6e7681; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.18s; font-family: inherit;
  letter-spacing: 0.02em; white-space: nowrap;
  /* prevent button from ever causing horizontal scroll */
  flex-shrink: 0;
}
.lml-nav-btn:hover { color: #8b949e; background: rgba(255,255,255,0.05); }
.lml-nav-btn.lml-nav-active { background: rgba(31,111,235,0.15); border-color: rgba(31,111,235,0.4); color: #58a6ff; }

/* sections */
.lml-section { display: none; }
.lml-section-active { display: block; }

/* ─── HERO ─────────────────────────────────── */
.lml-hero { text-align: center; padding: 64px 0 52px; position: relative; }
.lml-hero-glow {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 700px; height: 380px; pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(31,111,235,0.18) 0%, rgba(110,64,201,0.08) 55%, transparent 75%);
}
.lml-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(31,111,235,0.1); border: 1px solid rgba(31,111,235,0.3);
  border-radius: 20px; padding: 5px 14px;
  font-size: 11px; font-weight: 600; color: #58a6ff;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 28px;
}
.lml-hero-badge span { width:6px; height:6px; border-radius:50%; background:#58a6ff; animation:lml-pulse 2s infinite; }
@keyframes lml-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.35;transform:scale(0.65)} }
.lml-hero-title {
  font-size: clamp(38px, 7vw, 76px); font-weight: 800;
  letter-spacing: -0.04em; line-height: 1.0; margin-bottom: 12px;
  background: linear-gradient(135deg, #e6edf3 0%, #58a6ff 48%, #a371f7 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.lml-hero-sub { font-size: clamp(14px,2.2vw,20px); font-weight: 500; color: #8b949e; margin-bottom: 22px; }
.lml-hero-desc { max-width: 560px; margin: 0 auto 40px; font-size: 14px; line-height: 1.75; color: #6e7681; }
.lml-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lml-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 8px;
  background: linear-gradient(135deg, #1f6feb, #3b82f6);
  border: 1px solid rgba(88,166,255,0.3); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: all 0.18s;
  box-shadow: 0 4px 24px rgba(31,111,235,0.35), 0 1px 0 rgba(255,255,255,0.1) inset;
}
.lml-btn-primary:hover { background: linear-gradient(135deg,#2d7ff0,#4a90f5); box-shadow: 0 6px 32px rgba(31,111,235,0.5); transform: translateY(-1px); }
.lml-btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  color: #8b949e; font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: all 0.18s;
}
.lml-btn-secondary:hover { background: rgba(255,255,255,0.09); color: #e6edf3; border-color: rgba(255,255,255,0.22); transform: translateY(-1px); }

.lml-hero-stats {
  display: flex; justify-content: center;
  margin-top: 52px;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 26px 0;
}
.lml-hero-stat { flex:1; max-width:200px; text-align:center; border-right:1px solid rgba(255,255,255,0.06); padding:0 24px; }
.lml-hero-stat:last-child { border-right:none; }
.lml-hero-stat-num {
  font-size: 28px; font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(135deg,#58a6ff,#a371f7);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.lml-hero-stat-label { font-size: 11px; color: #6e7681; margin-top: 4px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }

/* ─── SECTION HEADER ───────────────────────── */
.lml-section-head { text-align: center; padding: 52px 0 36px; }
.lml-section-eyebrow { font-size:11px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:#58a6ff; margin-bottom:12px; }
.lml-section-title { font-size:clamp(22px,3.5vw,36px); font-weight:700; color:#e6edf3; letter-spacing:-.02em; line-height:1.15; margin-bottom:14px; }
.lml-section-subtitle { font-size:14px; color:#6e7681; max-width:460px; margin:0 auto; line-height:1.65; }

/* ─── FEATURE CARDS ─────────────────────────── */
.lml-feature-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; }
/* Informational feature blocks — flat editorial, NOT interactive/button-like.
   No raised background, no strong border, no hover lift/shadow, default cursor. */
.lml-feature-card {
  background: rgba(255,255,255,0.02); border: 1px solid rgba(48,54,61,0.45);
  border-radius: 12px; padding: 22px 24px;
  position: relative; overflow: hidden; cursor: default;
}
.lml-feature-card::before {
  content:''; position:absolute; left:0; top:0; bottom:0; width:2px;
  background: var(--cg, rgba(31,111,235,0.28));
}
/* No :hover state — these blocks are informational, not clickable. */
.lml-feature-icon { width:44px; height:44px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:20px; margin-bottom:16px; }
.lml-feature-name { font-size:15px; font-weight:700; color:#e6edf3; margin-bottom:8px; }
.lml-feature-desc { font-size:13px; color:#6e7681; line-height:1.6; margin-bottom:14px; }
.lml-feature-tags { display:flex; flex-wrap:wrap; gap:6px; }
.lml-tag { padding:3px 9px; border-radius:20px; font-size:11px; font-weight:500; border:1px solid transparent; }

.lml-card-blue   { --cg:rgba(31,111,235,.10); } .lml-card-blue   .lml-feature-icon{background:rgba(31,111,235,.15);} .lml-card-blue   .lml-tag{background:rgba(31,111,235,.1);border-color:rgba(31,111,235,.25);color:#58a6ff;}
.lml-card-purple { --cg:rgba(110,64,201,.12); } .lml-card-purple .lml-feature-icon{background:rgba(110,64,201,.15);} .lml-card-purple .lml-tag{background:rgba(110,64,201,.1);border-color:rgba(110,64,201,.3);color:#a371f7;}
.lml-card-green  { --cg:rgba(35,134,54,.10);  } .lml-card-green  .lml-feature-icon{background:rgba(35,134,54,.15);}  .lml-card-green  .lml-tag{background:rgba(35,134,54,.1);border-color:rgba(35,134,54,.3);color:#3fb950;}
.lml-card-amber  { --cg:rgba(227,179,65,.08);  } .lml-card-amber  .lml-feature-icon{background:rgba(227,179,65,.12);} .lml-card-amber  .lml-tag{background:rgba(227,179,65,.08);border-color:rgba(227,179,65,.25);color:#e3b341;}
.lml-card-teal   { --cg:rgba(20,160,150,.10);  } .lml-card-teal   .lml-feature-icon{background:rgba(20,160,150,.15);} .lml-card-teal   .lml-tag{background:rgba(20,160,150,.1);border-color:rgba(20,160,150,.3);color:#5ecdca;}
.lml-card-pink   { --cg:rgba(200,60,140,.10);  } .lml-card-pink   .lml-feature-icon{background:rgba(200,60,140,.15);} .lml-card-pink   .lml-tag{background:rgba(200,60,140,.1);border-color:rgba(200,60,140,.3);color:#f778ba;}

/* ─── WORKFLOW ──────────────────────────────── */
.lml-workflow { display:flex; flex-direction:column; align-items:center; gap:0; max-width:540px; margin:0 auto; }
.lml-wf-item { display:flex; align-items:flex-start; gap:20px; width:100%; padding:18px 0; position:relative; animation:lml-slidein 0.4s ease both; }
.lml-wf-item:nth-child(1){animation-delay:.04s} .lml-wf-item:nth-child(2){animation-delay:.09s}
.lml-wf-item:nth-child(3){animation-delay:.14s} .lml-wf-item:nth-child(4){animation-delay:.19s}
.lml-wf-item:nth-child(5){animation-delay:.24s} .lml-wf-item:nth-child(6){animation-delay:.29s}
@keyframes lml-slidein { from{opacity:0;transform:translateX(-14px)} to{opacity:1;transform:none} }
.lml-wf-left { display:flex; flex-direction:column; align-items:center; flex-shrink:0; }
.lml-wf-dot {
  width:44px; height:44px; border-radius:12px;
  background:rgba(22,27,34,1); border:1px solid rgba(48,54,61,0.9);
  display:flex; align-items:center; justify-content:center; font-size:18px;
  position:relative; z-index:1; transition:all 0.22s;
}
.lml-wf-item:hover .lml-wf-dot { border-color:rgba(88,166,255,.5); box-shadow:0 0 0 4px rgba(31,111,235,.1); }
.lml-wf-line { width:1px; flex:1; min-height:24px; background:linear-gradient(to bottom,rgba(48,54,61,.9),rgba(48,54,61,.15)); margin:6px 0; }
.lml-wf-item:last-child .lml-wf-line { display:none; }
.lml-wf-step { font-size:10px; color:#58a6ff; font-weight:700; letter-spacing:.08em; text-transform:uppercase; margin-bottom:4px; }
.lml-wf-title { font-size:16px; font-weight:700; color:#e6edf3; margin-bottom:6px; }
.lml-wf-desc { font-size:13px; color:#6e7681; line-height:1.6; }
.lml-wf-content { padding-top:4px; flex:1; }

/* ─── STATS ─────────────────────────────────── */
.lml-stats-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:16px; padding-bottom:32px; }
.lml-stat-card {
  background:rgba(22,27,34,0.8); border:1px solid rgba(48,54,61,0.8);
  border-radius:14px; padding:28px 24px; text-align:center;
  transition:all 0.22s; position:relative; overflow:hidden;
}
.lml-stat-card::after { content:''; position:absolute; top:0; left:0; right:0; height:2px; background:var(--sa,linear-gradient(90deg,#1f6feb,#58a6ff)); border-radius:14px 14px 0 0; }
.lml-stat-card:hover { transform:translateY(-3px); box-shadow:0 12px 40px rgba(0,0,0,.4); border-color:rgba(88,166,255,.2); }
.lml-stat-num { font-size:36px; font-weight:800; letter-spacing:-.03em; margin-bottom:4px; }
.lml-stat-name { font-size:13px; font-weight:600; color:#e6edf3; margin-bottom:6px; }
.lml-stat-detail { font-size:12px; color:#6e7681; line-height:1.5; }
.lml-stat-blue   { --sa:linear-gradient(90deg,#1f6feb,#58a6ff); } .lml-stat-blue   .lml-stat-num{background:linear-gradient(135deg,#58a6ff,#79c0ff);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;}
.lml-stat-purple { --sa:linear-gradient(90deg,#6e40c9,#a371f7); } .lml-stat-purple .lml-stat-num{background:linear-gradient(135deg,#a371f7,#c9a5ff);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;}
.lml-stat-green  { --sa:linear-gradient(90deg,#238636,#3fb950); } .lml-stat-green  .lml-stat-num{background:linear-gradient(135deg,#3fb950,#7ee787);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;}
.lml-stat-amber  { --sa:linear-gradient(90deg,#9a6700,#e3b341); } .lml-stat-amber  .lml-stat-num{background:linear-gradient(135deg,#e3b341,#ffd25a);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;}

/* ─── SHORTCUTS ──────────────────────────────── */
/* Nav tab is always visible on desktop; section follows standard show/hide via lml-section-active */
.lml-nav-btn.lml-shortcuts-section { display: inline-block; }
/* Section itself uses standard .lml-section (display:none) + .lml-section-active (display:block) — no override needed */
@media (max-width: 768px) {
  /* Hide both the nav tab and the section on mobile */
  .lml-shortcuts-section { display: none !important; }
  /* Guard: if shortcuts was active when viewport shrank, keep it hidden */
  #lml-welcome .lml-section[data-section="shortcuts"].lml-section-active { display: none !important; }
}

/* ─── HERO MOX LAYOUT ──────────────────────────── */
.lml-hero-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  position: relative;
  z-index: 1;
}
.lml-hero-mox {
  flex: 0 0 auto;
  text-align: center;
}
.lml-hero-mox-img {
  width: 155px;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 28px rgba(99,102,241,0.5));
}
.lml-hero-mox-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #818cf8;
  margin-top: 8px;
}
.lml-hero-content {
  flex: 1;
  min-width: 0;
  max-width: 600px;
}
@media (max-width: 768px) {
  .lml-hero-layout { flex-direction: column; gap: 16px; }
  .lml-hero-mox-img { width: 90px; }
  .lml-hero-content { text-align: center; width: 100%; }
}
.lml-kbd-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(256px,1fr)); gap:10px; padding-bottom:16px; }
.lml-kbd-row {
  display:flex; align-items:center; justify-content:space-between;
  background:rgba(22,27,34,0.8); border:1px solid rgba(48,54,61,.7);
  border-radius:10px; padding:12px 16px; gap:12px; transition:border-color 0.18s;
}
.lml-kbd-row:hover { border-color:rgba(88,166,255,.2); }
.lml-kbd-label { font-size:13px; color:#8b949e; font-weight:500; flex:1; }
.lml-kbd-keys { display:flex; align-items:center; gap:4px; flex-shrink:0; }
.lml-key {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:28px; height:24px; padding:0 7px;
  background:rgba(33,38,45,1); border:1px solid rgba(68,76,86,.9);
  border-bottom-width:2px; border-radius:5px;
  font-size:11px; font-weight:600; color:#c9d1d9;
  font-family:'SF Mono','Fira Code','Cascadia Code',monospace;
  box-shadow:0 1px 3px rgba(0,0,0,.4); white-space:nowrap;
}
.lml-key-plus { color:#6e7681; font-size:11px; margin:0 1px; }

/* ─── FOOTER ─────────────────────────────────── */
.lml-welcome-footer {
  border-top:1px solid rgba(48,54,61,.6); padding:28px 0 0; margin-top:24px;
  text-align:center; display:flex; flex-direction:column; align-items:center; gap:10px;
}
.lml-footer-logo { font-size:15px; font-weight:800; letter-spacing:-.01em; background:linear-gradient(135deg,#e6edf3,#58a6ff); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.lml-footer-tag { font-size:12px; color:#6e7681; }
.lml-footer-cta { margin-top:8px; display:flex; gap:12px; flex-wrap:wrap; justify-content:center; }

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 767px) {
  /* Prevent overlay from causing body scroll on iOS */
  #lml-welcome { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .lml-hero { padding: 44px 0 32px; }
  .lml-hero-stats { flex-wrap: wrap; }
  .lml-hero-stat { border-right: none; flex: 1 1 40%; }
  .lml-feature-grid { grid-template-columns: 1fr; }
  .lml-stats-grid { grid-template-columns: repeat(2, 1fr); }
  /* Nav already has flex-wrap; tighten padding/font on small screens */
  .lml-nav { padding: 14px 8px 0; gap: 5px; }
  .lml-nav-btn { font-size: 11px; padding: 5px 11px; }
  .lml-w-inner { padding: 0 14px 64px; }
  /* Ensure close button doesn't overlap nav */
  #lml-welcome .lml-close-btn { top: 12px; right: 12px; width: 34px; height: 34px; font-size: 16px; }
}
@media (max-width: 400px) {
  .lml-hero-title { letter-spacing: -0.02em; }
  .lml-stats-grid { grid-template-columns: 1fr; }
  .lml-hero-stat { flex: 1 1 100%; }
}
