:root {
  color-scheme: dark;
  --bg-base: #101012;
  --bg-raised: #141416;
  --bg-surface: #1d1d21;
  --bg-elevated: #26262b;
  --text-primary: #ececef;
  --text-secondary: #a0a0a8;
  --text-muted: #6b6b74;
  --accent: #4d8dff;
  --accent-soft: rgb(77 141 255 / 14%);
  --accent-glow: rgb(77 141 255 / 28%);
  --agent-violet: #8b7cf6;
  --border-subtle: rgb(255 255 255 / 5.5%);
  --border-default: rgb(255 255 255 / 8%);
  --border-strong: rgb(255 255 255 / 13%);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg-base);
}

a {
  color: inherit;
}

.landing-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  --grid-line: rgb(255 255 255 / 1.5%);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, black 22%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, black 22%, transparent 85%);
}

.landing-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 40% 30% at 80% 20%, rgb(139 124 246 / 12%), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% -10%, rgb(77 141 255 / 18%), transparent 70%);
}

.landing-shell {
  position: relative;
  width: min(100%, 72rem);
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0 2rem;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
}

.brand-tag {
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.875rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 150ms ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.nav-cta:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.hero {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 44rem;
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(2.4rem, 5.5vw, 3.9rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-wrap: balance;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--agent-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 34rem;
  margin: 1.4rem 0 0;
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  line-height: 1.65;
}

.command-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2.4rem;
  padding: 0.95rem 1.2rem;
  border: 1px solid var(--border-default);
  border-radius: 0.9rem;
  background: linear-gradient(180deg, rgb(29 29 33 / 80%) 0%, rgb(20 20 22 / 60%) 100%);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 3%) inset,
    0 16px 48px rgb(0 0 0 / 35%);
}

.command-card code {
  white-space: nowrap;
  color: var(--text-primary);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
}

.prompt {
  color: var(--agent-violet);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 500;
}

.notes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.1rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: var(--text-muted);
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
}

footer a {
  text-decoration: none;
  transition: color 150ms ease;
}

footer a:hover {
  color: var(--text-secondary);
}

.viewer-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: #0b0c0f;
}

.viewer-bar {
  display: flex;
  flex: 0 0 3.6rem;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 12, 15, 0.94);
  backdrop-filter: blur(18px);
}

.brand.compact {
  font-size: 0.82rem;
}

.brand.compact .brand-logo {
  width: 1.625rem;
  height: 1.625rem;
}

.viewer-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.privacy-label {
  color: #73747c;
  font-size: 0.72rem;
}

.copy-button {
  min-width: 5rem;
  padding: 0.48rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.55rem;
  background: #17181d;
  color: #e9e9ed;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.copy-button:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: #1c1d23;
}

.plan-stage {
  position: relative;
  min-height: 0;
  flex: 1;
  background: #f7f7f8;
}

#plan-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}

.plan-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.85rem;
  color: #858691;
  text-align: center;
}

.plan-state[hidden] {
  display: none;
}

.plan-state p {
  margin: 0;
  font-size: 0.84rem;
}

.loader {
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid #d9dae0;
  border-top-color: #7362f0;
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.error-state {
  color: #7c7d86;
}

.error-state h1 {
  color: #24252a;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.error-state a {
  color: #6252d7;
  font-size: 0.8rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .landing-shell {
    padding: 0 1.25rem;
  }

  .brand-tag {
    display: none;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-cta {
    padding: 0.45rem 0.8rem;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 8.5vw, 2.6rem);
  }

  .command-card {
    max-width: 100%;
    overflow-x: auto;
  }

  .notes .dot {
    display: none;
  }

  .notes {
    flex-direction: column;
    gap: 0.4rem;
  }

  .privacy-label {
    display: none;
  }
}
