:root {
  color-scheme: light;
  --paper: #f7f6f1;
  --surface: #fffdf8;
  --sunken: #f4f2ea;
  --ink: #16150f;
  --muted: #6f6d64;
  --faint: #8a877b;
  --border: #ddd9ca;
  --border-soft: #eeeadd;
  --action: #2f45ff;
  --action-ink: #1e30d8;
  --pass: #1d8a4a;
  --warn: #a4620a;
  --shadow-rest: 0 16px 50px rgba(42, 38, 22, 0.08);
  --shadow-hover: 0 20px 60px rgba(42, 38, 22, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Archivo, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 9% 12%, rgba(47, 69, 255, 0.08), transparent 26rem),
    radial-gradient(circle at 92% 70%, rgba(255, 194, 92, 0.13), transparent 28rem),
    var(--paper);
}

button {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(47, 69, 255, 0.3);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--ink);
  color: var(--surface);
  font-size: 15px;
}

.preview-label,
.runtime-version {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 8px 12px;
  text-transform: uppercase;
}

.hero {
  max-width: 920px;
  margin: 70px auto 48px;
  text-align: center;
}

.eyebrow,
.micro-label,
.step-kicker {
  color: var(--action);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 880px;
  margin: 18px auto 22px;
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

h1 em {
  color: var(--action);
  font-family: Spectral, Georgia, serif;
  font-weight: 500;
}

.hero-copy {
  max-width: 640px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
}

.onboarding-shell {
  max-width: 860px;
  margin: 0 auto 90px;
}

.progress-rail {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin: 0 24px;
}

.progress-item {
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 2px solid var(--border);
  color: var(--faint);
  padding: 14px 4px;
}

.progress-item span {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.progress-item strong {
  font-size: 13px;
}

.progress-item.is-active {
  border-color: var(--action);
  color: var(--ink);
}

.progress-item.is-complete {
  border-color: var(--pass);
  color: var(--pass);
}

.onboarding-card {
  min-height: 500px;
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow-rest);
  padding: clamp(28px, 6vw, 64px);
}

.card-copy {
  max-width: 670px;
  margin-bottom: 34px;
}

.step-kicker {
  margin: 0 0 12px;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -0.05em;
  line-height: 1.04;
}

.card-copy > p:last-child {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.primary-button,
.secondary-button,
.text-button,
.client-card {
  border: 0;
  cursor: pointer;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-radius: 12px;
  font-weight: 750;
  padding: 0 20px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  background: var(--action);
  color: white;
  box-shadow: 0 10px 24px rgba(47, 69, 255, 0.22);
}

.primary-button:hover:not(:disabled) {
  background: var(--action-ink);
  box-shadow: 0 14px 30px rgba(47, 69, 255, 0.28);
  transform: translateY(-1px);
}

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

.secondary-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}

.secondary-button:hover {
  border-color: var(--action);
  color: var(--action);
}

.text-button {
  min-height: 44px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  padding: 0;
}

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

.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.client-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 15px;
  align-items: center;
  min-height: 108px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  padding: 18px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.client-card:hover {
  border-color: #aaa593;
  box-shadow: var(--shadow-rest);
  transform: translateY(-1px);
}

.client-card[aria-pressed="true"] {
  border-color: var(--action);
  box-shadow: 0 0 0 3px rgba(47, 69, 255, 0.1);
}

.client-card strong,
.client-card small {
  display: block;
}

.client-card strong {
  margin-bottom: 5px;
  font-size: 16px;
}

.client-card small {
  color: var(--muted);
  font-size: 12px;
}

.client-glyph {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.client-glyph-warm {
  background: #d66d45;
}

.client-check {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: transparent;
  font-size: 12px;
}

.client-card[aria-pressed="true"] .client-check {
  border-color: var(--action);
  background: var(--action);
  color: white;
}

.connect-block,
.session-next {
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: var(--sunken);
  padding: 20px;
}

.connect-heading,
.command-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.connect-heading strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.runtime-version {
  background: var(--surface);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0;
  text-transform: none;
}

.command-box {
  overflow-x: auto;
  margin: 18px 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--ink);
  color: #f6f3e7;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

.quiet-status {
  color: var(--pass);
  font-size: 13px;
  font-weight: 700;
}

.reversible-copy {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.reversible-copy code {
  color: var(--ink);
}

.session-next {
  margin-top: 14px;
  background: var(--surface);
}

.session-next ol {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  padding-left: 20px;
}

.session-next li + li {
  margin-top: 7px;
}

.truth-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 24px 0;
  color: var(--muted);
  font-size: 12px;
}

.truth-strip div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pass);
  box-shadow: 0 0 0 4px rgba(29, 138, 74, 0.12);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 12px;
  padding-block: 24px 32px;
}

@media (max-width: 700px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    padding-block: 18px;
  }

  .preview-label {
    font-size: 10px;
    padding: 7px 9px;
  }

  .hero {
    margin: 46px auto 36px;
    text-align: left;
  }

  h1 {
    margin-inline: 0;
    font-size: clamp(42px, 14vw, 62px);
  }

  .hero-copy {
    margin-inline: 0;
  }

  .progress-rail {
    margin-inline: 6px;
  }

  .progress-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .progress-item strong {
    font-size: 11px;
  }

  .onboarding-card {
    min-height: 540px;
    border-radius: 18px;
    padding: 26px 20px;
  }

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

  .connect-heading,
  .command-actions,
  .truth-strip,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .runtime-version {
    align-self: flex-start;
  }

  .truth-strip {
    margin-inline: 8px;
  }

  .button-row .primary-button {
    flex: 1;
  }
}

@media (max-width: 390px) {
  .brand {
    font-size: 16px;
  }

  h1 {
    font-size: 42px;
  }

  .button-row {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .button-row .primary-button,
  .button-row .text-button {
    width: 100%;
  }
}

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