:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: #0d1a2b;
  --panel-2: #12243a;
  --line: rgba(241, 232, 211, 0.13);
  --text: #f4edde;
  --muted: #aab6c8;
  --gold: #d7ad55;
  --blue: #58a6ff;
  --green: #5ad6a0;
  --danger: #ff7878;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(88, 166, 255, 0.16), transparent 34rem),
    linear-gradient(135deg, #07111f 0%, #0a1625 48%, #10131a 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: rgba(6, 15, 28, 0.92);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: grid;
  gap: 6px;
  padding: 0 8px 22px;
}

.brand-lockup strong {
  font-size: 20px;
  letter-spacing: 0;
}

.brand-lockup span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a,
.side-action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.nav a.active,
.nav a:hover,
.side-action:hover {
  color: var(--text);
  background: rgba(244, 237, 222, 0.08);
}

.side-action {
  margin-top: 18px;
  color: #07111f;
  background: var(--gold);
  justify-content: center;
  font-weight: 800;
}

.main {
  min-width: 0;
  padding: 30px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.private-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 12px;
  padding: 4px 9px;
  border: 1px solid rgba(215, 173, 85, 0.4);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(215, 173, 85, 0.09);
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 10px;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: 0;
}

.subhead {
  max-width: 840px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.hero-demo {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(rgba(7, 17, 31, 0.18), rgba(7, 17, 31, 0.82)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='1000' viewBox='0 0 1600 1000'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop stop-color='%230b1b2d'/%3E%3Cstop offset='.52' stop-color='%2317293f'/%3E%3Cstop offset='1' stop-color='%23070b12'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1600' height='1000' fill='url(%23g)'/%3E%3Cg fill='none' stroke='%23d7ad55' stroke-opacity='.28'%3E%3Cpath d='M90 740 C340 610 530 820 790 650 S1200 470 1510 560'/%3E%3Cpath d='M140 300 C390 210 580 400 820 280 S1230 170 1480 250'/%3E%3C/g%3E%3Cg fill='%2358a6ff' fill-opacity='.16'%3E%3Crect x='170' y='150' width='270' height='150' rx='18'/%3E%3Crect x='1060' y='610' width='330' height='180' rx='18'/%3E%3C/g%3E%3Cg fill='%23f4edde' fill-opacity='.08'%3E%3Ccircle cx='760' cy='500' r='190'/%3E%3Ccircle cx='1270' cy='220' r='110'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.demo-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px clamp(18px, 5vw, 70px);
}

.demo-content {
  align-self: end;
  padding: 0 clamp(18px, 5vw, 70px) 12vh;
}

.demo-content h1 {
  max-width: 760px;
}

.demo-content p {
  max-width: 680px;
  color: #d6dfec;
  font-size: 18px;
  line-height: 1.6;
}

.public-demo-main {
  max-width: 1180px;
  margin: 0 auto;
}

.public-product .demo-content,
.demo-hub .demo-content {
  padding-bottom: 10vh;
}

.public-section {
  margin: 16px 0;
}

.grid {
  display: grid;
  gap: 16px;
}

.command-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid rgba(215, 173, 85, 0.32);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(215, 173, 85, 0.12), rgba(88, 166, 255, 0.08));
  box-shadow: var(--shadow);
}

.command-strip h2 {
  margin-bottom: 6px;
}

.cta-large {
  min-width: 190px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid.cols-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.card,
.form-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 26, 43, 0.82);
  box-shadow: var(--shadow);
}

.card {
  padding: 18px;
}

.card h2,
.card h3 {
  margin-bottom: 10px;
}

.card p,
.meta,
.small {
  color: var(--muted);
  line-height: 1.55;
}

.metric {
  display: grid;
  gap: 8px;
}

.metric strong {
  font-size: 32px;
}

.mini-metric {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.mini-metric strong {
  font-size: 24px;
}

.trial-section {
  margin-bottom: 16px;
}

.trial-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.pill.step-complete {
  border-color: rgba(90, 214, 160, 0.45);
  color: var(--green);
}

.pill.step-current {
  border-color: rgba(215, 173, 85, 0.55);
  color: var(--gold);
}

.board-column {
  display: grid;
  gap: 10px;
  align-content: start;
}

.compact-field {
  margin-bottom: 8px;
}

.compact-field textarea {
  min-height: 84px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 8px;
  color: var(--text);
  background: rgba(244, 237, 222, 0.1);
  border: 1px solid var(--line);
  font-weight: 750;
}

.btn.primary {
  color: #08111d;
  background: var(--gold);
  border-color: transparent;
}

.btn.blue {
  color: #06101d;
  background: var(--blue);
  border-color: transparent;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.list {
  display: grid;
  gap: 12px;
}

.list-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.form-card {
  padding: 18px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.notice {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(88, 166, 255, 0.35);
  border-radius: 8px;
  color: var(--text);
  background: rgba(88, 166, 255, 0.1);
}

.notice span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.notice.warning {
  border-color: rgba(215, 173, 85, 0.45);
  background: rgba(215, 173, 85, 0.1);
}

.field label {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

select,
textarea,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(4, 10, 19, 0.8);
  outline: none;
}

select,
input {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 190px;
  resize: vertical;
  padding: 12px;
  line-height: 1.5;
}

.memory-textarea {
  min-height: 92px;
}

.output-card pre,
.prompt-body,
.session-body {
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #e7edf7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
}

.output-card {
  border-left: 3px solid var(--blue);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  margin-right: 6px;
  background: var(--green);
}

.empty {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  padding: 12px 14px;
  border-radius: 8px;
  color: #07111f;
  background: var(--gold);
  box-shadow: var(--shadow);
  font-weight: 800;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .grid.cols-5,
  .grid.cols-6,
  .split,
  .command-strip {
    grid-template-columns: 1fr;
  }

  .command-strip {
    display: grid;
  }
}

@media (max-width: 620px) {
  .main {
    padding: 20px 14px;
  }

  .topbar {
    display: grid;
  }

  .nav {
    grid-template-columns: 1fr;
  }
}
