/* QA Lab landing page — static CSS, no JS build */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--page-bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

:root {
  --page-bg: #f6f7f8;
  --surface: #ffffff;
  --soft-bg: #eef3f2;
  --table-stripe: #fafbfb;
  --text-strong: #17201f;
  --text-muted: #596562;
  --text-soft: #87918e;
  --border: #dde4e2;
  --border-strong: #c1cbc8;
  --accent: #0b766d;
  --accent-strong: #075f58;
  --accent-soft: #e3f1ef;
  --success: #23764f;
  --danger: #bb3b37;
  --warning: #9a6a14;
  --info: #1f5fb0;
  --info-soft: #eaf1fb;
  --shadow-sm: 0 1px 2px rgba(23, 32, 31, 0.04);
  --shadow-md: 0 4px 12px rgba(23, 32, 31, 0.06);
  --shadow-lg: 0 12px 28px rgba(23, 32, 31, 0.10);

  /* Radius scale — 8px is the system default; 12px reserved for surfaces */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --sans: Aptos, 'Segoe UI', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;

  /* Derived tokens */
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  --accent-glow-sm: none;
  --accent-glow-md: none;

  color-scheme: light;
  color: var(--text-muted);
  background: var(--page-bg);
  font-family: var(--sans);
  font-size: 16px;
  font-synthesis: none;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  min-height: 38px;
  height: auto;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.danger-button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.primary-button {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  box-shadow: 0 1px 3px rgba(11, 118, 109, 0.25), 0 1px 0 rgba(255,255,255,0.08) inset;
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  box-shadow: 0 2px 6px rgba(11, 118, 109, 0.30);
}

.secondary-button {
  background: var(--surface);
  color: var(--text-strong);
  border: 1px solid var(--border-strong);
  box-shadow: 0 1px 2px rgba(23, 32, 31, 0.06);
}

.secondary-button:hover:not(:disabled) {
  background: var(--soft-bg);
  border-color: var(--text-soft);
  box-shadow: 0 1px 4px rgba(23, 32, 31, 0.1);
}

.danger-button {
  background: #fff5f5;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.danger-button:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #fca5a5;
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.danger-button:active:not(:disabled) {
  transform: translateY(1px);
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


a.primary-button,
a.secondary-button {
  text-decoration: none;
}

a.lp-nav-signin {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* ============================================================
   Landing page (public, logged-out front door) — .lp-*
   ============================================================ */
.lp {
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text-strong);
  font-family: var(--sans);
  overflow-x: hidden;
}

/* --- Top nav --- */
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) clamp(var(--space-4), 5vw, 64px);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text-strong);
  text-decoration: none;
}
.lp-brand .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
}
.lp-nav-links {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-3), 2vw, var(--space-5));
}
.lp-nav-links > a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.lp-nav-links > a:hover { color: var(--text-strong); }
.lp-nav-signin {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0;
}
.lp-nav-signin:hover { color: var(--text-strong); }
.lp-nav-cta { padding: 8px 16px; }

/* --- Layout shell --- */
.lp-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(var(--space-4), 5vw, 48px);
}
.lp-section { padding: clamp(56px, 9vw, 104px) 0; }
.lp-section-head {
  max-width: 640px;
  margin: 0 auto clamp(var(--space-5), 5vw, 56px);
  text-align: center;
}
.lp-section-head h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
}
.lp-section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* --- Hero --- */
.lp-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(var(--space-5), 5vw, 64px);
  align-items: center;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
}
.lp-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: var(--space-4);
}
.lp-h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-4);
  font-weight: 750;
}
.lp-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 var(--space-5);
  max-width: 36ch;
}
.lp-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.lp-cta-primary { padding: 12px 22px; font-size: 0.98rem; }
.lp-cta-secondary { padding: 12px 22px; font-size: 0.98rem; }
.lp-trust {
  margin: var(--space-4) 0 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* --- Hero snapshot (real-component-style preview) --- */
.lp-hero-visual { display: flex; justify-content: center; }
.lp-snap {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
  transform: rotate(0.4deg);
}
.lp-snap-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.lp-snap-head strong { font-size: 0.98rem; }
.lp-snap-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-soft);
}
.lp-snap-dot--ok { background: var(--success); }
.lp-snap-verdict {
  margin-left: auto;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 12%, transparent);
  padding: 3px 9px;
  border-radius: 999px;
}
.lp-snap-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.lp-snap-stats > div {
  background: var(--soft-bg);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lp-snap-stats span { font-size: 0.74rem; color: var(--text-muted); }
.lp-snap-stats strong { font-size: 1.25rem; letter-spacing: -0.02em; }
.lp-snap-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: var(--space-4);
  background: var(--border);
}
.lp-snap-rows { display: flex; flex-direction: column; gap: var(--space-2); }
.lp-snap-rows > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}
.lp-snap-rows > div:last-child { border-bottom: none; padding-bottom: 0; }
.lp-snap-rows span { color: var(--text-strong); }
.lp-snap-rows em { font-style: normal; font-weight: 600; font-size: 0.78rem; }
.lp-snap-pass { color: var(--success); }
.lp-snap-review { color: var(--warning); }

/* --- Pillars --- */
.lp-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  padding: clamp(32px, 5vw, 56px) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.lp-pillar { padding: var(--space-2) 0; }
.lp-pillar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: var(--space-3);
}
.lp-pillar h3 { font-size: 1.02rem; margin: 0 0 var(--space-2); letter-spacing: -0.01em; }
.lp-pillar p { margin: 0; color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

/* --- Features --- */
.lp-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.lp-feature {
  display: flex;
  gap: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.lp-feature:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.lp-feature-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.lp-feature h3 { font-size: 1.05rem; margin: 0 0 var(--space-2); letter-spacing: -0.01em; }
.lp-feature p { margin: 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.55; }

/* --- How it works --- */
.lp-how {
  background: var(--soft-bg);
  border-radius: var(--radius-lg);
}
.lp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  max-width: 880px;
  margin: 0 auto;
}
.lp-step { text-align: center; padding: 0 var(--space-2); }
.lp-step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  margin-bottom: var(--space-3);
}
.lp-step h3 { font-size: 1.05rem; margin: 0 0 var(--space-2); }
.lp-step p { margin: 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.5; }

/* --- Wedge band --- */
.lp-wedge {
  text-align: center;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(48px, 7vw, 80px) clamp(var(--space-5), 6vw, 64px);
  margin: clamp(32px, 5vw, 48px) 0;
}
.lp-wedge h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
  max-width: 22ch;
  margin-inline: auto;
}
.lp-wedge p {
  margin: 0 auto;
  max-width: 56ch;
  font-size: 1.05rem;
  line-height: 1.6;
  color: color-mix(in srgb, #fff 88%, transparent);
}

/* --- Final CTA --- */
.lp-final {
  text-align: center;
  padding: clamp(48px, 8vw, 96px) 0;
}
.lp-final h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-5);
}

/* --- Footer --- */
.lp-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-5) clamp(var(--space-4), 5vw, 48px);
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.lp-footer .lp-brand { font-size: 0.95rem; }
.lp-footer-note { color: var(--text-soft); font-size: 0.85rem; }

/* --- Auth back link (returns to landing) --- */
.auth-back {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0;
  margin-bottom: var(--space-3);
}
.auth-back:hover { color: var(--text-strong); }

/* ============================================================
   Tags — TagInput editor + TagList chips
   ============================================================ */
.tag-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 38px;
}
.tag-input:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.tag-input-field {
  flex: 1;
  min-width: 120px;
  border: none !important;
  outline: none;
  padding: 2px 0 !important;
  background: transparent;
  font: inherit;
  box-shadow: none !important;
}

.tag-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  white-space: nowrap;
}
.tag-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.7;
  border-radius: 50%;
}
.tag-chip-remove:hover { opacity: 1; }
.tag-chip--button {
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.tag-chip--button:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.tag-chip--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* --- Landing responsive --- */
@media (max-width: 900px) {
  .lp-hero { grid-template-columns: 1fr; }
  .lp-hero-visual { order: -1; }
  .lp-pillars { grid-template-columns: 1fr 1fr; }
  .lp-feature-grid { grid-template-columns: 1fr; }
  .lp-steps { grid-template-columns: 1fr; gap: var(--space-4); max-width: 420px; }
}
@media (max-width: 560px) {
  .lp-nav-links > a { display: none; }
  .lp-pillars { grid-template-columns: 1fr; }
  .lp-sub { max-width: none; }
  .lp-cta-row { flex-direction: column; align-items: stretch; }
  .lp-cta-row .primary-button,
  .lp-cta-row .secondary-button { width: 100%; }
}



/* ============================================================
   Landing page — animated hero, interactive demo, micro-interactions
   ============================================================ */

/* ── Scroll progress bar ────────────────────────────────────── */
.lp-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 100;
}

.lp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff));
  border-radius: 0 2px 2px 0;
  /* Width is updated dynamically on scroll, transition is removed to keep it perfectly in sync without visual lag */
}

/* ── Hero glow ─────────────────────────────────────────────── */
.lp-glow {
  position: absolute;
  top: -60px;
  left: -60px;
  right: -60px;
  bottom: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 10%, transparent) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: glow-in 1s ease 0.3s forwards;
}

@keyframes glow-in {
  to { opacity: 1; }
}

/* ── Hero visual wrapper ───────────────────────────────────── */
.lp-hero-visual {
  position: relative;
  z-index: 1;
}

/* ── Interactive demo card ─────────────────────────────────── */
.lp-demo-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden;
  transform: rotate(0.4deg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.lp-demo-card:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.06);
}

/* ── Demo tabs ─────────────────────────────────────────────── */
.lp-demo-tabs {
  display: flex;
  gap: 2px;
  padding: 6px;
  border-bottom: 1px solid var(--border);
  background: #f8f9fa;
}

.lp-demo-tab {
  flex: 1;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.lp-demo-tab:hover:not(.lp-demo-tab--active) {
  background: rgba(255,255,255,0.8);
  color: var(--text-strong);
}

.lp-demo-tab--active {
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* ── Demo panel shared ─────────────────────────────────────── */
.ld-panel {
  padding: 16px;
  min-height: 260px;
  animation: ld-fade 0.3s ease;
}

@keyframes ld-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.ld-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.ld-panel-head strong {
  font-size: 13px;
  color: var(--text-strong);
}

.ld-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-soft);
}

.ld-dot--ok {
  background: var(--success);
  animation: ld-pulse 2s ease-in-out infinite;
}

@keyframes ld-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.ld-verdict {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.ld-verdict--ok { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }
.ld-verdict--warn { background: color-mix(in srgb, var(--warning) 12%, transparent); color: var(--warning); }

.ld-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.ld-badge--running { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.ld-badge--open { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }

/* ── Demo: Dashboard ───────────────────────────────────────── */
.ld-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.ld-stat {
  background: var(--soft-bg);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ld-stat span {
  font-size: 10px;
  color: var(--text-muted);
}

.ld-stat strong {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.ld-bar {
  display: flex;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--border);
}

.ld-bar-seg {
  display: block;
  min-width: 2px;
  transition: flex 0.6s ease;
}

.ld-bar-seg--pass { background: var(--success); }
.ld-bar-seg--warn { background: var(--warning); }
.ld-bar-seg--fail { background: var(--danger); }

.ld-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ld-rows > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.ld-rows > div:last-child { border-bottom: none; padding-bottom: 0; }
.ld-rows span { color: var(--text-strong); font-weight: 500; }
.ld-rows em { font-style: normal; font-weight: 600; font-size: 10px; }
.ld-pass { color: var(--success); }
.ld-review { color: var(--warning); }
.ld-fail { color: var(--danger); }

/* ── Demo: Test Runs ───────────────────────────────────────── */
.ld-run-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.ld-run-progress strong { color: var(--text-strong); }

.ld-run-bar {
  height: 5px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.ld-run-fill {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width 0.4s ease;
}

.ld-run-cases {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.ld-run-case {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 10px;
  min-width: 38px;
  transition: all 0.2s ease;
}

.ld-run-case--done {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.ld-run-case-n { font-weight: 700; color: var(--text-soft); }
.ld-run-case-status { font-weight: 700; font-size: 9px; text-transform: uppercase; color: var(--text-muted); }
.ld-rs--pass { color: var(--success) !important; }
.ld-rs--fail { color: var(--danger) !important; }
.ld-rs--blocker { color: #7f1d1d !important; }

.ld-run-shortcuts {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 9px;
  color: var(--text-muted);
}

.ld-run-shortcuts span {
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--soft-bg);
}

/* ── Demo: Bug Tracker ─────────────────────────────────────── */
.ld-bug-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ld-bug-row {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  transition: all 0.3s ease;
}

.ld-bug-row--highlight {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.ld-bug-id {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-soft);
}

.ld-bug-title {
  color: var(--text-strong);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ld-severity {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
}

.ld-sev--critical { background: #fef0f0; color: #a93030; }
.ld-sev--major { background: #fff8e6; color: #8a5a00; }
.ld-sev--minor { background: #e9f7ee; color: #1a6b37; }

.ld-bug-status {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}

.ld-bs--open { background: #fef0f0; color: #a93030; }
.ld-bs--inreview { background: #fff8e6; color: #8a5a00; }
.ld-bs--closed { background: #e9f7ee; color: #1a6b37; }

/* ── Demo: Reports ─────────────────────────────────────────── */
.ld-report-mods {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.ld-report-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  transition: all 0.3s ease;
}

.ld-report-row--highlight {
  background: color-mix(in srgb, var(--danger) 5%, transparent);
}

.ld-report-name { font-weight: 600; color: var(--text-strong); }

.ld-report-bar {
  display: flex;
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border);
}

.ld-report-fill { display: block; min-width: 2px; }
.ld-report-fill--ok { background: var(--success); }
.ld-report-fill--warn { background: var(--warning); }
.ld-report-fill--fail { background: var(--danger); }

.ld-report-counts {
  display: flex;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
}

.ld-report-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.ld-report-summary div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.ld-report-summary span { font-size: 9px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.ld-report-summary strong { font-size: 13px; font-weight: 700; }

/* ── CTA pulse animation ───────────────────────────────────── */
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 30%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent); }
}

.lp-cta-pulse {
  animation: cta-pulse 2.5s ease-in-out infinite;
}

.lp-cta-pulse:hover {
  animation: none;
}

/* ── Scroll reveal ─────────────────────────────────────────── */
.lp-reveal .lp-hero-copy,
.lp-reveal .lp-hero-visual,
.lp-reveal .lp-pillar,
.lp-reveal .lp-feature,
.lp-reveal .lp-step,
.lp-reveal .lp-section-head {
  animation: reveal-up 0.6s ease both;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered delays for child elements */
.lp-reveal .lp-hero-visual { animation-delay: 0.15s; }
.lp-pillar, .lp-feature, .lp-step {
  opacity: 0;
}
.lp-reveal .lp-pillar,
.lp-reveal .lp-feature,
.lp-reveal .lp-step {
  animation: reveal-up 0.5s ease both;
}
.lp-pillar:nth-child(1), .lp-feature:nth-child(1), .lp-step:nth-child(1) { animation-delay: 0ms; }
.lp-pillar:nth-child(2), .lp-feature:nth-child(2), .lp-step:nth-child(2) { animation-delay: 80ms; }
.lp-pillar:nth-child(3), .lp-feature:nth-child(3), .lp-step:nth-child(3) { animation-delay: 160ms; }
.lp-pillar:nth-child(4), .lp-feature:nth-child(4) { animation-delay: 240ms; }

/* ── Feature card hover ────────────────────────────────────── */
.lp-feature {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lp-feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  border-color: var(--border-strong);
}

/* ── Wedge & final reveal ──────────────────────────────────── */
.lp-wedge, .lp-final {
  opacity: 1;
}

.lp-reveal .lp-wedge,
.lp-reveal .lp-final {
  animation: reveal-up 0.6s ease both;
}

/* ── Smooth scroll (scoped to landing page only) ────────────── */
.lp { scroll-behavior: smooth; }

/* ── Responsive demo adjustments ───────────────────────────── */
@media (max-width: 900px) {
  .lp-demo-card {
    max-width: 100%;
    transform: none;
  }
  .ld-panel { min-height: 220px; padding: 12px; }
  .ld-stats { gap: 6px; }
  .ld-stat { padding: 6px 8px; }
  .ld-stat strong { font-size: 14px; }
  .ld-bug-row { grid-template-columns: 60px 1fr auto auto; gap: 6px; font-size: 10px; }
  .ld-report-summary { grid-template-columns: repeat(2, 1fr); }
}

/* ── Panel wrapper for tour overlay ──────────────────────── */
.ld-panel-wrap {
  position: relative;
}

/* ── Tour overlay ────────────────────────────────────────── */
.ld-tour-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(255,255,255,0.98) 60%, rgba(255,255,255,0.85) 85%, transparent);
  padding: 36px 16px 14px;
  animation: tour-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  pointer-events: auto;
}

@keyframes tour-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ld-tour-title {
  display: block;
  font-size: 13px;
  font-weight: 750;
  color: var(--text-strong);
  margin-bottom: 4px;
}

.ld-tour-desc {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.ld-tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.ld-tour-dots {
  display: flex;
  gap: 5px;
}

.ld-tour-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.25s ease;
}

.ld-tour-dot--active {
  width: 18px;
  border-radius: 3px;
  background: var(--accent);
}

.ld-tour-dot--pulse {
  animation: ld-pulse 1.2s ease-in-out infinite;
  background: var(--accent);
}

.ld-tour-end-btn {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ld-tour-end-btn:hover {
  color: var(--text-strong);
  border-color: var(--border-strong);
  background: var(--soft-bg);
}

/* ── Tour tab-bar pill ──────────────────────────────────── */
.lp-demo-tab-right {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.ld-tour-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--text-soft);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.ld-tour-tab-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.ld-tour-tab-btn--active {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.ld-tour-tab-btn--active:hover {
  background: #fef0f0;
  border-color: var(--danger);
  color: var(--danger);
}

/* ── Animated keyboard shortcuts in demo ──────────────────── */
.ld-kbd {
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--soft-bg);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.ld-kbd--active {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 25%, transparent);
}

.ld-kbd--pass {
  background: #e9f7ee !important;
  border-color: #22c55e !important;
  color: #1a6b37 !important;
}

.ld-kbd--fail {
  background: #fef0f0 !important;
  border-color: #ef4444 !important;
  color: #a93030 !important;
}

.ld-kbd--blocker {
  background: #fbe3e3 !important;
  border-color: #7f1d1d !important;
  color: #7f1d1d !important;
}

/* ── Enhanced demo tab transition ────────────────────────── */
.ld-panel {
  animation: ld-switch 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes ld-switch {
  0% {
    opacity: 0;
    transform: translateX(8px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes ld-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
  .lp-demo-tabs { padding: 4px; gap: 1px; }
  .lp-demo-tab { font-size: 10px; height: 28px; padding: 0 6px; }
  .ld-run-cases { gap: 4px; }
  .ld-run-case { min-width: 32px; padding: 4px 6px; }
  .ld-bug-row { grid-template-columns: 1fr auto; }
  .ld-bug-id, .ld-severity { display: none; }
  .ld-tour-overlay { padding: 28px 12px 12px; }
  .ld-tour-title { font-size: 12px; }
  .ld-tour-desc { font-size: 11px; }
}


/* Hero demo — auto-cycle panels (Dashboard → Runs → Bugs → Reports) */
.lp-demo-switch { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.lp-hero-visual { width: 100%; }
.lp-demo-switch-wrap { position: relative; width: 100%; max-width: 440px; margin-inline: auto; }

.lp-demo-panels {
  position: relative;
  min-height: 280px;
}

.lp-demo-panels .ld-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
  animation: lp-demo-panel 14s infinite;
}

.lp-demo-panels .ld-panel--dashboard { animation-delay: 0s; }
.lp-demo-panels .ld-panel--runs { animation-delay: 3.5s; }
.lp-demo-panels .ld-panel--bugs { animation-delay: 7s; }
.lp-demo-panels .ld-panel--reports { animation-delay: 10.5s; }

@keyframes lp-demo-panel {
  0% { opacity: 0; visibility: hidden; z-index: 1; }
  3%, 22% { opacity: 1; visibility: visible; z-index: 2; pointer-events: auto; }
  25%, 100% { opacity: 0; visibility: hidden; z-index: 1; pointer-events: none; }
}

.lp-demo-tabs label.lp-demo-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  animation: lp-demo-tab 14s infinite;
}

.lp-demo-tabs label[for="demo-dashboard"] { animation-delay: 0s; }
.lp-demo-tabs label[for="demo-runs"] { animation-delay: 3.5s; }
.lp-demo-tabs label[for="demo-bugs"] { animation-delay: 7s; }
.lp-demo-tabs label[for="demo-reports"] { animation-delay: 10.5s; }

@keyframes lp-demo-tab {
  0%, 22% {
    background: var(--surface);
    color: var(--text-strong);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  25%, 100% {
    background: transparent;
    color: var(--text-muted);
    box-shadow: none;
  }
}

.lp-demo-tabs label.lp-demo-tab:hover {
  color: var(--text-strong);
}

/* Manual tab click pauses auto-cycle and shows selected panel */
.lp-demo-switch-wrap:has(#demo-dashboard:checked) .lp-demo-panels .ld-panel,
.lp-demo-switch-wrap:has(#demo-runs:checked) .lp-demo-panels .ld-panel,
.lp-demo-switch-wrap:has(#demo-bugs:checked) .lp-demo-panels .ld-panel,
.lp-demo-switch-wrap:has(#demo-reports:checked) .lp-demo-panels .ld-panel,
.lp-demo-switch-wrap:has(.lp-demo-switch:checked) .lp-demo-tabs label.lp-demo-tab {
  animation: none !important;
}

.lp-demo-switch-wrap:has(#demo-dashboard:checked) .ld-panel--dashboard,
.lp-demo-switch-wrap:has(#demo-runs:checked) .ld-panel--runs,
.lp-demo-switch-wrap:has(#demo-bugs:checked) .ld-panel--bugs,
.lp-demo-switch-wrap:has(#demo-reports:checked) .ld-panel--reports {
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 2 !important;
  pointer-events: auto !important;
}

.lp-demo-switch-wrap:has(#demo-dashboard:checked) label[for="demo-dashboard"],
.lp-demo-switch-wrap:has(#demo-runs:checked) label[for="demo-runs"],
.lp-demo-switch-wrap:has(#demo-bugs:checked) label[for="demo-bugs"],
.lp-demo-switch-wrap:has(#demo-reports:checked) label[for="demo-reports"] {
  background: var(--surface) !important;
  color: var(--text-strong) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

@media (prefers-reduced-motion: reduce) {
  .lp-demo-panels .ld-panel,
  .lp-demo-tabs label.lp-demo-tab {
    animation: none !important;
  }
  .lp-demo-panels .ld-panel--dashboard {
    opacity: 1;
    visibility: visible;
    position: relative;
  }
}

/* Visible without JS scroll observer */
.lp-pillar, .lp-feature, .lp-step { opacity: 1; }
/* Contrast / visibility fixes for server-rendered landing */
.lp-h1,
.lp-section-head h2,
.lp-final h2,
.lp-pillar h3,
.lp-feature h3,
.lp-step h3 {
  color: var(--text-strong);
}
.lp-hero-copy,
.lp-hero-visual,
.lp-pillar,
.lp-feature,
.lp-step,
.lp-section-head,
.lp-wedge,
.lp-final {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}
.lp-nav {
  background: rgba(255, 255, 255, 0.92);
}

/* Force visible CTA label on teal buttons */
a.primary-button,
a.primary-button:visited,
a.primary-button:hover,
a.primary-button:active,
.primary-button.lp-nav-cta,
.primary-button.lp-cta-primary {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}
