@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Fira+Sans:wght@300;400;500;600;700&display=swap');

/* ================================================================
   LANDING PAGE (index, faq, tos) — OLED mesh + grid overlay
================================================================ */

body.is-landing {
  --r-xl: 24px;
  --r-2xl: 32px;
}

body.is-landing .btn.ghost {
  background: rgba(13, 148, 136, 0.08);
  color: #166534;
  border: 1px solid rgba(13, 148, 136, 0.24);
  box-shadow: none;
}

body.is-landing .btn.ghost:hover {
  background: rgba(13, 148, 136, 0.14);
  border-color: rgba(13, 148, 136, 0.42);
  box-shadow: var(--glow-purple);
  transform: translateY(-1px);
  color: var(--c-text);
}

body.is-landing .bento-card:hover {
  border-color: rgba(13, 148, 136, 0.35);
  transform: translateY(-3px);
  box-shadow: var(--s-lg), var(--glow-purple);
}

.hero-stat strong,
.bento-number,
.pricing-main-price,
.credit-balance-display,
.explore-heading {
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
}

/* ── TTS studio ───────────────────────────────────────────── */
.tts-pricing-table {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
}

.tts-pricing-head {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text3);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tts-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tts-pricing-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--c-text2);
}

.tts-pricing-item strong {
  color: var(--c-text);
  font-size: 13px;
}

.tts-pricing-item em {
  font-style: normal;
  color: var(--c-accent);
  font-weight: 600;
}

.tts-form-row {
  grid-template-columns: 1.4fr 0.8fr;
  align-items: end;
}

.tts-speed-field input[type="range"] {
  width: 100%;
  accent-color: var(--c-accent);
}

.tts-result-banner audio {
  width: 100%;
  margin-top: 10px;
}

.tts-audio-list {
  display: flex;
  flex-direction: column;
}

.tts-audio-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--c-border);
}

.tts-audio-item:first-child {
  border-top: 0;
}

.tts-audio-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tts-audio-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.tts-audio-meta strong {
  font-size: 13px;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tts-audio-meta span {
  font-size: 11px;
  color: var(--c-text3);
}

.tts-audio-item audio,
.tts-gallery-audio {
  width: 100%;
}

.tts-pending-placeholder {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--c-text3);
}

.tts-speech-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}
.tts-speech-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tts-speech-chip {
  appearance: none;
  -webkit-appearance: none;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--c-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--c-text2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.tts-speech-chip--wrap {
  border-color: rgba(13, 148, 136, 0.22);
  background: rgba(13, 148, 136, 0.08);
  color: #0D9488;
}
.tts-speech-chip:hover {
  border-color: rgba(13, 148, 136, 0.35);
  color: var(--c-text);
  background: rgba(255, 255, 255, 0.06);
}
.tts-speech-chip--wrap:hover {
  background: rgba(13, 148, 136, 0.14);
}
.tts-speech-chip:focus-visible {
  outline: 2px solid rgba(13, 148, 136, 0.35);
  outline-offset: 1px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.field-label-row label {
  margin: 0;
}
.tts-char-counter {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: var(--c-text2);
  font-variant-numeric: tabular-nums;
}
.tts-char-counter-current {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-accent);
}
.tts-char-counter.is-warning .tts-char-counter-current { color: #fbbf24; }
.tts-char-counter.is-warning { border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }
.tts-char-counter.is-danger .tts-char-counter-current { color: #DC2626; }
.tts-char-counter.is-danger { border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); }

@media (max-width: 900px) {
  .tts-pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tts-form-row { grid-template-columns: 1fr; }
  .app-topbar-right { display: flex; }
}

@media (max-width: 640px) {
  .app-content { padding: 12px; }
  .app-topbar {
    padding: 8px 12px;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 120;
    background: rgba(8, 10, 18, 0.92);
    backdrop-filter: blur(10px);
  }
  .app-page-title { font-size: 16px; max-width: 48vw; }

  .stats-row { gap: 10px; }
  .stat-card { padding: 14px 16px; }
  .stat-card-value { font-size: 20px; }

  .card { border-radius: var(--r-lg); }
  .card-header,
  .card-body { padding: 14px 16px; }
  .card-body-flush .tts-audio-item { padding: 14px 16px; }

  .tts-pricing-table { padding: 12px; margin-bottom: 14px; }
  .tts-pricing-grid { grid-template-columns: 1fr; gap: 8px; }
  .tts-pricing-item {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    background: rgba(21, 24, 30, 0.02);
  }

  .field--tts-text textarea,
  .media-form textarea,
  .media-form select,
  .media-form input[type="text"],
  .media-form input[type="number"] {
    font-size: 16px;
  }
  .field--tts-text textarea {
    min-height: 180px;
    line-height: 1.55;
  }

  .field-label-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .tts-char-counter {
    width: 100%;
    justify-content: center;
  }

  .tts-speech-tags-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin: 0 -2px;
    scrollbar-width: none;
  }
  .tts-speech-tags-row::-webkit-scrollbar { display: none; }
  .tts-speech-chip { flex-shrink: 0; }

  .form-actions-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    position: sticky;
    bottom: 0;
    z-index: 30;
    margin: 0 -16px -14px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(8, 10, 18, 0) 0%, rgba(8, 10, 18, 0.94) 28%);
  }
  .form-actions-row .btn { width: 100%; min-height: 44px; }

  .tts-audio-item-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .tts-audio-item-top .btn { width: 100%; justify-content: center; }
  .tts-audio-meta strong { white-space: normal; }

  .sidebar-user-balance {
    font-size: 12px;
    padding: 8px 10px;
    border-radius: var(--r-sm);
    background: rgba(13, 148, 136, 0.08);
    border: 1px solid rgba(13, 148, 136, 0.18);
  }
}

/* ================================================================
   LANDING V2 — Dark Ops (design-system/jempolin/MASTER.md)
   Flat design · Fira Code + Fira Sans · #020617 / #22C55E
================================================================ */

body.is-home {
  color-scheme: dark;

  --lx-bg:        #020617;
  --lx-panel:     #0F172A;
  --lx-panel-2:   #1A1E2F;
  --lx-ink:       #F8FAFC;
  --lx-ink-2:     #94A3B8;
  --lx-ink-3:     #7C8BA1;
  --lx-line:      #1E293B;
  --lx-line-2:    #334155;
  --lx-green:     #22C55E;
  --lx-green-ink: #04220E;
  --lx-green-dim: rgba(34, 197, 94, .1);
  --lx-red:       #EF4444;
  --lx-amber:     #EAB308;
  --lx-mono:      'Fira Code', 'JetBrains Mono', monospace;
  --lx-sans:      'Fira Sans', 'Inter', system-ui, sans-serif;
  --lx-t:         .18s ease;

  font-family: var(--lx-sans);
  background: var(--lx-bg);
  color: var(--lx-ink);
}

body.is-home h1,
body.is-home h2,
body.is-home h3,
body.is-home h4 {
  font-family: var(--lx-mono);
  font-weight: 600;
  letter-spacing: -.03em;
  color: var(--lx-ink);
}

body.is-home p { color: var(--lx-ink-2); }
body.is-home code, body.is-home pre { font-family: var(--lx-mono); }

body.is-home :focus-visible {
  outline: 2px solid var(--lx-green);
  outline-offset: 3px;
}

body.is-home ::selection {
  background: var(--lx-green);
  color: var(--lx-green-ink);
}

/* Blueprint grid backdrop */
.lx-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(51, 65, 85, .16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(51, 65, 85, .16) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 30%, transparent 78%);
}

/* ── Navbar (dark override) ─────────────────────────────────── */
body.is-home .topnav--bar {
  background: rgba(2, 6, 23, .82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

body.is-home .topnav--bar.is-scrolled {
  background: rgba(2, 6, 23, .94);
  border-bottom-color: var(--lx-line);
  box-shadow: none;
}

body.is-home .brand-logo,
body.is-home .brand-logo .logo-text { color: var(--lx-ink); }

body.is-home .topnav-links a { color: var(--lx-ink-2); }

body.is-home .topnav-links a:hover,
body.is-home .topnav-links a.active {
  color: var(--lx-ink);
  background: var(--lx-panel);
}

body.is-home .topnav.open .topnav-links {
  background: var(--lx-panel);
  border-color: var(--lx-line-2);
  box-shadow: 0 24px 48px rgba(2, 6, 23, .6);
}

/* ── Buttons (dark override) ────────────────────────────────── */
body.is-home .btn-primary,
body.is-home .btn:not(.btn-ghost):not(.btn-neutral):not(.danger):not(.ghost) {
  background: var(--lx-green);
  color: var(--lx-green-ink);
  box-shadow: none;
}

body.is-home .btn-primary:hover,
body.is-home .btn:not(.btn-ghost):not(.btn-neutral):not(.danger):not(.ghost):hover {
  background: #34D373;
  transform: translateY(-1px);
  box-shadow: none;
}

body.is-home .btn-ghost, body.is-home .btn.ghost {
  background: transparent;
  color: var(--lx-ink);
  border-color: var(--lx-line-2);
}

body.is-home .btn-ghost:hover, body.is-home .btn.ghost:hover {
  background: var(--lx-panel);
  border-color: #475569;
}

body.is-home .flash {
  background: var(--lx-panel);
  border: 1px solid var(--lx-line-2);
  color: var(--lx-ink);
}

/* ── Hero ───────────────────────────────────────────────────── */
.lx-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px 24px;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 56px;
  align-items: center;
}

.lx-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 14px 0 12px;
  margin-bottom: 26px;
  border-radius: var(--r-pill);
  border: 1px solid var(--lx-line-2);
  background: var(--lx-panel);
  font-family: var(--lx-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--lx-ink-2);
}

.lx-live-dot {
  width: 7px; height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--lx-green);
  animation: lx-pulse 2.2s ease infinite;
}

@keyframes lx-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); }
  60% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
}

.lx-headline {
  font-size: clamp(33px, 4.6vw, 56px);
  line-height: 1.12;
  margin-bottom: 22px;
}

.lx-headline .accent { color: var(--lx-green); }
.lx-headline .nowrap { white-space: nowrap; }

.lx-headline .cursor {
  display: inline-block;
  width: .55em;
  margin-left: 2px;
  border-bottom: .09em solid var(--lx-green);
  animation: lx-blink 1.1s step-end infinite;
}

@keyframes lx-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.lx-lead {
  font-size: clamp(16px, 1.8vw, 18px);
  font-weight: 300;
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 30px;
}

.lx-lead strong { color: var(--lx-ink); font-weight: 500; }

.lx-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.lx-proof {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.lx-proof li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--lx-ink-2);
}

.lx-proof svg {
  width: 15px; height: 15px;
  stroke: var(--lx-green); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── Console (hero showcase) ────────────────────────────────── */
.lx-console-wrap { position: relative; }

.lx-console {
  border: 1px solid var(--lx-line-2);
  border-radius: var(--r-lg);
  background: rgba(15, 23, 42, .65);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.lx-console-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 16px;
  background: var(--lx-panel);
  border-bottom: 1px solid var(--lx-line);
}

.lx-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.lx-dot.r { background: var(--lx-red); }
.lx-dot.y { background: var(--lx-amber); }
.lx-dot.g { background: var(--lx-green); }

.lx-console-bar em {
  margin-left: 8px;
  font-family: var(--lx-mono);
  font-size: 11px;
  font-style: normal;
  color: var(--lx-ink-3);
}

.lx-console-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--lx-mono);
  font-size: 11px;
  color: var(--lx-green);
}

.lx-console-body {
  margin: 0;
  padding: 20px 20px 16px;
  min-height: 268px;
  font-size: 12.5px;
  line-height: 1.8;
  color: #CBD5E1;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.lx-console-body .t-c { color: var(--lx-ink-3); }
.lx-console-body .t-k { color: #7DD3FC; }
.lx-console-body .t-s { color: #86EFAC; }
.lx-console-body .t-g { color: var(--lx-green); }
.lx-console-body .lx-model { white-space: nowrap; }

.lx-caret {
  display: inline-block;
  width: 8px; height: 15px;
  margin-left: 1px;
  vertical-align: -2px;
  background: var(--lx-green);
  animation: lx-blink 1s step-end infinite;
}

.lx-console-foot {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-top: 1px solid var(--lx-line);
  background: var(--lx-panel);
}

.lx-console-foot span {
  font-family: var(--lx-mono);
  font-size: 10.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--lx-ink-3);
}

.lx-console-foot strong {
  color: var(--lx-green);
  font-weight: 500;
  margin-left: 5px;
}

/* ── Metrics strip ──────────────────────────────────────────── */
.lx-metrics {
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.lx-metric {
  padding: 26px 24px;
  border: 1px solid var(--lx-line);
  border-left: none;
  background: rgba(15, 23, 42, .4);
}

.lx-metric:first-child {
  border-left: 1px solid var(--lx-line);
  border-radius: var(--r-md) 0 0 var(--r-md);
}

.lx-metric:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }

.lx-metric strong {
  display: block;
  font-family: var(--lx-mono);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600;
  color: var(--lx-ink);
  margin-bottom: 6px;
  white-space: nowrap;
}

.lx-metric strong .unit { color: var(--lx-green); font-size: .7em; }

.lx-metric span {
  font-size: 13px;
  color: var(--lx-ink-3);
}

/* ── Ticker ─────────────────────────────────────────────────── */
.lx-ticker {
  border-block: 1px solid var(--lx-line);
  padding: 14px 24px;
  margin: 72px 0 0;
  display: flex;
  justify-content: center;
}

.lx-ticker-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.lx-ticker-item {
  flex-shrink: 0;
  height: 34px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--lx-line);
  background: var(--lx-panel);
  font-family: var(--lx-mono);
  font-size: 11.5px;
  color: var(--lx-ink-2);
}

.lx-ticker-item::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--lx-green);
}

/* ── Sections ───────────────────────────────────────────────── */
.lx-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 104px 24px 0;
  position: relative;
}

.lx-head {
  max-width: 660px;
  margin-bottom: 48px;
}

.lx-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.lx-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--lx-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lx-green);
  margin-bottom: 16px;
}

.lx-kicker::before {
  content: '';
  width: 22px; height: 1px;
  background: var(--lx-green);
}

.lx-head.center .lx-kicker::after {
  content: '';
  width: 22px; height: 1px;
  background: var(--lx-green);
}

.lx-head h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.2;
  margin-bottom: 14px;
}

.lx-head p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
}

/* ── Pipeline (how it works) ────────────────────────────────── */
.lx-pipeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.lx-step {
  position: relative;
  padding: 28px;
  border: 1px solid var(--lx-line);
  border-radius: var(--r-lg);
  background: var(--lx-panel);
  transition: border-color var(--lx-t), transform var(--lx-t);
}

.lx-step:hover {
  border-color: var(--lx-line-2);
  transform: translateY(-2px);
}

.lx-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.lx-step-num {
  font-family: var(--lx-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--lx-green);
  padding: 5px 10px;
  border: 1px solid rgba(34, 197, 94, .3);
  border-radius: 7px;
  background: var(--lx-green-dim);
}

.lx-step-top svg {
  width: 20px; height: 20px;
  stroke: var(--lx-ink-3); fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

.lx-step h3 {
  font-size: 16.5px;
  margin-bottom: 8px;
}

.lx-step p {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.65;
}

.lx-step p code {
  font-size: 12px;
  color: #86EFAC;
  background: var(--lx-green-dim);
  padding: 1px 6px;
  border-radius: 5px;
}

/* ── Bento features ─────────────────────────────────────────── */
.lx-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.lx-card {
  grid-column: span 4;
  padding: 28px;
  border: 1px solid var(--lx-line);
  border-radius: var(--r-lg);
  background: var(--lx-panel);
  transition: border-color var(--lx-t), transform var(--lx-t);
}

.lx-card:hover {
  border-color: var(--lx-line-2);
  transform: translateY(-2px);
}

.lx-card-wide { grid-column: span 7; }
.lx-card-rest { grid-column: span 5; }

.lx-card-icon {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, .25);
  background: var(--lx-green-dim);
  color: var(--lx-green);
  margin-bottom: 18px;
}

.lx-card-icon svg {
  width: 19px; height: 19px;
  stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

.lx-card-label {
  font-family: var(--lx-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--lx-ink-3);
  margin-bottom: 10px;
}

.lx-card h3 {
  font-size: 17px;
  margin-bottom: 9px;
}

.lx-card > p {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.65;
}

.lx-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.lx-tags span {
  height: 28px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--lx-line-2);
  font-family: var(--lx-mono);
  font-size: 11px;
  color: var(--lx-ink-2);
}

/* ── Code section ───────────────────────────────────────────── */
.lx-codepanel {
  border: 1px solid var(--lx-line-2);
  border-radius: var(--r-lg);
  background: #060B1D;
  overflow: hidden;
  max-width: 860px;
  margin: 0 auto;
}

.lx-tabbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  background: var(--lx-panel);
  border-bottom: 1px solid var(--lx-line);
}

.lx-tab {
  height: 32px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-family: var(--lx-mono);
  font-size: 12px;
  color: var(--lx-ink-3);
  transition: color var(--lx-t), background var(--lx-t), border-color var(--lx-t);
}

.lx-tab:hover { color: var(--lx-ink); background: var(--lx-panel-2); }

.lx-tab.is-active {
  color: var(--lx-green);
  background: var(--lx-green-dim);
  border-color: rgba(34, 197, 94, .3);
}

.lx-tabbar-hint {
  margin-left: auto;
  font-family: var(--lx-mono);
  font-size: 10.5px;
  color: var(--lx-ink-3);
  padding-right: 6px;
}

.lx-pane { display: none; }
.lx-pane.is-active { display: block; }

.lx-pane pre {
  margin: 0;
  padding: 24px;
  font-size: 12.5px;
  line-height: 1.85;
  color: #CBD5E1;
  overflow-x: auto;
}

.lx-endpoints {
  max-width: 860px;
  margin: 16px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.lx-endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid var(--lx-line);
  border-radius: var(--r-md);
  background: rgba(15, 23, 42, .4);
  font-family: var(--lx-mono);
  font-size: 11.5px;
  color: var(--lx-ink-2);
}

.lx-endpoint .method {
  color: var(--lx-green);
  font-weight: 600;
  flex-shrink: 0;
}

/* ── Pricing ────────────────────────────────────────────────── */
.lx-pricing {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
}

.lx-price-main {
  padding: 36px;
  border: 1px solid rgba(34, 197, 94, .35);
  border-radius: var(--r-lg);
  background: var(--lx-panel);
  position: relative;
  overflow: hidden;
}

.lx-price-main::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--lx-green);
}

.lx-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(34, 197, 94, .3);
  background: var(--lx-green-dim);
  font-family: var(--lx-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--lx-green);
}

.lx-price {
  font-family: var(--lx-mono);
  font-size: clamp(38px, 5vw, 52px);
  font-weight: 600;
  line-height: 1;
  color: var(--lx-ink);
  margin: 18px 0 6px;
}

.lx-price .per {
  font-size: 15px;
  font-weight: 400;
  color: var(--lx-ink-3);
}

.lx-price-desc {
  font-size: 14.5px;
  font-weight: 300;
}

.lx-price-desc code {
  font-size: 12px;
  color: #86EFAC;
  background: var(--lx-green-dim);
  padding: 1px 6px;
  border-radius: 5px;
}

.lx-checks {
  list-style: none;
  margin-top: 24px;
  display: grid;
  gap: 11px;
}

.lx-checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--lx-ink-2);
}

.lx-checks svg {
  width: 16px; height: 16px;
  margin-top: 2px;
  stroke: var(--lx-green); fill: none;
  stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

.lx-price-side { display: grid; gap: 12px; align-content: start; }

.lx-addon {
  padding: 18px 20px;
  border: 1px solid var(--lx-line);
  border-radius: var(--r-md);
  background: var(--lx-panel);
}

.lx-addon span {
  display: block;
  font-family: var(--lx-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--lx-ink-3);
}

.lx-addon strong {
  display: block;
  margin-top: 7px;
  font-family: var(--lx-mono);
  font-size: 23px;
  font-weight: 600;
  color: var(--lx-ink);
}

.lx-addon strong em {
  font-style: normal;
  font-size: 13px;
  color: var(--lx-green);
}

.lx-addon small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--lx-ink-3);
}

.lx-price-side .btn { width: 100%; }

.lx-price-note {
  font-size: 12px;
  color: var(--lx-ink-3);
  line-height: 1.6;
}

/* ── CTA ────────────────────────────────────────────────────── */
.lx-cta {
  max-width: 1200px;
  margin: 104px auto 96px;
  padding: 0 24px;
}

.lx-cta-box {
  padding: 64px 32px;
  text-align: center;
  border: 1px solid var(--lx-line-2);
  border-radius: var(--r-xl);
  background:
    linear-gradient(to right, rgba(51, 65, 85, .14) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(51, 65, 85, .14) 1px, transparent 1px),
    var(--lx-panel);
  background-size: 40px 40px, 40px 40px, auto;
}

.lx-cta-box h2 {
  font-size: clamp(24px, 3.6vw, 40px);
  margin-bottom: 14px;
}

.lx-cta-box h2 .accent { color: var(--lx-green); }

.lx-cta-box p {
  font-size: 16px;
  font-weight: 300;
  max-width: 480px;
  margin: 0 auto 30px;
}

.lx-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lx-cta-meta {
  margin-top: 26px;
  font-family: var(--lx-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--lx-ink-3);
}

/* ── Footer (dark override) ─────────────────────────────────── */
body.is-home .public-footer { border-top-color: var(--lx-line); }
body.is-home .public-footer .brand-footer { color: var(--lx-ink); }
body.is-home .public-footer p { color: var(--lx-ink-3); }
body.is-home .footer-links a { color: var(--lx-ink-2); }
body.is-home .footer-links a:hover { color: var(--lx-ink); }

/* ── Reveal stagger (hero) ──────────────────────────────────── */
body.is-home .lx-hero-copy > [data-reveal]:nth-child(1) { transition-delay: 0ms; }
body.is-home .lx-hero-copy > [data-reveal]:nth-child(2) { transition-delay: 80ms; }
body.is-home .lx-hero-copy > [data-reveal]:nth-child(3) { transition-delay: 160ms; }
body.is-home .lx-hero-copy > [data-reveal]:nth-child(4) { transition-delay: 240ms; }
body.is-home .lx-hero-copy > [data-reveal]:nth-child(5) { transition-delay: 320ms; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .lx-hero {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 56px;
  }
  .lx-hero-copy { max-width: 640px; }
  .lx-card, .lx-card-wide, .lx-card-rest { grid-column: span 6; }
  .lx-pipeline { grid-template-columns: 1fr; }
  .lx-pricing { grid-template-columns: 1fr; }
  .lx-metrics { grid-template-columns: repeat(2, 1fr); }
  .lx-metric { border-left: 1px solid var(--lx-line); border-radius: 0 !important; }
  .lx-endpoints { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .lx-hero { padding-top: 44px; }
  .lx-section { padding-top: 76px; }
  .lx-card, .lx-card-wide, .lx-card-rest { grid-column: span 12; }
  .lx-console-body { min-height: 230px; font-size: 11.5px; }
  .lx-cta-box { padding: 48px 20px; }
  .lx-tabbar-hint { display: none; }
}

@media (max-width: 480px) {
  .lx-metrics { grid-template-columns: 1fr; }
  .lx-actions .btn { width: 100%; }
  .lx-cta-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .lx-caret, .lx-headline .cursor { animation: none; }
  .lx-live-dot { animation: none; }
}

/* ── Jempol.in Studio (desktop app) ───────────────────────── */
.lx-studio { padding-top: 88px; }
.lx-studio-shot { margin: 0 auto 28px; max-width: 1100px; }
.lx-studio-frame {
  margin: 0;
  border: 1px solid var(--lx-line-2);
  border-radius: var(--r-xl);
  background: var(--lx-panel);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
.lx-studio-frame img,
.lx-studio-gallery img {
  display: block;
  width: 100%;
  height: auto;
}
.lx-studio-frame figcaption,
.lx-studio-gallery figcaption {
  padding: 12px 16px 14px;
  font-size: 12px;
  color: var(--lx-ink-3);
  border-top: 1px solid var(--lx-line);
  font-family: var(--lx-mono);
  letter-spacing: .04em;
}
.lx-studio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto 28px;
}
.lx-studio-card {
  padding: 18px 18px 16px;
  border: 1px solid var(--lx-line-2);
  border-radius: var(--r-lg, 16px);
  background: var(--lx-panel);
}
.lx-studio-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
}
.lx-studio-card p {
  margin: 0;
  font-size: 14px;
  font-weight: 300;
  color: var(--lx-ink-2);
  line-height: 1.55;
}
.lx-studio-download {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 24px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto 32px;
  padding: 28px;
  border: 1px solid var(--lx-line-2);
  border-radius: var(--r-xl);
  background:
    linear-gradient(135deg, rgba(109, 94, 252, .08), transparent 45%),
    var(--lx-panel);
}
.lx-studio-dl-copy h3 {
  font-size: clamp(20px, 2.4vw, 28px);
  margin: 6px 0 10px;
}
.lx-studio-dl-copy p {
  font-size: 15px;
  font-weight: 300;
  color: var(--lx-ink-2);
  margin: 0 0 14px;
  max-width: 520px;
}
.lx-studio-dl-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.lx-studio-dl-meta {
  margin: 4px 0 0;
  font-size: 11px;
  font-family: var(--lx-mono);
  color: var(--lx-ink-3);
  line-height: 1.5;
}
.lx-studio-gallery {
  max-width: 1100px;
  margin: 0 auto;
}
.lx-studio-gallery figure {
  margin: 0;
  border: 1px solid var(--lx-line-2);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--lx-panel);
}
@media (max-width: 900px) {
  .lx-studio-grid { grid-template-columns: 1fr; }
  .lx-studio-download { grid-template-columns: 1fr; }
}

.lx-studio-frame--video {
  background: #0a0c10;
}
.lx-studio-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #0a0c10;
  vertical-align: middle;
}
