:root {
  --bg: #070a09;
  --panel: rgba(7, 11, 10, 0.86);
  --panel-soft: rgba(9, 14, 13, 0.7);
  --ink: #e8ebe7;
  --soft-ink: #b9c1bb;
  --muted: #707a73;
  --dim: #3d4641;
  --line: rgba(206, 220, 208, 0.18);
  --line-strong: rgba(206, 220, 208, 0.32);
  --green: #83cf8f;
  --green-hot: #9bf3a7;
  --shadow: rgba(0, 0, 0, 0.5);
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  background: radial-gradient(circle at 50% 16%, rgba(131, 207, 143, 0.1), transparent 28rem),
    radial-gradient(circle at 50% 78%, rgba(131, 207, 143, 0.06), transparent 34rem),
    linear-gradient(rgba(232, 235, 231, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 235, 231, 0.025) 1px, transparent 1px), var(--bg);
  background-size: auto, auto, 18px 18px, 18px 18px, auto;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

body::before {
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.025) 0,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: screen;
  opacity: 0.42;
}

body::after {
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.72);
}

button,
input,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--green-hot);
  outline-offset: 2px;
}

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100vw - 28px));
  min-height: calc(100svh - 24px);
  margin: 12px auto;
  padding: 24px 38px 28px;
  border: 1px dashed rgba(206, 220, 208, 0.23);
  background: linear-gradient(
      90deg,
      rgba(131, 207, 143, 0.025),
      transparent 28%,
      transparent 72%,
      rgba(131, 207, 143, 0.025)
    ), rgba(3, 6, 5, 0.52);
}

.frame-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--line-strong);
  pointer-events: none;
}

.frame-corner-tl {
  top: 8px;
  left: 8px;
  border-top: 1px solid;
  border-left: 1px solid;
}
.frame-corner-tr {
  top: 8px;
  right: 8px;
  border-top: 1px solid;
  border-right: 1px solid;
}
.frame-corner-bl {
  bottom: 8px;
  left: 8px;
  border-bottom: 1px solid;
  border-left: 1px solid;
}
.frame-corner-br {
  bottom: 8px;
  right: 8px;
  border-bottom: 1px solid;
  border-right: 1px solid;
}

.topbar {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  min-height: 58px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
  line-height: 0;
}

.brand-logo {
  width: 44px;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
  filter: none;
}

.brand-name {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1;
  letter-spacing: .08em;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 58px);
  justify-self: center;
  color: #a5aaa6;
  font-size: 12px;
  letter-spacing: .12em;
}

.nav a,
.footer a {
  transition: color 160ms ease, text-shadow 160ms ease;
}

.nav a:hover,
.footer a:hover {
  color: var(--green-hot);
  text-shadow: 0 0 18px rgba(131, 207, 143, 0.26);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
  color: #9da49d;
  font-size: 12px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  box-shadow: 0 0 16px rgba(131, 207, 143, 0.75);
}

.code-panel,
.playground,
.features {
  border: 1px solid var(--line);
  background: var(--panel);
}

.panel-head strong::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  background: var(--green);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: stretch;
  gap: 0;
  margin-top: 18px;
  min-height: 520px;
}

.side-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.package-panel {
  border-left: 0;
}

.panel-row,
.panel-head {
  min-height: 39px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
}

.panel-head strong {
  color: var(--green);
  font-size: 10px;
}

.panel-head i {
  width: 12px;
  height: 12px;
  border: 2px solid #c6cac5;
}

.capability-list {
  display: grid;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.capability-list div {
  padding: 16px 14px;
  border-bottom: 1px dashed rgba(206, 220, 208, 0.14);
}

.capability-list div:last-child {
  border-bottom: 0;
}

.capability-list dt {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 10px;
  text-transform: uppercase;
}

.capability-list dd {
  margin: 0;
  color: var(--soft-ink);
  font-size: 12px;
  line-height: 1.55;
}

.hero {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 6vw, 70px) clamp(28px, 4vw, 42px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(131, 207, 143, 0.32) 1px, transparent 2px);
  background-size: 14px 14px;
  mask-image: radial-gradient(ellipse at center, black 0%, black 36%, transparent 75%);
  opacity: 0.32;
  transform: translateY(34px);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.kicker {
  width: min(520px, 100%);
  margin: 0 0 24px;
  color: #c3c9c2;
  font-size: clamp(14px, 1.5vw, 17px);
  line-height: 1.65;
}

.headline {
  min-height: 136px;
  margin: 0;
  color: #f0f2ef;
  font-size: clamp(56px, 6.8vw, 82px);
  line-height: 0.96;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.22);
}

.headline .accent {
  color: var(--green-hot);
  text-shadow: 0 0 20px rgba(131, 207, 143, 0.55), 0 0 48px rgba(131, 207, 143, 0.18);
}

.headline .scramble-el {
  display: inline-block;
  white-space: nowrap;
}

.headline .accent::after {
  content: "_";
  display: inline-block;
  margin-left: .1em;
  color: var(--green-hot);
  animation: blink 1s steps(1) infinite;
}

.dot-word {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  width: min(520px, 100%);
  margin-top: 34px;
  opacity: 0.95;
}

.dot-word span {
  min-width: 0;
  height: 92px;
  color: transparent;
  background: radial-gradient(circle, rgba(155, 243, 167, 0.9) 0 2px, transparent 2.2px);
  background-size: 9px 9px;
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 0 8px rgba(131, 207, 143, 0.4));
  font-size: clamp(58px, 7vw, 80px);
  font-weight: 800;
  line-height: 0.9;
  text-align: center;
  text-transform: uppercase;
}

.command-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}

.action,
.chip,
.payload-button,
.pg-chip,
.pg-run {
  border-radius: 0;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.action,
.chip {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(7, 11, 10, 0.82);
  color: var(--soft-ink);
  padding: 0 18px;
}

.action {
  gap: 24px;
  min-width: 168px;
  justify-content: space-between;
  border-color: rgba(131, 207, 143, 0.6);
  background: linear-gradient(180deg, #96d99d, #73b77c);
  color: #08100b;
  font-weight: 700;
}

.action::after {
  content: ">";
  font-size: 20px;
}

.chip:hover,
.chip.is-active,
.pg-chip:hover,
.pg-chip.is-active {
  border-color: rgba(131, 207, 143, 0.72);
  color: var(--green-hot);
  background: rgba(131, 207, 143, 0.08);
}

.action:hover,
.chip:hover,
.payload-button:hover,
.pg-chip:hover,
.pg-run:hover {
  transform: translateY(-2px);
}

.payload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: auto;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.payload-button {
  min-height: 40px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 7, 0.62);
  color: var(--soft-ink);
  padding: 0 10px;
  text-align: left;
  font-size: 12px;
}

.payload-button:hover,
.payload-button.is-active {
  border-color: rgba(131, 207, 143, 0.64);
  color: var(--green-hot);
  background: rgba(131, 207, 143, 0.08);
}

.code-section {
  margin-top: 20px;
}

.code-panel {
  overflow: hidden;
}

.code-header,
.pg-header {
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.code-header small,
.pg-hint {
  color: var(--muted);
  font-size: 11px;
}

.code-body {
  margin: 0;
  padding: 18px 20px 22px;
  overflow-x: auto;
}

.code-body code {
  display: block;
  color: #c5cbc4;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre;
}

.code-keyword {
  color: #eef4ef;
  font-weight: 600;
}

.code-string {
  color: var(--green-hot);
}

.code-number {
  color: #d9e6dc;
}

.code-property {
  color: #9ed9a7;
}

.code-comment {
  color: #62706a;
}

.playground {
  margin-top: 20px;
  overflow: hidden;
}

.pg-title {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pg-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1.08fr);
}

.pg-preview {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 36px;
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.pg-preview::before {
  content: "";
  position: absolute;
  inset: 18px;
  background: radial-gradient(circle, rgba(131, 207, 143, 0.62) 0 2px, transparent 2.4px);
  background-size: 31px 31px;
  opacity: 0.36;
}

.pg-output {
  position: relative;
  z-index: 1;
  width: min(100%, 18ch);
  min-height: 1.15em;
  overflow: hidden;
  color: #f2f4f1;
  font-family: var(--mono);
  font-size: clamp(30px, 4.2vw, 46px);
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0, "tnum" 1;
  line-height: 1.1;
  text-align: center;
  white-space: pre-wrap;
  word-break: normal;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.18);
}

.scramble-glyph,
.pg-output .pg-glyph {
  display: inline-block;
  width: 1ch;
  max-width: 1ch;
  overflow: hidden;
  vertical-align: top;
  text-align: center;
}

.pg-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 24px;
}

.pg-field {
  display: grid;
  gap: 7px;
}

.pg-label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.pg-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  background: rgba(3, 6, 5, 0.58);
  color: var(--ink);
  padding: 8px 12px;
  outline: none;
}

.pg-textarea {
  min-height: 86px;
  line-height: 1.45;
  resize: vertical;
}

.pg-input:focus {
  border-color: rgba(131, 207, 143, 0.72);
}

.pg-input-sm {
  max-width: 200px;
}

.pg-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pg-chip {
  min-height: 32px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 7, 0.62);
  color: var(--soft-ink);
  padding: 0 12px;
  font-size: 12px;
}

.pg-range-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pg-range {
  flex: 1;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(90deg, var(--green), rgba(206, 220, 208, 0.18));
  outline: none;
  cursor: pointer;
}

.pg-range::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  -webkit-appearance: none;
  background: var(--green);
  border: 0;
}

.pg-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--green);
  border: 0;
}

.pg-range-val {
  min-width: 58px;
  color: var(--soft-ink);
  font-size: 12px;
  text-align: right;
}

.pg-run {
  min-height: 50px;
  border: 1px solid rgba(131, 207, 143, 0.68);
  background: linear-gradient(180deg, #9adfa2, #75ba7e);
  color: #071008;
  font-weight: 800;
  text-transform: uppercase;
}

.pg-run::after {
  content: ">";
  float: right;
  margin-right: 12px;
  font-size: 18px;
}

.pg-run:active,
.action:active {
  transform: translateY(0) scale(0.99);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 20px;
}

.feature {
  min-height: 132px;
  padding: 24px 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 10, 0.54);
}

.feature:nth-child(3n) {
  border-right: 0;
}
.feature:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.feature dt {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
}

.feature dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 12px;
}

.footer a {
  color: var(--green);
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes flicker {
  0%,
  70%,
  100% {
    opacity: 0.52;
  }
  72% {
    opacity: 1;
  }
}

@media (max-width: 1040px) {
  .shell {
    width: min(100% - 22px, 820px);
    padding: 20px 24px 26px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    padding: 16px 0;
  }

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

  .side-panel,
  .side-left,
  .package-panel,
  .hero {
    border: 1px solid var(--line);
  }

  .hero {
    order: 1;
    min-height: 430px;
  }

  .package-panel {
    order: 3;
  }

  .pg-body {
    grid-template-columns: 1fr;
  }

  .pg-preview {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 14px, 560px);
    margin: 7px auto;
    padding: 18px 14px 22px;
  }

  .topbar,
  .footer {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    overflow-x: auto;
  }

  .hero {
    min-height: 390px;
    padding: 28px 18px;
  }

  .headline {
    min-height: 112px;
    font-size: clamp(42px, 11vw, 62px);
    letter-spacing: .04em;
  }

  .dot-word {
    gap: 4px;
    margin-top: 24px;
  }

  .dot-word span {
    height: 62px;
    background-size: 8px 8px;
    font-size: clamp(40px, 12vw, 58px);
  }

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

  .feature,
  .feature:nth-child(3n),
  .feature:nth-last-child(-n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feature:last-child {
    border-bottom: 0;
  }

  .pg-controls,
  .pg-preview {
    padding: 20px 16px;
  }

  .pg-output {
    width: min(100%, 16ch);
    font-size: clamp(26px, 8vw, 38px);
  }
}

@media (max-width: 460px) {
  .brand-mark {
    width: 40px;
    height: 40px;
  }

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

  .action {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
