:root {
  color-scheme: light;
  --ink: #2b2118;
  --muted: #6b6256;
  --line: rgba(43, 33, 24, 0.13);
  --surface: #f7f6f3;
  --surface-soft: #fbfaf8;
  --orange: #b4471e;
  --orange-soft: rgba(180, 71, 30, 0.09);
  --white: #ffffff;
  --black: #111111;
  --max: 1100px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 3px;
}

.site-header {
  width: min(calc(100% - 48px), var(--max));
  height: 80px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-size: 29px;
  font-weight: 780;
  letter-spacing: -0.06em;
}

.header-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.onboarding {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: clamp(72px, 9vh, 108px) 0 72px;
  text-align: center;
}

.onboarding-hero {
  max-width: 940px;
  margin: 0 auto;
}

.eyebrow,
.step-kicker {
  margin: 0;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.onboarding h1 {
  margin: 18px auto 0;
  font-size: clamp(55px, 6vw, 84px);
  font-weight: 630;
  letter-spacing: -0.068em;
  line-height: 0.92;
  text-wrap: balance;
}

.hero-copy {
  max-width: 750px;
  margin: 27px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.65;
  text-wrap: balance;
}

.hero-copy code,
.step-copy code,
.fallback-panel code {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  font-weight: 700;
}

.client-selector {
  max-width: 700px;
  margin: 46px auto 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  background: var(--surface-soft);
  text-align: left;
}

.client-selector > p {
  margin: 0 4px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.client-options {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.client-choice {
  min-width: 0;
  min-height: 58px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.client-choice span {
  font-size: 15px;
  font-weight: 780;
}

.client-choice small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
  line-height: 1.25;
  text-align: right;
}

.client-choice.is-selected {
  background: var(--black);
  color: var(--white);
}

.client-choice.is-selected small {
  color: rgba(255, 255, 255, 0.68);
}

.install-guardrails {
  margin: 24px auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.install-guardrails span {
  padding: 0 13px;
  border-right: 1px solid var(--line);
}

.install-guardrails span:last-child {
  border-right: 0;
}

.onboarding-steps {
  max-width: 920px;
  margin: 76px auto 0;
  padding: 0;
  display: grid;
  gap: 18px;
  list-style: none;
}

.step-card {
  min-width: 0;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 22px;
  background: var(--surface-soft);
  text-align: left;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--black);
  color: var(--white);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.04em;
}

.step-content {
  min-width: 0;
}

.step-kicker {
  margin-top: 2px;
  font-size: 10px;
}

.step-content h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 660;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.step-copy {
  max-width: 700px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.client-panel {
  min-width: 0;
  margin-top: 26px;
}

.panel-meta,
.skill-label {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.03em;
}

.prompt-box {
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
}

.prompt-box p {
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.72;
}

.copy-button {
  width: 100%;
  min-height: 50px;
  margin-top: 12px;
  padding: 11px 16px;
  border: 0;
  border-radius: 9px;
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  font-size: 14px;
  font-weight: 760;
  transition: transform 160ms ease, opacity 160ms ease;
}

.copy-button:hover {
  transform: translateY(-1px);
}

.copy-button:active {
  transform: translateY(0);
  opacity: 0.8;
}

.login-list {
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}

.login-list li {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.login-list li > span {
  width: 26px;
  height: 26px;
  margin-bottom: 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 11px;
  font-weight: 820;
}

.login-list strong {
  font-size: 13px;
  font-weight: 780;
}

.login-list p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.security-note {
  margin-top: 12px;
  padding: 13px 15px;
  border-radius: 10px;
  background: var(--orange-soft);
  color: #7a3519;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.55;
}

.login-fallback {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.login-fallback summary {
  padding: 14px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
}

.fallback-panel {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 13px;
}

.fallback-panel p {
  margin: 0 0 8px;
}

.fallback-panel p:last-child {
  margin: 10px 0 0;
}

.fallback-panel > code,
.skill-label code {
  padding: 7px 9px;
  border-radius: 7px;
  display: inline-block;
  background: var(--surface);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.skill-label {
  align-items: flex-end;
}

.skill-label code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 720;
}

.first-task-prompt {
  border-color: rgba(180, 71, 30, 0.3);
}

.result-contract {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.result-contract div {
  min-width: 0;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.result-contract strong,
.result-contract span {
  display: block;
}

.result-contract strong {
  font-size: 12px;
  font-weight: 800;
}

.result-contract span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.protocol-link {
  margin-top: 25px;
  display: inline-block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-underline-offset: 3px;
}

.copy-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: calc(100vw - 32px);
  z-index: 20;
  padding: 11px 15px;
  border-radius: 10px;
  background: var(--black);
  color: var(--white);
  font-size: 13px;
  font-weight: 720;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .client-selector {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .client-selector > p {
    margin: 5px 6px 0;
  }

  .client-choice {
    display: block;
  }

  .client-choice small {
    margin-top: 3px;
    display: block;
    text-align: left;
  }

  .step-card {
    grid-template-columns: 1fr;
  }

  .login-list,
  .result-contract {
    grid-template-columns: 1fr;
  }

  .login-list li {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
  }

  .login-list li > span {
    margin: 0;
  }
}

@media (max-width: 520px) {
  .site-header,
  .onboarding {
    width: min(calc(100% - 32px), var(--max));
  }

  .site-header {
    height: 68px;
  }

  .wordmark {
    font-size: 25px;
  }

  .header-note {
    font-size: 10px;
  }

  .onboarding {
    padding: 42px 0 48px;
  }

  .onboarding h1 {
    margin-top: 14px;
    font-size: clamp(41px, 13vw, 54px);
  }

  .hero-copy {
    margin-top: 18px;
    font-size: 15px;
  }

  .client-selector {
    margin-top: 26px;
  }

  .client-choice {
    min-height: 62px;
    padding: 9px 11px;
  }

  .install-guardrails {
    gap: 7px 0;
  }

  .install-guardrails span {
    width: 50%;
  }

  .install-guardrails span:nth-child(2) {
    border-right: 0;
  }

  .onboarding-steps {
    margin-top: 40px;
  }

  .step-card {
    padding: 22px;
    border-radius: 16px;
  }

  .step-number {
    width: 42px;
    height: 42px;
  }

  .step-content h2 {
    font-size: 30px;
  }

  .panel-meta,
  .skill-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .prompt-box {
    padding: 16px;
  }

  .copy-toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    text-align: center;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
