:root {
  --lx-pitch-bg: linear-gradient(155deg, var(--av-brand-teal-900) 0%, var(--av-paper-ink) 100%);
  --lx-pitch-text: rgba(255, 255, 255, 0.88);
  --lx-pitch-muted: rgba(255, 255, 255, 0.48);
  --lx-pitch-border: rgba(255, 255, 255, 0.09);
  --lx-row-bg: rgba(255, 255, 255, 0.045);
  --lx-row-hover: rgba(255, 255, 255, 0.085);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  background: var(--av-surface-page);
  color: var(--av-text-primary);
  font-family: var(--av-font-sans);
  -webkit-font-smoothing: antialiased;
}

.lx-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
}

.lx-pitch {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--lx-pitch-bg);
  color: var(--lx-pitch-text);
}

.lx-logo {
  align-self: flex-start;
  margin-bottom: 3.25rem;
  color: var(--av-paper-surface);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.lx-logo span { color: var(--av-brand-teal-500); }
.lx-eyebrow {
  margin: 0 0 1rem;
  color: var(--av-brand-teal-500);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lx-headline {
  max-width: 34rem;
  margin: 0 0 2.5rem;
  color: var(--av-paper-surface);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.lx-skills { display: grid; gap: 0.5rem; margin-bottom: 2.5rem; }
.lx-skill-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--lx-pitch-border);
  border-radius: 10px;
  background: var(--lx-row-bg);
  transition: background 0.2s, border-color 0.2s;
}
.lx-skill-row:hover { background: var(--lx-row-hover); border-color: rgba(255,255,255,.15); }
@keyframes lx-breathe { 50% { opacity: .35; transform: scale(.72); } }
.lx-skill-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  animation: lx-breathe 2.8s ease-in-out infinite;
}
.lx-skill-dot.is-speaking { background: var(--av-brand-amber-500); }
.lx-skill-dot.is-writing { background: var(--av-brand-teal-500); }
.lx-skill-dot.is-reading { background: var(--av-skill-reading); }
.lx-skill-dot.is-listening { background: var(--av-skill-listening); }
.lx-skill-dot.is-grammar { background: var(--av-skill-grammar); }
.lx-skill-dot.is-vocabulary { background: var(--av-brand-teal-400); }
.lx-skill-name { flex: 1; color: rgba(255,255,255,.86); font-size: .8125rem; font-weight: 600; }
.lx-skill-tag {
  padding: .15rem .5rem;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: var(--lx-pitch-muted);
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.lx-stat { display: flex; align-items: baseline; gap: .625rem; padding-top: 1.5rem; border-top: 1px solid var(--lx-pitch-border); }
.lx-stat-number { color: var(--av-paper-surface); font-family: var(--av-font-mono); font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; }
.lx-stat-label { color: var(--lx-pitch-muted); font-size: .8125rem; line-height: 1.4; }

.lx-form-panel { display: flex; min-height: 100vh; flex-direction: column; }
.lx-form-nav { display: flex; justify-content: flex-end; padding: 1.5rem 2.5rem; }
.lx-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .375rem .875rem;
  border: 1px solid var(--av-border-subtle);
  border-radius: 999px;
  background: var(--av-surface-elevated);
  color: var(--av-text-secondary);
  font: 500 .75rem var(--av-font-sans);
  cursor: pointer;
}
.lx-theme-toggle:hover { border-color: var(--av-border-default); background: var(--av-surface-sunken); color: var(--av-text-primary); }
.lx-theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .lx-theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .lx-theme-toggle .icon-moon { display: block; }

.lx-form-main {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 2rem 2.5rem 4rem;
}
.lx-form-card { width: min(100%, 380px); }
.lx-form-heading { margin: 0 0 .375rem; color: var(--av-text-primary); font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.lx-form-subheading { margin: 0 0 2rem; color: var(--av-text-secondary); font-size: .9375rem; line-height: 1.55; }
.lx-form-subheading strong, .lx-access-hint strong { color: var(--av-primary); font-weight: 700; }
.lx-action-google {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: .875rem 1.5rem;
  border: 1.5px solid var(--av-border-default);
  border-radius: var(--av-radius-lg);
  background: var(--av-surface-card);
  box-shadow: var(--av-shadow-sm);
  color: var(--av-text-primary);
  font: 600 .9375rem var(--av-font-sans);
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, border-color .2s;
}
.lx-action-google:hover { transform: translateY(-1px); border-color: var(--av-border-strong); box-shadow: var(--av-shadow-md); }
.lx-action-google:active { transform: none; }
.lx-loading { display: grid; justify-items: center; gap: .5rem; margin-top: 1.25rem; color: var(--av-text-secondary); }
.lx-loading p { margin: 0; font-size: .875rem; }
.lx-loading-dots { display: flex; gap: .375rem; }
@keyframes lx-pulse { 50% { opacity: .2; } }
.lx-loading-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--av-primary); animation: lx-pulse 1.2s ease-in-out infinite; }
.lx-loading-dots span:nth-child(2) { animation-delay: .2s; }
.lx-loading-dots span:nth-child(3) { animation-delay: .4s; }
.lx-error { margin: .875rem 0 0; color: var(--av-error); font-size: .8125rem; line-height: 1.5; text-align: center; }
.lx-access-hint {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  margin-top: 1rem;
  padding: .75rem 1rem;
  border: 1px solid var(--av-primary-border);
  border-radius: var(--av-radius-lg);
  background: var(--av-primary-soft);
  color: var(--av-text-secondary);
  font-size: .8125rem;
  line-height: 1.5;
}
.lx-access-icon { flex: 0 0 auto; margin-top: 1px; color: var(--av-primary); }
.lx-fine-print { margin: 1.5rem 0 0; color: var(--av-text-faint); font-size: .75rem; line-height: 1.65; text-align: center; }

.lx-dialog-backdrop {
  position: fixed;
  z-index: var(--av-z-modal);
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--av-surface-overlay);
  backdrop-filter: blur(6px);
}
@keyframes lx-dialog-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.lx-dialog {
  width: min(100%, 420px);
  padding: 2rem;
  border: 1px solid var(--av-border-default);
  border-radius: var(--av-radius-2xl);
  background: var(--av-surface-card);
  box-shadow: 0 0 0 1px var(--av-primary-border), var(--av-shadow-xl);
  animation: lx-dialog-in .22s ease-out;
}
.lx-dialog-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.lx-dialog-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: var(--av-radius-md); background: var(--av-primary-soft); }
.lx-dialog-title { margin: 0 0 .2rem; color: var(--av-text-primary); font-size: 1rem; font-weight: 700; }
.lx-dialog-desc { margin: 0; color: var(--av-text-secondary); font-size: .75rem; }
.lx-code-label { display: block; margin-bottom: .5rem; color: var(--av-text-secondary); font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.lx-code-input {
  display: block;
  width: 100%;
  margin-bottom: .875rem;
  padding: .75rem 1rem;
  border: 1.5px solid var(--av-border-default);
  border-radius: var(--av-radius-md);
  background: var(--av-surface-sunken);
  color: var(--av-text-primary);
  font: .875rem var(--av-font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.lx-code-input:focus { outline: none; border-color: var(--av-primary); box-shadow: var(--av-shadow-focus); }
.lx-code-input[aria-disabled="true"] { opacity: .65; }
.lx-action-activate { width: 100%; padding: .75rem; border: 0; border-radius: var(--av-radius-md); background: var(--av-primary); color: var(--av-text-on-primary); font: 600 .9375rem var(--av-font-sans); cursor: pointer; }
.lx-action-activate:hover { background: var(--av-primary-hover); }
.lx-action-activate[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.lx-activate-error, .lx-activate-success { margin: .625rem 0 0; font-size: .75rem; line-height: 1.5; text-align: center; }
.lx-activate-error { color: var(--av-error); }
.lx-activate-success { color: var(--av-primary); }
.lx-dialog-hint { margin: 1.25rem 0 0; color: var(--av-text-faint); font-size: .75rem; line-height: 1.5; text-align: center; }
.lx-dialog-hint span { color: var(--av-text-secondary); }

@media (max-width: 767px) {
  .lx-shell { grid-template-columns: 1fr; }
  .lx-pitch { display: none; }
  .lx-form-nav { padding: 1rem 1.25rem; }
  .lx-form-main { padding: 1rem 1.25rem 4rem; }
  .lx-dialog { padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lx-skill-dot, .lx-loading-dots span, .lx-dialog { animation: none; }
  .lx-action-google { transition: none; }
}
