:root {
  color-scheme: dark;
  --page: #090807;
  --ink: #fff8e8;
  --muted: #c9bea8;
  --quiet: #8f8370;
  --line: rgba(255, 248, 232, 0.14);
  --line-strong: rgba(255, 248, 232, 0.26);
  --panel: rgba(22, 19, 15, 0.9);
  --panel-solid: #17130f;
  --field: #0f0d0a;
  --acid: #c8ff5f;
  --acid-2: #ecffad;
  --cyan: #5cdcff;
  --coral: #ff715b;
  --amber: #f4b95f;
  --ink-on-acid: #151900;
  --shadow-ring: 0 0 0 1px rgba(255, 248, 232, 0.12);
  --shadow-ring-hover: 0 0 0 1px rgba(200, 255, 95, 0.36);
  --shadow-heavy: 0 24px 80px rgba(0, 0, 0, 0.42);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(115deg, rgba(200, 255, 95, 0.13) 0 1px, transparent 1px 34%),
    linear-gradient(180deg, #11100c 0, var(--page) 44rem);
  color: var(--ink);
}

body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  content: "";
  background:
    linear-gradient(rgba(255, 248, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 248, 232, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, black, transparent 78%);
  pointer-events: none;
}

body::after {
  position: fixed;
  z-index: -1;
  inset: auto -10vw 0;
  height: 34vh;
  content: "";
  background:
    linear-gradient(100deg, transparent 7%, rgba(200, 255, 95, 0.15) 8% 22%, transparent 23%),
    linear-gradient(100deg, transparent 38%, rgba(92, 220, 255, 0.12) 39% 47%, transparent 48%);
  opacity: 0.78;
  transform: skewY(-7deg);
  pointer-events: none;
}

a {
  color: inherit;
}

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

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  text-wrap: balance;
}

p {
  color: var(--muted);
  line-height: 1.55;
  text-wrap: pretty;
}

.site-shell,
.builder-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 16px;
}

.site-shell {
  display: grid;
  gap: clamp(34px, 6vw, 84px);
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-mark,
.topnav,
.action,
.signal-strip span,
.command-pad button,
.builder-stats span,
.preview-badge,
button {
  min-height: 44px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand-glyph {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  background: var(--acid);
  color: var(--ink-on-acid);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-weight: 900;
  box-shadow:
    7px 7px 0 #000,
    0 0 0 1px rgba(0, 0, 0, 0.9);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: rgba(255, 248, 232, 0.055);
  box-shadow: var(--shadow-ring);
}

.topnav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: none;
  transition-property: background-color, color, box-shadow, scale;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.topnav a:hover,
.topnav a:focus-visible,
.topnav a[aria-current="page"] {
  background: rgba(255, 248, 232, 0.09);
  color: var(--ink);
  outline: 0;
}

.topnav .nav-cta {
  background: var(--acid);
  color: var(--ink-on-acid);
}

.topnav a:active,
.action:active,
button:active {
  scale: 0.96;
}

.launch-hero {
  min-height: calc(100dvh - 96px);
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(430px, 0.94fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding-block: clamp(18px, 4vw, 52px);
}

.hero-copy,
.proof-copy,
.tease-copy,
.studio-heading {
  display: grid;
  gap: 16px;
}

.hero-copy {
  max-width: 760px;
  animation: rise-in 460ms ease-out both;
}

.eyebrow {
  width: fit-content;
  max-width: 100%;
  padding: 6px 9px;
  background: rgba(92, 220, 255, 0.12);
  color: var(--cyan);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(92, 220, 255, 0.24);
}

.hero-copy h1 {
  max-width: 860px;
  font-size: clamp(3rem, 6.4vw, 6.8rem);
  line-height: 0.9;
}

.hero-lede {
  max-width: 690px;
  color: #e4dac4;
  font-size: clamp(1.04rem, 1.5vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.action,
button {
  border: 0;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  transition-property: background-color, color, box-shadow, scale, transform;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
}

.action.primary,
button {
  background: var(--acid);
  color: var(--ink-on-acid);
  box-shadow:
    8px 8px 0 #000,
    0 0 0 1px rgba(0, 0, 0, 0.9);
}

.action.secondary,
button.secondary {
  background: rgba(255, 248, 232, 0.06);
  color: var(--ink);
  box-shadow: var(--shadow-ring);
}

.action:hover,
.action:focus-visible,
button:hover,
button:focus-visible {
  outline: 0;
  transform: translateY(-1px);
}

.action.primary:hover,
.action.primary:focus-visible,
button:hover,
button:focus-visible {
  background: var(--acid-2);
}

.action.secondary:hover,
.action.secondary:focus-visible,
button.secondary:hover,
button.secondary:focus-visible {
  background: rgba(255, 248, 232, 0.1);
  box-shadow: var(--shadow-ring-hover);
}

.signal-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.signal-strip span {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255, 248, 232, 0.06);
  color: var(--muted);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 900;
  box-shadow: var(--shadow-ring);
}

.hero-stage {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 113, 91, 0.12), transparent 44%),
    linear-gradient(315deg, rgba(200, 255, 95, 0.14), transparent 48%),
    rgba(255, 248, 232, 0.045);
  box-shadow:
    0 0 0 1px rgba(255, 248, 232, 0.18),
    var(--shadow-heavy);
  animation: rise-in 520ms 90ms ease-out both;
}

.stage-ribbon {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--quiet);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stage-ribbon span:first-child {
  color: var(--acid);
}

.home-terminal .wt-window {
  min-height: clamp(330px, 48dvh, 520px);
  height: clamp(330px, 48dvh, 520px);
}

.home-terminal .wt-body {
  flex: 1;
  max-height: none;
}

.command-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.command-pad button {
  padding: 9px 10px;
  background: rgba(9, 8, 7, 0.72);
  color: var(--ink);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.82rem;
  box-shadow: 0 0 0 1px rgba(255, 248, 232, 0.16);
}

.command-pad button::before {
  content: "$ ";
  color: var(--amber);
}

.command-pad button.is-active,
.command-pad button[aria-pressed="true"] {
  background: var(--acid);
  color: var(--ink-on-acid);
}

.proof-section,
.builder-tease {
  display: grid;
  gap: 22px;
}

.proof-section {
  grid-template-columns: minmax(260px, 0.52fr) minmax(0, 1fr);
  align-items: start;
}

.proof-copy h2,
.tease-copy h2,
.preview-heading h2 {
  max-width: 700px;
  font-size: clamp(2rem, 4vw, 4.6rem);
  line-height: 0.96;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.proof-grid article {
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  background: rgba(255, 248, 232, 0.06);
  box-shadow: var(--shadow-ring);
  transition-property: background-color, box-shadow, transform;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.proof-grid article:hover {
  background: rgba(255, 248, 232, 0.1);
  box-shadow: var(--shadow-ring-hover);
  transform: translateY(-2px);
}

.proof-index {
  color: var(--coral);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 900;
}

.proof-grid h3 {
  font-size: 1.22rem;
}

.builder-tease {
  grid-template-columns: minmax(260px, 0.5fr) minmax(0, 1fr);
  align-items: center;
  padding-bottom: 42px;
}

.embed-demo {
  display: grid;
  gap: 12px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(92, 220, 255, 0.11), transparent 42%),
    rgba(255, 248, 232, 0.055);
  box-shadow:
    0 0 0 1px rgba(255, 248, 232, 0.16),
    var(--shadow-heavy);
}

.embed-demo-top,
.embed-flow {
  display: flex;
  gap: 8px;
}

.embed-demo-top {
  justify-content: space-between;
  color: var(--quiet);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.embed-demo-top span:first-child {
  color: var(--acid);
}

.embed-code {
  background: #050504;
  box-shadow: 0 0 0 1px rgba(200, 255, 95, 0.28);
}

.embed-terminal {
  min-height: 230px;
}

.embed-terminal.website-terminal .wt-window {
  min-height: 230px;
}

.embed-terminal.website-terminal .wt-body {
  min-height: 106px;
  max-height: 150px;
}

.embed-flow {
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.embed-flow li {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 9px 11px;
  background: rgba(9, 8, 7, 0.72);
  color: var(--ink);
  font-weight: 900;
  box-shadow: var(--shadow-ring);
}

.embed-code {
  margin: 0;
  overflow-x: auto;
  padding: 14px;
  color: var(--muted);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
}

.builder-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.studio-topbar {
  min-height: 58px;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 0.42fr);
  gap: 14px;
  align-items: start;
  min-height: 0;
}

.studio-panel {
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.07), rgba(255, 248, 232, 0.025)),
    var(--panel);
  box-shadow:
    0 0 0 1px rgba(255, 248, 232, 0.16),
    var(--shadow-heavy);
}

.builder-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.studio-heading h1 {
  max-width: 900px;
  font-size: clamp(2rem, 3.6vw, 4.6rem);
  line-height: 0.92;
}

.builder-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.builder-stats span,
.section-label,
.small-title,
label,
.preview-badge,
.panel-note,
.status {
  font-size: 0.82rem;
}

.builder-stats span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  background: rgba(9, 8, 7, 0.55);
  color: var(--muted);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-weight: 900;
  box-shadow: var(--shadow-ring);
}

.builder-form {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.form-column,
.field,
.commands-field {
  display: grid;
}

.form-column {
  gap: 10px;
  align-content: start;
}

.field {
  gap: 6px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
}

.section-label span {
  color: var(--coral);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
}

label,
.small-title {
  color: var(--ink);
  font-weight: 900;
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  border: 0;
  padding: 11px 12px;
  background: var(--field);
  color: var(--ink);
  outline: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 0 0 1px rgba(255, 248, 232, 0.14);
  transition-property: background-color, box-shadow;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

input::placeholder,
textarea::placeholder {
  color: rgba(201, 190, 168, 0.65);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  background: #070604;
  box-shadow:
    0 0 0 1px rgba(200, 255, 95, 0.76),
    0 0 0 4px rgba(200, 255, 95, 0.14);
}

textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.welcome-field textarea {
  min-height: 132px;
}

.answer-field textarea {
  min-height: 132px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
}

.ship-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

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

.button-row button {
  padding: 10px 12px;
}

button.quiet {
  color: var(--quiet);
}

.status {
  grid-column: 1 / -1;
  min-height: 1.4em;
  color: var(--muted);
}

.commands-field {
  gap: 10px;
}

.panel-note {
  max-width: 560px;
  color: var(--quiet);
}

.command-list {
  display: grid;
  gap: 8px;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.command-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 12px;
  background: rgba(9, 8, 7, 0.62);
  box-shadow: var(--shadow-ring);
  transition-property: background-color, box-shadow, transform;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
  animation: item-in 220ms ease-out both;
}

.command-item:hover,
.command-item.is-selected {
  background: rgba(200, 255, 95, 0.08);
  box-shadow:
    inset 4px 0 0 var(--acid),
    var(--shadow-ring-hover);
}

.command-item:hover {
  transform: translateY(-1px);
}

.command-name {
  color: var(--acid);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-weight: 900;
}

.command-description {
  color: var(--muted);
  font-size: 0.88rem;
}

.command-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 6px;
}

.run-button,
.edit-button,
.remove-button {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 0.76rem;
  box-shadow: 0 0 0 1px rgba(255, 248, 232, 0.14);
}

.run-button {
  color: var(--acid);
}

.remove-button {
  color: #ff9b8e;
}

.command-empty {
  min-height: 86px;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(9, 8, 7, 0.42);
  color: var(--quiet);
  text-align: center;
  box-shadow: var(--shadow-ring);
}

.preview-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 14px;
}

.preview-panel.is-refreshing {
  animation: preview-pulse 360ms ease-out;
}

.preview-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.preview-heading h2 {
  font-size: clamp(1.4rem, 2vw, 2.2rem);
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  color: var(--cyan);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(92, 220, 255, 0.24);
}

.preview-panel .website-terminal .wt-window {
  min-height: clamp(430px, 66dvh, 680px);
  height: clamp(430px, 66dvh, 680px);
}

.preview-panel .website-terminal .wt-body {
  flex: 1;
  max-height: none;
}

.website-terminal .wt-window {
  border-radius: 0;
  background: #050504;
  box-shadow:
    0 0 0 1px rgba(200, 255, 95, 0.3),
    0 20px 70px rgba(0, 0, 0, 0.38);
}

.website-terminal .wt-header,
.website-terminal .wt-input-row {
  border-radius: 0;
}

.website-terminal .wt-output {
  line-height: 1.58;
}

.embed-dialog {
  width: min(920px, calc(100vw - 28px));
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

.embed-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.embed-dialog-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--panel-solid);
  box-shadow:
    0 0 0 1px var(--line-strong),
    var(--shadow-heavy);
}

.embed-dialog[open] .embed-dialog-card {
  animation: dialog-pop 180ms ease-out both;
}

.embed-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.embed-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.embed-output {
  min-height: min(52vh, 430px);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.82rem;
}

.dialog-copy.is-copied {
  background: rgba(200, 255, 95, 0.16);
  color: var(--acid);
  box-shadow: var(--shadow-ring-hover);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes item-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dialog-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes preview-pulse {
  45% {
    box-shadow:
      0 0 0 1px rgba(200, 255, 95, 0.5),
      0 0 0 5px rgba(200, 255, 95, 0.1),
      var(--shadow-heavy);
  }
}

@media (min-width: 1120px) {
  .builder-page {
    overflow: hidden;
  }

  .builder-shell {
    height: 100dvh;
  }

  .studio-grid,
  .builder-panel,
  .command-list {
    min-height: 0;
  }

  .studio-grid {
    height: 100%;
  }

  .builder-panel {
    grid-template-rows: auto auto auto minmax(0, 1fr);
    height: 100%;
    overflow-y: auto;
    scrollbar-color: rgba(200, 255, 95, 0.45) transparent;
  }

  .commands-field {
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .command-list {
    overflow-y: auto;
    padding: 1px 3px 1px 1px;
    scrollbar-color: rgba(200, 255, 95, 0.45) transparent;
  }
}

@media (max-width: 1119px) {
  .launch-hero,
  .proof-section,
  .builder-tease,
  .studio-grid {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    position: static;
  }

  .builder-shell {
    display: block;
  }
}

@media (max-width: 720px) {
  .site-shell,
  .builder-shell {
    padding: 14px;
  }

  .topbar,
  .studio-topbar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .topnav a {
    padding-inline: 8px;
  }

  .brand-mark {
    justify-content: space-between;
  }

  .launch-hero {
    min-height: auto;
    padding-block: 22px;
  }

  .hero-stage {
    order: -1;
  }

  .hero-copy h1 {
    font-size: clamp(2.7rem, 12vw, 4.3rem);
  }

  .hero-actions,
  .button-row,
  .ship-row,
  .builder-form,
  .two-col {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .button-row {
    display: grid;
  }

  .signal-strip,
  .stage-ribbon,
  .preview-heading,
  .embed-dialog-header {
    align-items: stretch;
    flex-direction: column;
  }

  .command-pad,
  .proof-grid,
  .builder-stats {
    grid-template-columns: 1fr;
  }

  .hero-stage,
  .builder-panel,
  .preview-panel {
    padding: 10px;
  }

  .home-terminal .wt-window {
    min-height: 320px;
    height: 320px;
  }

  .preview-panel .website-terminal .wt-window {
    min-height: 390px;
    height: 390px;
  }

  .command-item {
    grid-template-columns: 1fr;
  }

  .command-actions {
    justify-content: stretch;
  }

  .command-actions button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
