@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Sora:wght@400;600;700;800&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  --bg: #09111a;
  --bg-soft: #0f1b28;
  --card: #0f1b29ee;
  --line: #2d4358;
  --line-soft: #223547;
  --text: #edf4fb;
  --muted: #9db2c8;
  --accent: #ff7d54;
  --accent2: #58d2ff;
  --good: #57e2bb;
  --warn: #ffd184;
  --radius: 16px;
  --shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 12% 10%, #1a2c3d 0, transparent 36%),
    radial-gradient(circle at 87% 0%, #34213c 0, transparent 26%),
    linear-gradient(160deg, var(--bg), #080f17 75%);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: 'Sora', sans-serif; margin: 0; }
p { margin: 0; }
small { color: var(--muted); }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #0a1622;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .16rem .38rem;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .56rem .84rem;
  background: #122334;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}
.btn.solid {
  background: linear-gradient(110deg, var(--accent), #ffa15f);
  border-color: transparent;
  color: #1b100a;
}
.btn.ghost { background: #102132; }

.logo-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  box-shadow: 0 0 18px rgba(88, 210, 255, 0.55);
}

/* Keep landing page intact */
.landing-body .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .7rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(7, 14, 22, 0.85);
  backdrop-filter: blur(12px);
}
.landing-body .logo-wrap { display: flex; align-items: center; gap: .65rem; }
.landing-body .logo-word { font-weight: 700; letter-spacing: .03em; }
.landing-body .topnav { display: flex; gap: 1.25rem; color: var(--muted); }
.landing-body .actions { display: flex; gap: .6rem; }
.landing-body main { max-width: 1220px; margin: 0 auto; padding: 1.3rem 2rem 3rem; }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: .9rem; margin-bottom: .9rem; }
.hero-copy, .hero-panel, .workflow, .pricing, .feature-grid article {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.hero-copy { padding: 1.6rem; }
.hero-panel { padding: 1rem; }
.eyebrow { color: var(--good); font-size: .78rem; letter-spacing: .1em; margin-bottom: .7rem; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.05; margin-bottom: .8rem; }
.hero h1 span { display: block; color: #ffd489; font-family: 'DM Serif Display', serif; font-style: italic; }
.subcopy { color: var(--muted); margin-bottom: .95rem; max-width: 56ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: .55rem; margin: .65rem 0 .95rem; }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.hero-stats article { border: 1px solid var(--line); border-radius: 12px; background: #0d1926; padding: .62rem; }
.hero-stats strong { display: block; color: var(--accent2); }
.hero-stats span { font-size: .8rem; color: var(--muted); }
.panel-head, .panel-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.panel-head { margin-bottom: .6rem; }
.badge { border: 1px solid #365168; border-radius: 999px; padding: .18rem .56rem; font-size: .76rem; background: #0e2231; }
.badge.running { color: var(--good); border-color: #2f6355; background: #0f2a23; }
.pipeline-mini { display: grid; gap: .4rem; margin-bottom: .5rem; }
.stage { border: 1px solid var(--line); border-radius: 10px; background: #0d1825; padding: .5rem .58rem; display: flex; justify-content: space-between; gap: .4rem; font-size: .83rem; }
.stage.done { border-color: #2f6056; color: #c8f8e8; }
.stage.running { border-color: #634f7c; color: #f3deff; }
.inline-link { color: var(--accent2); font-size: .83rem; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .65rem; margin-bottom: .9rem; }
.feature-grid article { padding: .9rem; }
.feature-grid p { color: var(--muted); font-size: .86rem; margin-top: .38rem; }
.why-different {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: .95rem;
  margin-bottom: .9rem;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .55rem;
  margin-top: .65rem;
}
.why-grid article {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d1724;
  padding: .82rem;
}
.why-grid p {
  color: var(--muted);
  font-size: .86rem;
  margin-top: .35rem;
}
.workflow, .pricing { padding: .95rem; margin-bottom: .8rem; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .55rem; margin-top: .65rem; }
.steps div { border: 1px dashed #3a5269; border-radius: 12px; padding: .68rem; }
.steps span { color: #ffd186; font-weight: 700; display: block; margin-bottom: .3rem; }
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .55rem; margin-top: .65rem; }
.tiers article { border: 1px solid var(--line); border-radius: 12px; background: #0d1724; padding: .86rem; }
.tiers article.featured { border-color: #ff9c63; box-shadow: 0 0 0 1px #ff9c63 inset; }
.price { font-size: 1.65rem; font-weight: 800; margin: .35rem 0 .48rem; }
.price span { font-size: 1rem; color: var(--muted); }
.tiers ul { margin: 0; padding-left: 1rem; color: var(--muted); }
.footer { display: flex; justify-content: space-between; gap: .6rem; padding: 1rem 2rem 1.6rem; color: var(--muted); }
.footer a { color: var(--accent2); }

/* App polished */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}
.sidebar {
  border-right: 1px solid var(--line-soft);
  background: rgba(9, 16, 24, 0.94);
  padding: .95rem;
  display: flex;
  flex-direction: column;
  gap: .95rem;
}
.brand { display: flex; gap: .65rem; align-items: center; }
.brand small { display: block; color: var(--muted); }
.side-nav { display: grid; gap: .42rem; }
.nav-link {
  border: 1px solid #30485e;
  border-radius: 10px;
  background: #102132;
  color: var(--text);
  text-align: left;
  padding: .55rem .62rem;
  cursor: pointer;
}
.nav-link.active { border-color: #6082a2; background: #173149; }
.sidebar-meta { margin-top: auto; display: grid; gap: .35rem; }
.sidebar-meta label, .field-label { font-size: .8rem; color: var(--muted); }

.main {
  padding: .85rem;
  padding-bottom: 4.7rem;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: .9rem;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  margin-bottom: .7rem;
}
.topbar-copy h1 { font-size: 1.4rem; margin-bottom: .2rem; }
.topbar-copy p { color: var(--muted); font-size: .9rem; }
.topbar-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.wizard {
  max-width: 980px;
  margin: 0 auto;
}
.wizard-header {
  margin-bottom: .72rem;
}
.wizard-status {
  margin-bottom: .45rem;
}
.kicker {
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .2rem;
}
.wizard-status h2 { font-size: 1.12rem; }
.wizard-progress-wrap { width: 100%; }
.wizard-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #1a3043;
  overflow: hidden;
}
.wizard-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #ffbe6d);
  transition: width .25s ease;
}

.step-screen { display: none; opacity: 0; transform: translateY(6px); }
.step-screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .2s ease, transform .2s ease;
}
.step-help {
  color: var(--muted);
  margin-bottom: .6rem;
  font-size: .9rem;
}
.stack { margin-top: .55rem; }

.segmented {
  border: 1px solid #334b61;
  border-radius: 999px;
  background: #0d1825;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
}
.segmented.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.segmented.modes {
  max-width: 430px;
}
.seg {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: .36rem .38rem;
  font-size: .78rem;
  cursor: pointer;
}
.seg.active { background: #183149; color: #e8f3ff; }

.token-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .38rem;
}
.token {
  border: 1px solid #355069;
  border-radius: 999px;
  background: #0f1f2e;
  color: var(--text);
  font-size: .76rem;
  padding: .24rem .56rem;
  cursor: pointer;
}
.token.selected {
  border-color: #54d7ba;
  background: #0f2b24;
  color: #d3fff2;
}

.choice-list { display: grid; gap: .42rem; }
.choice {
  border: 1px solid #30495f;
  border-radius: 10px;
  background: #0e1b29;
  padding: .54rem .58rem;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.choice strong { display: block; margin-bottom: .15rem; }
.choice.active { border-color: #71cbff; background: #123149; }

.wizard-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}
.compact-gap { margin-top: .58rem; }

.pane {
  border: 1px solid #2f455c;
  border-radius: 12px;
  background: #0d1825;
  padding: .55rem;
}
.pane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  margin-bottom: .48rem;
}
.field-note {
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: .45rem;
}

.pill-tabs {
  border: 1px solid #31485f;
  border-radius: 999px;
  background: #0d1a27;
  display: inline-flex;
  gap: 2px;
  padding: 2px;
}
.pill {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: .24rem .52rem;
  font-size: .74rem;
  cursor: pointer;
}
.pill.active { background: #173149; color: #e7f3ff; }
.pill-panel { display: none; }
.pill-panel.active { display: block; }

.advanced {
  margin-top: .58rem;
  border: 1px dashed #3a5369;
  border-radius: 10px;
  padding: .45rem .55rem;
}
.advanced summary { cursor: pointer; color: #dceaf8; }
.advanced textarea { margin-top: .5rem; }

.control-stack { display: grid; gap: .48rem; }
.control-item {
  border: 1px solid #30495f;
  border-radius: 12px;
  background: #0e1a28;
  padding: .56rem;
  display: grid;
  gap: .45rem;
}
.control-copy strong { display: block; margin-bottom: .14rem; }
.control-copy small { color: var(--muted); }
.color-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
}
.notice {
  border: 1px dashed #5b6a78;
  border-radius: 10px;
  background: #141d26;
  color: #d7e2ee;
  padding: .6rem;
  font-size: .84rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
  margin-bottom: .62rem;
}
.summary-grid article {
  border: 1px solid #30495f;
  border-radius: 10px;
  background: #0e1a28;
  padding: .52rem .56rem;
}
.summary-grid strong { display: block; margin-bottom: .18rem; }
.finish-box {
  border: 1px solid #324a60;
  border-radius: 12px;
  background: #102132;
  padding: .62rem;
}
.finish-box h3 { margin-bottom: .22rem; }
.finish-box p { color: var(--muted); font-size: .88rem; }

.wizard-footer {
  margin-top: .72rem;
  border-top: 1px solid #2a4054;
  padding-top: .65rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
}
.wizard-footer-right {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.wizard-footer .btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.card-head.compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .55rem;
  margin-bottom: .48rem;
}

.run-card {
  border: 1px solid #30495f;
  border-radius: 12px;
  background: #0e1a28;
  padding: .55rem;
  margin-bottom: .58rem;
}
.run-card strong { display: block; margin-bottom: .1rem; }
.progress-wrap {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: #1a3144;
  overflow: hidden;
  margin-top: .45rem;
}
.progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #ffbe6c); }
.stage-list { display: grid; gap: .35rem; margin-bottom: .55rem; }
.stage-list div {
  border: 1px solid #314a61;
  border-radius: 10px;
  background: #0d1825;
  padding: .45rem .54rem;
  display: flex;
  justify-content: space-between;
  gap: .4rem;
  font-size: .83rem;
}
.ok { color: var(--good); }
.run { color: var(--warn); }
.logbox {
  min-height: 110px;
  border: 1px solid #30495f;
  border-radius: 10px;
  background: #08131f;
  color: #c5d9ed;
  padding: .65rem;
  font-size: .81rem;
  overflow-x: auto;
}

.table-tools {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: .48rem;
  margin-bottom: .52rem;
}
.history-cards { display: grid; gap: .42rem; }
.history-cards article {
  border: 1px solid #30495f;
  border-radius: 10px;
  background: #0e1a28;
  padding: .52rem .56rem;
}
.history-cards strong { display: block; margin-bottom: .14rem; }

.download-list { display: grid; gap: .4rem; margin: .55rem 0 .62rem; }
.dl {
  border: 1px solid #345068;
  border-radius: 10px;
  background: #102132;
  padding: .56rem;
  font-size: .84rem;
}
.dl:hover { border-color: #74ceff; }

.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 12, 19, 0.96);
  border-top: 1px solid #2b4054;
  padding: .4rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .32rem;
  z-index: 40;
}
.mobile-nav .nav-link {
  text-align: center;
  padding: .48rem .25rem;
  font-size: .74rem;
}

.desktop-only { display: block; }
.mobile-only { display: none; }

@media (max-width: 980px) {
  .hero, .feature-grid, .steps, .tiers, .why-grid { grid-template-columns: 1fr; }
  .landing-body .topbar { flex-wrap: wrap; padding: .8rem 1rem; }
  .landing-body main { padding: .9rem 1rem 2rem; }
  .landing-body .actions { width: 100%; }
  .landing-body .actions .btn { flex: 1; text-align: center; }
  .hero-copy, .hero-panel, .workflow, .pricing, .why-different, .feature-grid article { border-radius: 16px; }
  .hero-copy { padding: 1rem; }
  .hero-panel { padding: .8rem; }
  .hero-stats { grid-template-columns: 1fr; }
  .feature-grid article { padding: .75rem; }
  .workflow, .pricing, .why-different { padding: .8rem; }
  .footer { flex-direction: column; }

  .app-shell { grid-template-columns: 1fr; }
  .desktop-only { display: none; }
  .mobile-only { display: grid; }

  .main {
    padding: .62rem;
    padding-bottom: 4.4rem;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: .62rem;
  }

  .wizard {
    padding: .75rem;
  }

  .wizard-grid-2,
  .summary-grid,
  .color-group,
  .table-tools {
    grid-template-columns: 1fr;
  }

  .wizard-footer {
    position: sticky;
    bottom: 3.45rem;
    background: rgba(10, 17, 25, 0.95);
    border-top: 1px solid #2b4156;
    margin-left: -.1rem;
    margin-right: -.1rem;
    padding: .55rem .1rem 0;
  }

  .wizard-footer-right {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 700px) {
  .landing-body .topnav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid #23384b;
    padding-top: .55rem;
    font-size: .9rem;
  }

  .landing-body .logo-word {
    font-size: .96rem;
    letter-spacing: .02em;
  }

  .landing-body .actions {
    order: 2;
    gap: .45rem;
  }

  .landing-body .actions .btn {
    padding: .62rem .58rem;
    font-size: .88rem;
  }

  .hero h1 {
    font-size: clamp(1.55rem, 9vw, 2.15rem);
    line-height: 1.08;
  }

  .subcopy {
    font-size: .94rem;
    line-height: 1.45;
  }

  .cta-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cta-row .btn {
    width: 100%;
    text-align: center;
    padding: .68rem .72rem;
  }

  .panel-head, .panel-foot, .stage {
    font-size: .82rem;
  }

  .tiers article {
    padding: .74rem;
  }

  .footer {
    padding: .8rem 1rem 1.1rem;
    font-size: .9rem;
  }
}
