:root {
  color-scheme: dark;
  --bg: #07110d;
  --panel: #0c1c14;
  --panel-strong: #11291d;
  --text: #e6ffe9;
  --muted: #9cc9a5;
  --green: #52ff7a;
  --green-soft: rgba(82, 255, 122, 0.16);
  --line: rgba(121, 255, 151, 0.18);
  --danger: #ff8585;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(82, 255, 122, 0.16), transparent 26rem),
    radial-gradient(circle at 80% 0%, rgba(82, 255, 122, 0.09), transparent 28rem),
    linear-gradient(180deg, #07110d 0%, #020604 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.35;
}

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

button {
  font: inherit;
}

main,
footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 40px;
  align-items: center;
  min-height: 760px;
  padding: 72px 0 48px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  max-width: 720px;
  font-size: clamp(3.25rem, 6vw, 5.6rem);
  letter-spacing: -0.065em;
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.7rem);
  letter-spacing: -0.05em;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

.lede {
  max-width: 660px;
  margin: 26px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: var(--green);
  transform: translateY(-1px);
}

.button.primary {
  color: #021006;
  background: var(--green);
  box-shadow: 0 0 28px rgba(82, 255, 122, 0.22);
}

.button.secondary {
  background: rgba(82, 255, 122, 0.06);
}

.button.compact {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.82rem;
}

.button.full {
  width: 100%;
}

.button[disabled] {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.terminal-card,
.panel-grid article,
.signup-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 41, 29, 0.88), rgba(6, 17, 11, 0.92));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.38);
}

.terminal-card {
  overflow: hidden;
  border-radius: 24px;
}

.terminal-top {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.terminal-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.45;
}

pre {
  margin: 0;
  padding: 26px;
  overflow: auto;
  color: var(--green);
  font-size: clamp(0.82rem, 1.4vw, 1rem);
  line-height: 1.55;
  text-shadow: 0 0 14px rgba(82, 255, 122, 0.35);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 20px 0 80px;
}

.panel-grid article {
  min-height: 260px;
  padding: 28px;
  border-radius: 22px;
}

.badge {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 34px;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
}

.clean-panel {
  display: grid;
  gap: 28px;
  max-width: 820px;
  padding: 28px 0 96px;
}

.check-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.check-list li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(82, 255, 122, 0.05);
}

code {
  color: var(--green);
}

label {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: var(--text);
  font-weight: 700;
}

label span,
small,
.fine-print {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: #06120c;
  font: inherit;
}

input:focus {
  border-color: var(--green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(82, 255, 122, 0.14);
}

.signup-card button {
  margin-top: 24px;
}

.form-status {
  min-height: 28px;
  margin: 16px 0 0;
  color: var(--muted);
}

.form-status.error {
  color: var(--danger);
}

.form-status.success {
  color: var(--green);
}

.text-button {
  display: inline;
  padding: 0;
  border: 0;
  color: var(--green);
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

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

.legal-page {
  max-width: 820px;
  padding: 72px 0 96px;
}

.legal-page h1 {
  max-width: none;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
}

.legal-card {
  display: grid;
  gap: 26px;
  margin-top: 36px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(17, 41, 29, 0.88), rgba(6, 17, 11, 0.92));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.28);
}

.legal-card section {
  display: grid;
  gap: 10px;
}

.legal-card h2 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.legal-card p,
.legal-card ul {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.legal-card ul {
  padding-left: 22px;
}

.signup-dialog,
.dex-dialog {
  width: min(1180px, calc(100vw - 32px));
  height: min(820px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--text);
  background: #06120c;
  box-shadow: 0 28px 120px rgba(0, 0, 0, 0.7);
}

.signup-dialog {
  width: min(520px, calc(100vw - 32px));
  height: auto;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.signup-card {
  padding: 28px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 41, 29, 0.96), rgba(6, 17, 11, 0.98));
}

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

.dialog-heading .eyebrow {
  margin-bottom: 8px;
}

.signup-dialog::backdrop,
.dex-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.dex-dialog.is-expanded {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
}

.dex-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}

.dex-shell.is-expanded {
  height: 100vh;
}

.dex-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 41, 29, 0.98), rgba(6, 17, 11, 0.98));
}

.dex-toolbar .eyebrow {
  margin-bottom: 6px;
}

.dex-toolbar h2 {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
}

.dex-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.dex-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #020604;
}

@media (max-width: 860px) {
  .hero,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .panel-grid {
    padding-bottom: 44px;
  }

  .clean-panel {
    gap: 28px;
    padding-bottom: 60px;
  }

  .dex-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .dex-actions {
    justify-content: flex-start;
  }
}
