:root {
  --void: #03040a;
  --ink: #f3f1fb;
  --muted: #a9a5c2;
  --faint: #8a86a6;
  --line: rgba(200, 190, 255, 0.12);
  --line-2: rgba(200, 190, 255, 0.24);
  --glass: rgba(10, 11, 24, 0.58);
  --glass-2: rgba(14, 15, 32, 0.78);
  --violet: #b9acff;
  --violet-deep: #8e7bff;
  --teal: #72e5d3;
  --flare: #ff8a5c;
  --amber: #f5c451;
  --ok: #7de3a6;

  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--void);
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: var(--void);
  color: var(--ink);
  font: 15px/1.5 var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--void);
  pointer-events: none;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 12px;
}

::-moz-selection {
  background: rgba(185, 172, 255, 0.35);
  color: #fff;
}

::selection {
  background: rgba(185, 172, 255, 0.35);
  color: #fff;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mono,
.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

svg {
  flex: none;
}

[hidden] {
  display: none !important;
}

/* Fixed galaxy background */

#sky {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
}

/* Navigation */

.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;

  display: flex;
  align-items: center;
  gap: 12px;

  margin-top: 14px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;

  background: rgba(6, 7, 16, 0.55);
  border: 1px solid var(--line);

  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;

  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand svg {
  animation: spin 30s linear infinite;
}

.brand span {
  font-family: var(--display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;

  height: 44px;
  width: min(300px, 100%);
  padding: 0 10px 0 14px;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--faint);

  transition:
    border-color 0.25s,
    background 0.25s,
    width 0.35s var(--ease);
}

.search:focus-within {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.06);
  width: min(380px, 100%);
}

.search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: var(--ink);
  font-size: 14px;
}

.search input::-moz-placeholder {
  color: var(--faint);
}

.search input::placeholder {
  color: var(--faint);
}

.search input::-webkit-search-cancel-button {
  cursor: pointer;
}

kbd {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 1px 6px;
}

.top-fleet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;

  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;

  transition:
    color 0.2s,
    background 0.2s,
    border-color 0.2s;
}

.top-fleet:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-2);
}

/* Page transition */

.view {
  animation: view-in 0.6s var(--ease) both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;

  padding-block: 96px 245px;
  scroll-margin-top: 100px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
  animation: pulse-teal 2.4s infinite;
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(42px, 7vw, 100px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
  text-shadow: 0 0 50px rgba(150, 130, 255, 0.35);
}

.hero h1 .line {
  display: block;
  animation: rise 1.1s var(--ease) both;
}

.hero h1 .line + .line {
  animation-delay: 0.12s;
}

.hero h1 strong {
  font-weight: 600;

  background: linear-gradient(
    90deg,
    #cfc5ff 0%,
    #fff 25%,
    #9cede0 50%,
    #cfc5ff 75%,
    #fff 100%
  );

  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  animation: shimmer 8s linear infinite;
}

.hero-description {
  max-width: 540px;
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  text-wrap: pretty;
  animation: rise 1.1s 0.18s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(10px);
  }

  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* Workflow composer */

.composer {
  position: relative;
  width: 100%;
  max-width: 680px;
  padding: 1px;
  border-radius: 26px;
  text-align: left;

  background: linear-gradient(
    140deg,
    rgba(185, 172, 255, 0.55),
    rgba(185, 172, 255, 0.08) 35%,
    rgba(114, 229, 211, 0.08) 65%,
    rgba(114, 229, 211, 0.45)
  );

  box-shadow:
    0 30px 100px -30px rgba(142, 123, 255, 0.7);

  animation: rise 1.1s 0.25s var(--ease) both;
}

.composer-in {
  display: flex;
  flex-direction: column;
  border-radius: 25px;

  background: rgba(7, 8, 18, 0.82);

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 84px;
  max-height: 220px;

  padding: 18px 20px 6px;
  resize: none;

  border: 0;
  border-radius: 25px 25px 0 0;
  outline: none;
  background: none;

  color: var(--ink);
  font-size: 17px;
  line-height: 1.5;
}

.composer textarea::-moz-placeholder {
  color: var(--faint);
}

.composer textarea::placeholder {
  color: var(--faint);
}

.composer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 14px;
}

.pill {
  position: relative;

  display: inline-flex;
  align-items: center;
  gap: 7px;

  height: 38px;
  padding: 0 12px;
  border-radius: 999px;

  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);

  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;

  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}

.pill:hover,
.pill:focus-within {
  border-color: var(--line-2);
  color: var(--ink);
}

.pill select {
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;

  padding: 0 16px 0 0;
  border: 0;
  outline: none;
  background: none;

  color: inherit;
  font-size: 13px;
  cursor: pointer;
}

.pill select option {
  background: #0e0f20;
  color: var(--ink);
}

.pill .chev {
  position: absolute;
  right: 10px;
  pointer-events: none;
}

.model-pill {
  cursor: default;
}

.hint {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.launch {
  display: grid;
  place-items: center;
  flex: none;

  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;

  color: #05060c;

  background: radial-gradient(
    circle at 32% 28%,
    #fff,
    #e2dbff 55%,
    #a595ff
  );

  box-shadow:
    0 0 0 0 rgba(185, 172, 255, 0.6),
    0 0 30px rgba(185, 172, 255, 0.55);

  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s,
    opacity 0.2s;
}

.launch:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.04);

  box-shadow:
    0 0 0 6px rgba(185, 172, 255, 0.12),
    0 0 40px rgba(185, 172, 255, 0.8);
}

.launch:disabled {
  opacity: 0.4;
  transform: none;
}

.launch.go {
  animation: liftoff 0.7s var(--ease);
}

@keyframes liftoff {
  40% {
    transform: translateY(-10px) scale(0.9);
  }

  100% {
    transform: none;
  }
}

/* Example workflow chips */

.examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;

  width: 100%;
  max-width: 760px;
  margin-top: -12px;

  animation: rise 1.1s 0.35s var(--ease) both;
}

.example-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 34px;
  padding: 6px 13px;

  border: 1px solid var(--line);
  border-radius: 999px;

  background: rgba(10, 11, 24, 0.58);
  color: var(--muted);

  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s,
    transform 0.25s var(--ease);
}

.example-chip:hover {
  color: var(--ink);
  border-color: rgba(185, 172, 255, 0.45);
  background: rgba(185, 172, 255, 0.09);
  transform: translateY(-2px);
}

.composer-error {
  width: 100%;
  max-width: 680px;
  margin: -12px 0 0;
  padding: 12px 16px;

  border: 1px solid rgba(255, 138, 92, 0.32);
  border-radius: 14px;

  background: rgba(255, 138, 92, 0.08);
  color: #ffc1aa;
  text-align: left;
  font-size: 13px;
}

/* Fleet */

.fleet {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-block: 0 120px;
  scroll-margin-top: 100px;
}

.fleet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}

.fleet h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;

  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.fleet h2 .n {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--faint);
}

.tabs {
  position: relative;

  display: flex;
  gap: 2px;

  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;

  background: var(--glass);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  z-index: 1;

  display: inline-flex;
  align-items: center;
  gap: 7px;

  height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;

  background: none;
  color: var(--muted);

  font-size: 13px;
  white-space: nowrap;

  transition: color 0.25s;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected="true"],
.tab[aria-pressed="true"] {
  color: #05060c;
  font-weight: 600;
}

.tab .c {
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.7;
}

.tab-ink {
  position: absolute;
  z-index: 0;

  top: 4px;
  left: 4px;

  height: 36px;
  border-radius: 999px;

  background: var(--ink);
  box-shadow: 0 0 22px rgba(185, 172, 255, 0.45);

  transition:
    left 0.4s var(--ease),
    width 0.4s var(--ease);
}

.sort {
  margin-left: auto;
}

.fetch-error {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid rgba(255, 138, 92, 0.32);
  border-radius: 14px;

  background: rgba(255, 138, 92, 0.08);
  color: #ffc1aa;
  font-size: 13px;
}

/* Agent cards */

.grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(min(100%, 290px), 1fr)
  );
  gap: 18px;
}

.card {
  position: relative;
  min-width: 0;
  padding: 8px;

  border: 1px solid var(--line);
  border-radius: 22px;

  background: var(--glass);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  transition:
    transform 0.45s var(--ease),
    border-color 0.35s,
    box-shadow 0.45s;

  animation: card-in 0.7s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;

  pointer-events: none;
  opacity: 0;

  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 0%),
    rgba(185, 172, 255, 0.16),
    transparent 70%
  );

  transition: opacity 0.35s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--line-2);

  box-shadow:
    0 30px 70px -28px rgba(142, 123, 255, 0.6);
}

.card:hover::before {
  opacity: 1;
}

.card.is-running {
  border-color: rgba(185, 172, 255, 0.42);
  box-shadow:
    0 0 60px -18px rgba(142, 123, 255, 0.6);
}

.card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

.card-link:focus-visible {
  outline-offset: 2px;
  border-radius: 22px;
}

.card .shot {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 10;

  border-radius: 15px;
  overflow: hidden;
  background: #090a15;
}

.frame-image {
  display: block;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: center top;
     object-position: center top;
  background: #090a15;
}

.host {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 10px;

  max-width: calc(100% - 20px);
  padding: 3px 8px;
  border-radius: 7px;

  background: rgba(4, 5, 10, 0.72);
  color: #e7e4f4;

  font-family: var(--mono);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.scan {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: -20%;

  height: 16%;

  background: linear-gradient(
    transparent,
    rgba(185, 172, 255, 0.35),
    transparent
  );

  animation: scan 2.8s linear infinite;
  pointer-events: none;
}

@keyframes scan {
  to {
    top: 110%;
  }
}

.progress {
  position: absolute;
  left: 0;
  bottom: 0;

  width: 100%;
  height: 3px;
  background: rgba(185, 172, 255, 0.18);
  overflow: hidden;
}

.progress::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;

  background: linear-gradient(
    90deg,
    transparent,
    var(--violet),
    transparent
  );

  animation: indet 1.6s ease-in-out infinite;
}

@keyframes indet {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(260%);
  }
}

.dead {
  position: absolute;
  inset: 0;

  background: rgba(6, 4, 8, 0.55);

  backdrop-filter: grayscale(1) blur(1px);
  -webkit-backdrop-filter: grayscale(1) blur(1px);
}

.scr {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.scr-none {
  display: grid;
  place-items: center;

  background: repeating-linear-gradient(
    135deg,
    #0b0a12 0 12px,
    #08070e 12px 24px
  );

  color: var(--faint);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 14px 8px 6px;
}

.card-meta h3 {
  flex: 1;
  min-width: 0;
  margin: 0;

  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-s {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.card-details {
  display: flex;
  flex-direction: column;
  gap: 9px;

  padding: 5px 8px 10px;
}

.card-next {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;

  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
}

.card-next span:last-child {
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.card-result {
  margin: 0;
  min-width: 0;

  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Fleet statuses */

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;

  background: var(--c, var(--faint));
}

.st-running {
  --c: var(--violet);
}

.st-waiting,
.st-needs {
  --c: var(--amber);
}

.st-scheduled {
  --c: var(--teal);
}

.st-done {
  --c: var(--ok);
}

.st-failed {
  --c: var(--flare);
}

.st-running .dot,
.dot.st-running {
  box-shadow: 0 0 10px var(--violet);
  animation: pulse-v 1.8s infinite;
}

.st-failed .dot {
  box-shadow: 0 0 8px rgba(255, 138, 92, 0.4);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  height: 30px;
  padding: 0 12px;
  border-radius: 999px;

  font-family: var(--mono);
  font-size: 12px;
  color: var(--c);

  border: 1px solid
    color-mix(in srgb, var(--c) 45%, transparent);

  background: color-mix(
    in srgb,
    var(--c) 10%,
    transparent
  );
}

@keyframes pulse-v {
  0% {
    box-shadow: 0 0 0 0 rgba(185, 172, 255, 0.6);
  }

  100% {
    box-shadow: 0 0 0 9px rgba(185, 172, 255, 0);
  }
}

@keyframes pulse-f {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 138, 92, 0.6);
  }

  100% {
    box-shadow: 0 0 0 9px rgba(255, 138, 92, 0);
  }
}

@keyframes pulse-teal {
  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

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

/* New agent card and empty states */

.newcard {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;

  min-height: 250px;
  border: 1px dashed var(--line-2);
  border-radius: 22px;

  color: var(--violet);
  background: none;
  font-family: var(--mono);
  font-size: 12px;

  transition:
    background 0.3s,
    border-color 0.3s;

  animation: card-in 0.7s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}

.newcard:hover {
  background: rgba(185, 172, 255, 0.05);
  border-color: rgba(185, 172, 255, 0.5);
}

.orbit-plus {
  position: relative;

  display: grid;
  place-items: center;

  width: 62px;
  height: 62px;
  border: 1px solid rgba(185, 172, 255, 0.4);
  border-radius: 50%;
}

.orbit-plus::after {
  content: "";
  position: absolute;
  inset: -12px;

  border: 1px dashed rgba(185, 172, 255, 0.25);
  border-radius: 50%;

  animation: spin 18s linear infinite;
}

.orbit-plus::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 28px;

  width: 6px;
  height: 6px;
  border-radius: 50%;

  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);

  transform-origin: 3px 46px;
  animation: spin 6s linear infinite;
}

.empty {
  grid-column: 1 / -1;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;

  min-height: 240px;
  padding: 56px 16px;

  border: 1px dashed var(--line);
  border-radius: 22px;

  color: var(--muted);
  text-align: center;
}

.empty-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 38px;
  padding: 0 16px;

  border: 1px solid var(--line-2);
  border-radius: 999px;

  background: rgba(185, 172, 255, 0.08);
  color: var(--violet);
  font-size: 13px;
}

.empty-action:hover {
  background: rgba(185, 172, 255, 0.15);
}

/*
 * Shared styles retained for /new and /agents.
 *
 * These cover the design's general-purpose buttons, chips,
 * agent headings, browser stage, timeline, artifacts, and
 * message composer.
 *
 * Home-specific legacy styles are not retained.
 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 44px;
  padding: 0 18px 0 15px;
  border-radius: 999px;

  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);

  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;

  transition:
    background 0.2s,
    transform 0.25s var(--ease),
    box-shadow 0.25s;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

.btn-primary {
  border: 0;
  color: #05060c;

  background: radial-gradient(
    circle at 30% 20%,
    #fff,
    #e2dbff 60%,
    #b3a5ff
  );

  box-shadow: 0 0 28px rgba(185, 172, 255, 0.45);
}

.btn-primary:hover {
  color: #05060c;
  background: radial-gradient(
    circle at 30% 20%,
    #fff,
    #ece7ff 60%,
    #c2b6ff
  );
  transform: translateY(-1px);
}

.btn:disabled,
.btn-primary:disabled {
  opacity: 0.45;
  transform: none;
}

.icon-btn {
  display: grid;
  place-items: center;
  flex: none;

  width: 44px;
  height: 44px;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);

  color: var(--muted);

  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s,
    transform 0.2s var(--ease);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border-color: var(--line-2);
}

.icon-btn:active {
  transform: scale(0.94);
}

.agent {
  display: flex;
  flex-direction: column;
  gap: 22px;

  padding-block: 28px 80px;
}

.a-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 20px;
}

.a-title {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.a-title .row1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.a-title h1 {
  margin: 0;

  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.035em;

  word-break: break-word;

  animation: rise 0.8s var(--ease) both;
}

.a-task {
  max-width: 72ch;
  margin: 0;

  color: var(--muted);
  font-size: 15px;
  text-wrap: pretty;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);

  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);

  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.chip b {
  font-weight: 500;
  color: var(--ink);
}

.a-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.a-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(300px, 380px);
  gap: 22px;
  align-items: start;
}

.stage-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.stage {
  position: relative;
  padding: 1px;
  border-radius: 24px;

  background: linear-gradient(
    150deg,
    rgba(185, 172, 255, 0.6),
    rgba(185, 172, 255, 0.06) 35%,
    rgba(114, 229, 211, 0.06) 70%,
    rgba(114, 229, 211, 0.4)
  );

  box-shadow:
    0 50px 140px -50px rgba(142, 123, 255, 0.6);

  animation: rise 0.9s 0.05s var(--ease) both;
}

.stage.failed {
  background: linear-gradient(
    150deg,
    rgba(185, 172, 255, 0.5),
    rgba(185, 172, 255, 0.06) 40%,
    rgba(255, 138, 92, 0.45)
  );
}

.stage-in {
  border-radius: 23px;
  overflow: hidden;
  background: #07080f;
}

.chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 14px;
  border-bottom: 1px solid var(--line);
}

.lights {
  display: flex;
  gap: 6px;
}

.lights i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22233a;
}

.url {
  flex: 1;
  min-width: 0;

  display: flex;
  align-items: center;
  gap: 8px;

  height: 34px;
  padding: 0 14px;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);

  font-family: var(--mono);
  font-size: 12px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.url span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;

  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.rec.live {
  color: #ffc1aa;
  border-color: rgba(255, 138, 92, 0.5);
  background: rgba(255, 138, 92, 0.1);
}

.rec i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
}

.rec.live i {
  background: var(--flare);
  animation: pulse-f 1.4s infinite;
}

.viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0a0b14;
  overflow: hidden;
}

.viewport img {
  display: block;
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}

.frame-swap {
  animation: swap 0.45s var(--ease);
}

@keyframes swap {
  from {
    opacity: 0;
    transform: scale(1.015);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Agent recording player */

.player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.play {
  display: grid;
  place-items: center;
  flex: none;

  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;

  color: #05060c;
  background: var(--ink);

  transition: transform 0.2s var(--ease);
}

.play:hover {
  transform: scale(1.07);
}

.track {
  position: relative;
  flex: 1;
  height: 36px;

  cursor: pointer;
  touch-action: none;
}

.track .rail {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;

  height: 3px;
  margin-top: -1.5px;
  border-radius: 3px;

  background: rgba(200, 190, 255, 0.14);
}

.track .fill {
  position: absolute;
  top: 50%;
  left: 0;

  height: 3px;
  margin-top: -1.5px;
  border-radius: 3px;

  background: linear-gradient(
    90deg,
    var(--violet-deep),
    var(--violet)
  );

  box-shadow: 0 0 12px rgba(185, 172, 255, 0.7);

  transition: width 0.45s var(--ease);
}

.track .tick {
  position: absolute;
  top: 50%;

  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  padding: 0;

  border: 2px solid var(--faint);
  border-radius: 50%;
  background: #07080f;

  transition:
    transform 0.2s var(--ease),
    border-color 0.2s,
    background 0.2s;
}

.track .tick:hover {
  transform: scale(1.25);
}

.track .tick[aria-current="true"] {
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;

  border: 4px solid var(--violet);
  background: var(--ink);
  box-shadow: 0 0 16px var(--violet);
}

.track .end {
  position: absolute;
  top: 50%;
  right: -6px;

  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;

  background: var(--flare);
  box-shadow: 0 0 14px var(--flare);
}

.track .end.live {
  background: var(--violet);
  box-shadow: 0 0 14px var(--violet);
  animation: pulse-v 1.6s infinite;
}

.fcount {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Artifacts */

.sect-h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;

  font-family: var(--display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.sect-h .n {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--faint);
}

.strip {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(170px, 1fr)
  );
  gap: 12px;
}

.thumb {
  display: flex;
  flex-direction: column;
  gap: 8px;

  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;

  background: var(--glass);
  text-align: left;

  transition:
    border-color 0.25s,
    transform 0.3s var(--ease),
    background 0.25s;

  animation: card-in 0.6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

.thumb:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
}

.thumb[aria-current="true"] {
  border-color: rgba(185, 172, 255, 0.65);
  background: rgba(142, 123, 255, 0.12);
}

.thumb .shot {
  position: relative;
  display: block;

  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: #090a15;
}

.thumb .shot img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.thumb .cap {
  display: flex;
  gap: 8px;
  padding: 0 4px 2px;

  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

.thumb .cap span:last-child {
  margin-left: auto;
  color: var(--faint);
}

.thumb.missing {
  border-style: dashed;
  border-color: rgba(255, 138, 92, 0.4);
}

.thumb.missing .shot {
  display: grid;
  place-items: center;

  color: #ffaa8a;

  background: repeating-linear-gradient(
    135deg,
    rgba(255, 138, 92, 0.06) 0 8px,
    transparent 8px 16px
  );
}

.thumb.missing .cap span:first-child {
  color: #ffaa8a;
}

/* Activity rail */

.rail-card {
  display: flex;
  flex-direction: column;
  gap: 16px;

  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;

  background: var(--glass);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  animation: rise 0.9s 0.12s var(--ease) both;
}

.live-dot {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;

  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);

  animation: pulse-teal 2s infinite;
}

.tl {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0;

  list-style: none;
  overflow-y: auto;

  scrollbar-width: thin;
  scrollbar-color: rgba(200, 190, 255, 0.2) transparent;
}

.ev {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 12px;

  animation: ev-in 0.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}

@keyframes ev-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.ev .rail-l {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ev .rail-l i {
  width: 10px;
  height: 10px;
  margin-top: 7px;

  border: 2px solid var(--c, var(--faint));
  border-radius: 50%;
  flex: none;
}

.ev .rail-l::after {
  content: "";
  flex: 1;
  width: 1px;
  margin-top: 4px;
  background: var(--line);
}

.ev:last-child .rail-l::after {
  display: none;
}

.ev-body {
  min-width: 0;
  padding-bottom: 12px;
}

.ev-btn {
  display: flex;
  align-items: baseline;
  gap: 10px;

  width: 100%;
  margin-left: -8px;
  padding: 4px 8px;

  border: 0;
  border-radius: 10px;
  background: none;

  color: var(--muted);
  text-align: left;
  font-family: var(--mono);
  font-size: 12.5px;

  transition:
    background 0.2s,
    color 0.2s;
}

.ev-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.ev-btn .tx {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ev-btn time {
  color: var(--faint);
  font-size: 11px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ev-detail {
  margin: 6px 0 2px;
  padding: 10px 12px;

  border: 1px solid var(--line);
  border-radius: 10px;

  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);

  font-family: var(--mono);
  font-size: 11.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ev.k-start {
  --c: var(--teal);
}

.ev.k-step {
  --c: var(--violet);
}

.ev.k-cmd {
  --c: var(--teal);
}

.ev.k-you {
  --c: var(--ink);
}

.ev.k-you .ev-btn {
  color: var(--ink);
}

.ev.k-alert {
  --c: var(--amber);
}

.ev.k-alert .ev-btn {
  color: #f7d78a;
}

.ev.k-error {
  --c: var(--flare);
}

.ev.k-error .rail-l i {
  background: var(--flare);
  box-shadow: 0 0 12px var(--flare);
  animation: pulse-f 1.8s infinite;
}

.err-card {
  display: flex;
  flex-direction: column;
  gap: 12px;

  margin-top: 2px;
  padding: 14px;

  border: 1px solid rgba(255, 138, 92, 0.32);
  border-radius: 14px;

  background: rgba(255, 138, 92, 0.08);
}

.err-card .ev-btn {
  margin: 0;
  padding: 0;
  color: #ffc1aa;
}

.err-card .btn {
  min-height: 38px;
  border: 0;
  background: var(--flare);
  color: #170905;
  font-size: 13px;
}

.err-card .btn:hover {
  background: #ff9e78;
}

/* Agent messages */

.msg {
  display: flex;
  align-items: center;
  gap: 6px;

  padding: 5px 5px 5px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;

  background: rgba(0, 0, 0, 0.3);

  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.msg:focus-within {
  border-color: rgba(185, 172, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(185, 172, 255, 0.1);
}

.msg input {
  flex: 1;
  min-width: 0;
  height: 40px;

  border: 0;
  outline: none;
  background: none;
}

.msg input::-moz-placeholder {
  color: var(--faint);
}

.msg input::placeholder {
  color: var(--faint);
}

.msg button {
  display: grid;
  place-items: center;
  flex: none;

  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;

  background: var(--ink);
  color: #05060c;
}

.msg button:disabled {
  opacity: 0.35;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  min-height: 44px;
  padding: 0 16px 0 10px;

  border: 1px solid var(--line);
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);

  text-decoration: none;
  font-size: 14px;

  transition:
    color 0.2s,
    background 0.2s;
}

.back:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
}

.back svg {
  transition: transform 0.3s var(--ease);
}

.back:hover svg {
  transform: translateX(-3px);
}

/* Toasts retained for existing pages */

.toasts {
  position: fixed;
  z-index: 50;

  left: 50%;
  bottom: calc(
    20px + env(safe-area-inset-bottom, 0px)
  );

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;

  width: -moz-max-content;

  width: max-content;
  max-width: calc(100vw - 32px);

  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 8px 8px 8px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;

  background: var(--glass-2);
  color: var(--ink);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  box-shadow:
    0 20px 50px -20px rgba(0, 0, 0, 0.8);

  animation: toast-in 0.5s var(--ease) both;
  font-size: 14px;
}

.toast.out {
  animation: toast-out 0.35s ease both;
}

.toast a,
.toast button {
  display: inline-flex;
  align-items: center;

  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;

  background: var(--ink);
  color: #05060c;

  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* Compatibility with common existing /new page elements */

.form-card,
.panel,
.surface,
.agent-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--glass);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.form-card,
.agent-panel {
  padding: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

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

.field input,
.field textarea,
.field select,
.input,
.textarea,
.select {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;

  background: rgba(7, 8, 18, 0.8);
  color: var(--ink);

  outline: none;

  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(185, 172, 255, 0.12);
}

.field input::-moz-placeholder, .field textarea::-moz-placeholder, .input::-moz-placeholder, .textarea::-moz-placeholder {
  color: var(--faint);
}

.field input::placeholder,
.field textarea::placeholder,
.input::placeholder,
.textarea::placeholder {
  color: var(--faint);
}

/* Responsive design */

@media (min-width: 1001px) {
  .rail-card {
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 92px);
    max-height: calc(100vh - 120px);
  }
}

@media (max-width: 1000px) {
  .a-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-block: 84px 210px;
  }
}

@media (max-width: 760px) {
  .hero {
    gap: 24px;
    padding-block: 72px 170px;
  }

  .hero h1 {
    font-size: clamp(40px, 8vw, 70px);
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.15em;
  }

  .fleet-head {
    gap: 14px;
  }

  .fleet-head h2 {
    width: 100%;
  }

  .tabs {
    flex: 1;
  }

  .sort {
    margin-left: 0;
  }

  .grid {
    gap: 14px;
  }
}

@media (max-width: 560px) {
  .top {
    gap: 8px;
    padding-left: 12px;
  }

  .brand span {
    display: none;
  }

  .search {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .search:focus-within {
    width: auto;
  }

  .search kbd {
    display: none;
  }

  .top-fleet {
    padding: 0 14px;
  }

  .hero {
    padding-block: 64px 135px;
  }

  .hero h1 {
    font-size: clamp(38px, 10vw, 56px);
  }

  .hero-description {
    font-size: 13px;
    line-height: 1.65;
  }

  .eyebrow {
    max-width: 100%;
    font-size: 9px;
    letter-spacing: 0.09em;
  }

  .composer {
    border-radius: 22px;
  }

  .composer-in {
    border-radius: 21px;
  }

  .composer textarea {
    padding: 16px 16px 6px;
    font-size: 16px;
  }

  .composer-row {
    padding-left: 9px;
  }

  .hint {
    display: none;
  }

  .launch {
    margin-left: auto;
  }

  .examples {
    gap: 7px;
  }

  .example-chip {
    padding: 6px 10px;
    font-size: 10px;
  }

  .fleet h2 {
    font-size: 23px;
  }

  .tabs {
    order: 3;
    flex-basis: 100%;
  }

  .sort {
    order: 2;
    margin-left: auto;
  }

  .tab {
    padding: 0 11px;
    font-size: 12px;
  }

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

  .card {
    border-radius: 20px;
  }

  .card .shot {
    border-radius: 13px;
  }

  .card-details {
    padding-bottom: 12px;
  }

  .agent {
    padding-top: 20px;
  }

  .rail-card {
    padding: 15px;
  }

  .chrome {
    gap: 6px;
  }

  .url {
    padding-inline: 10px;
    font-size: 10px;
  }

  .rec {
    padding-inline: 8px;
    font-size: 10px;
  }

  .player {
    gap: 8px;
  }

  .strip {
    grid-template-columns: repeat(
      auto-fill,
      minmax(135px, 1fr)
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}


/* Shown as soon as this stylesheet is in (the inline style in layout.tsx hides the page until then), with a short fade. */
#tradjs-page-content { opacity: 1 !important; animation: gx-fade .35s ease both !important; }
@keyframes gx-fade { from { opacity: 0 } to { opacity: 1 } }
/* Motion on load only (the fleet re-renders every few seconds, so cards are not animated there). */
.hero h1 .line { display:block; animation: gx-rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hero h1 .line + .line { animation-delay: .12s; }
.composer { animation: gx-rise .7s .22s cubic-bezier(.2,.7,.2,1) both; }
.examples { animation: gx-rise .7s .32s cubic-bezier(.2,.7,.2,1) both; }
.fleet-head { animation: gx-rise .7s .42s cubic-bezier(.2,.7,.2,1) both; }
@keyframes gx-rise { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: reduce) { .hero h1 .line, .composer, .examples, .fleet-head, #tradjs-page-content { animation: none !important; } }

/* The agents are the point of the page: the fleet starts right under the composer, in the first screen
   (owner, 9 Nov: "where is our agents" - on a laptop the fleet sat below a 245 px empty gap). */
.hero { padding-block: 44px 36px !important; gap: 20px !important; }
.hero h1 { font-size: clamp(34px, 5vw, 64px) !important; }

/*# sourceMappingURL=style.css.map */
/*# sourceMappingURL=globals-617f821a.css.map */