:root {
  --ink: #101014;
  --paper: #f7f3e8;
  --copy: #4f4a57;
  --muted: #70687a;
  --line: rgba(16, 16, 20, 0.1);
  --violet: rgb(124, 58, 237);
  --name-draft: #a33a12;
  --amber: #7c3aed;
  --green: #7c3aed;
  --cyan: #7c3aed;
  --blue: #7c3aed;
  --rose: #7c3aed;
  --shadow: 0 28px 90px rgba(55, 42, 19, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 10%, rgba(124, 58, 237, 0.19), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(124, 58, 237, 0.13), transparent 25%),
    linear-gradient(135deg, #efe8fb, #fbf7ef 44%, #f2edff);
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1240px, calc(100vw - 40px));
  height: min(790px, calc(100vh - 40px));
  min-height: 660px;
  display: grid;
  grid-template-rows: 64px 1fr 70px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  background:
    linear-gradient(rgba(124, 58, 237, 0.11), rgba(247, 243, 232, 0.96) 44%, #fbf7ef),
    var(--paper);
  box-shadow:
    0 36px 100px rgba(34, 22, 69, 0.24),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  backdrop-filter: blur(18px);
}

.access-shell {
  grid-template-rows: 1fr;
  place-items: center;
}

.access-gate {
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(360px, calc(100% - 40px));
}

.access-logo {
  width: 38px;
  height: 58px;
  object-fit: contain;
}

.access-field {
  width: 100%;
  height: 52px;
  display: grid;
  grid-template-columns: 1fr 48px;
  align-items: center;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 60px rgba(34, 22, 69, 0.12);
}

.access-field input {
  min-width: 0;
  height: 100%;
  padding: 0 0 0 24px;
  color: var(--violet);
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 18px;
  font-weight: 850;
}

.access-field input::placeholder {
  color: rgba(124, 58, 237, 0.42);
  opacity: 1;
}

.access-field button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-right: 7px;
  color: white;
  border: 0;
  border-radius: 999px;
  background: var(--violet);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.access-error {
  min-height: 18px;
  margin: -8px 0 0;
  color: var(--name-draft);
  font-size: 13px;
  font-weight: 850;
  opacity: 0;
}

.access-error.is-visible {
  opacity: 1;
}

.topbar,
.bottombar {
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.64);
  border-color: var(--line);
}

.topbar {
  position: relative;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 26px;
  height: 40px;
  object-fit: contain;
}

.brand strong {
  font-size: 18px;
  font-weight: 900;
}

.progress {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.progress {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  gap: 8px;
  height: 32px;
  padding: 0 12px;
}

.progress-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 16, 20, 0.08);
  cursor: pointer;
}

.progress-dot:disabled {
  cursor: default;
}

.progress-dot.active {
  width: 11px;
  height: 11px;
  background: var(--dot-color);
}

.progress-dot.done {
  background: rgba(124, 58, 237, 0.72);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(16, 16, 20, 0.14);
}

.status-dot.is-active {
  background: #22c55e;
  box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.13);
}

.app-shell.is-focus-only .progress,
.app-shell.is-focus-only .quiet {
  visibility: hidden;
  pointer-events: none;
}

.sync-note span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--violet);
}

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 38px 72px;
  overflow: hidden;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 16, 20, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 16, 20, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.stage-copy,
.focus-card,
.bottombar {
  position: relative;
  z-index: 1;
}

.stage-copy {
  width: min(850px, 100%);
  text-align: center;
}

.stage-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--stage-tint, var(--violet));
  font-size: 12px;
  font-weight: 900;
}

.stage-kicker span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 24px;
  color: white;
  border-radius: 999px;
  background: var(--stage-tint, var(--violet));
}

.stage-copy h1 {
  max-width: 850px;
  margin: 14px auto 10px;
  font-size: clamp(34px, 5vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

.stage-copy p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--copy);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.42;
}

.focus-card {
  width: min(680px, 100%);
  min-height: 340px;
  display: grid;
  place-items: center;
  margin-top: 28px;
  padding: 34px;
  border: 1px solid rgba(16, 16, 20, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.command-label,
.card-status {
  position: absolute;
  top: 18px;
}

.command-label {
  left: 20px;
  height: 24px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--muted);
  border-radius: 999px;
  background: rgba(247, 243, 232, 0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 900;
}

.card-status {
  right: 20px;
  display: flex;
  gap: 7px;
}

.card-status span {
  width: 16px;
  height: 4px;
  border-radius: 999px;
  background: rgba(16, 16, 20, 0.08);
}

.card-status span:first-child {
  background: var(--stage-tint, var(--violet));
}

.halo {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--stage-tint, var(--violet)) 18%, transparent);
  box-shadow:
    0 0 0 34px color-mix(in srgb, var(--stage-tint, var(--violet)) 5%, transparent),
    0 0 0 68px color-mix(in srgb, var(--stage-tint, var(--violet)) 4%, transparent),
    0 0 0 102px color-mix(in srgb, var(--stage-tint, var(--violet)) 3%, transparent);
}

.icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  color: var(--stage-tint, var(--violet));
  border-radius: 16px;
  background: color-mix(in srgb, var(--stage-tint, var(--violet)) 14%, transparent);
  font-size: 30px;
  font-weight: 900;
}

.legal-card,
.simple-card,
.identity-card,
.marketing-card,
.cockpit-card,
.brief-card {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  text-align: center;
}

.name-field {
  display: block;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.name-field input,
.identity-card input {
  width: 100%;
  height: 100%;
  padding: 0 24px;
  border: 0;
  outline: 0;
  background: transparent;
  text-align: center;
  font-size: 34px;
  font-weight: 900;
}

.name-field input {
  color: var(--name-draft);
}

.name-field.is-submitted input {
  color: var(--violet);
}

.identity-card input {
  color: var(--ink);
}

.name-field input::placeholder {
  color: var(--violet);
  opacity: 1;
}

.legal-card p,
.simple-card p,
.brief-card p,
.identity-card p,
.marketing-card p,
.cockpit-card a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.module-meta {
  margin: -4px 0 10px;
}

.module-meta-identity {
  color: rgb(143, 161, 196);
}

.mission-path {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  margin-top: 8px;
  padding: 0 14px;
  color: var(--violet);
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.09);
  font-size: 12px;
  font-weight: 900;
  pointer-events: none;
}

.simple-card h2,
.identity-card h2,
.marketing-card h2,
.cockpit-card h2 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.05;
}

.switch-row {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(247, 243, 232, 0.76);
  font-weight: 850;
}

.brief-card {
  width: min(520px, 100%);
  text-align: left;
}

.card-title {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 900;
}

textarea {
  width: 100%;
  height: 142px;
  resize: none;
  padding: 16px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: 0;
  background: var(--paper);
  font-size: 18px;
  font-weight: 650;
}

.guardrails {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.guardrails span {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.11);
  color: var(--violet);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.guardrails span:last-child {
  background: rgba(124, 58, 237, 0.08);
  color: var(--violet);
}

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

.identity-card input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  font-size: 16px;
  font-weight: 800;
}

.marketing-card strong {
  display: block;
  margin: 12px 0;
  font-size: 44px;
  line-height: 1;
}

.marketing-card small {
  display: block;
  margin-top: 12px;
  color: var(--copy);
  font-weight: 800;
}

.briefing {
  display: grid;
  gap: 0;
  margin-top: 24px;
  text-align: left;
}

.briefing div {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  min-height: 50px;
  border-bottom: 1px solid var(--line);
}

.briefing .briefing-item {
  grid-template-columns: 1fr;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.08);
  color: var(--violet);
  text-align: center;
}

.briefing span {
  color: var(--violet);
  font-weight: 900;
}

.bottombar {
  gap: 16px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.quiet,
.primary {
  height: 38px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

.quiet {
  width: 38px;
  padding: 0;
  color: var(--violet);
  background: rgba(255, 255, 255, 0.72);
  font-size: 22px;
  line-height: 1;
}

.quiet:disabled {
  opacity: 0.35;
  cursor: default;
}

.primary {
  min-width: 220px;
  padding: 0 22px;
  color: white;
  background: var(--violet);
}

.sync-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sync-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 540px) {
  .app-shell {
    width: 100%;
    min-height: 100vh;
    height: auto;
    grid-template-rows: 64px 1fr 74px;
    border: 0;
    border-radius: 0;
  }

  .topbar {
    gap: 12px;
    padding: 0 16px;
  }

  .brand strong {
    display: none;
  }

  .stage {
    padding: 30px 18px;
  }

  .stage-copy h1 {
    font-size: 31px;
  }

  .focus-card {
    min-height: 340px;
    padding: 26px 18px;
  }

  .sync-note {
    display: none;
  }

  .primary {
    min-width: 0;
  }
}
