@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=DM+Sans:wght@400..700&display=swap');

:root {
  color-scheme: light;
  --paper: #faf6ed;
  --ink: #211b29;
  --muted: #5d5262;
  --plum: #3e2466;
  --border: #d8cecd;
  --yellow: #ffde65;
  font: 16px/1.55 "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--plum); text-underline-offset: .22em; }
button, input, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #6542aa; outline-offset: 4px; }
h1:focus { outline: none; }
.setup-header, .setup-footer, .setup-layout { width: min(100% - 88px, 1320px); margin-inline: auto; }
.setup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 86px;
}
.setup-brand { display: inline-flex; align-items: center; gap: 15px; text-decoration: none; color: var(--ink); }
.setup-brand img { display: block; object-fit: contain; }
.setup-brand span { border-left: 1px solid var(--border); padding-left: 15px; font-weight: 700; }
.account-nav { display: flex; align-items: center; gap: 14px; min-width: 0; color: var(--muted); font-size: .875rem; }
#nav-account { min-width: 0; overflow-wrap: anywhere; text-align: right; }
#sign-out, #account-password { white-space: nowrap; }
.setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .96fr);
  min-height: min(730px, calc(100svh - 142px));
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  background: #fffdf7;
  box-shadow: 0 14px 42px #4d30290d;
}
.setup-main { width: min(100%, 592px); padding: clamp(32px, 5vw, 72px); margin: auto; }
.setup-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  list-style: none;
  padding: 0;
  margin: 0 0 clamp(26px, 3vw, 44px);
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 600;
}
.setup-steps li { display: flex; align-items: center; gap: 7px; }
.setup-steps li + li::before { content: ""; width: 12px; border-top: 1px solid var(--border); margin-right: 3px; }
.setup-steps li > span { width: 9px; height: 9px; border: 1px solid #897b8e; border-radius: 50%; }
.setup-steps li[aria-current="step"] { color: var(--plum); font-weight: 700; }
.setup-steps li[aria-current="step"] > span { border-color: var(--plum); background: var(--plum); box-shadow: 0 0 0 3px #e8d9fa; }
.setup-steps li.is-done > span { background: #26734e; border-color: #26734e; }
h1, .art-copy h2 {
  margin: 0;
  font-family: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  font-optical-sizing: auto;
  font-weight: 750;
  line-height: .99;
  letter-spacing: -.045em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 4.05vw, 4rem); }
h1 + p { margin: 18px 0 26px; color: var(--muted); font-size: 1.04rem; overflow-wrap: anywhere; }
form { display: grid; }
label { margin-bottom: 6px; font-weight: 700; font-size: .9375rem; }
input, textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid #aa9cae;
  border-radius: 9px;
  background: #fffefa;
}
input { min-height: 48px; }
input + label { margin-top: 14px; }
input::placeholder { color: #736778; }
.field-note { margin: 7px 0 0; color: var(--muted); font-size: .875rem; }
.primary-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 51px;
  padding: 11px 15px;
  border: 1px solid var(--ink);
  border-radius: 9px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 3px 0 var(--ink);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.primary-action:hover { background: #ffcf35; }
.primary-action:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.primary-action:disabled, .text-action:disabled { opacity: .66; cursor: wait; }
form .primary-action { margin-top: 19px; }
.primary-action span { font-size: 1.25rem; line-height: 1; }
.switch-action { margin: 22px 0 0; font-size: .9375rem; color: var(--muted); }
.switch-action a { font-weight: 700; }
.secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 18px;
  margin-top: 16px;
  align-items: center;
  font-size: .875rem;
}
.text-action { background: none; border: 0; padding: 0; cursor: pointer; color: var(--plum); text-decoration: underline; text-underline-offset: .22em; }
.state-icon, .agent-icon { display: grid; place-items: center; border-radius: 10px; background: #ede3fa; color: var(--plum); }
.state-icon { width: 48px; height: 48px; margin-bottom: 16px; }
.state-icon-ready { background: #e1f1e5; color: #235a3c; }
.state-icon svg, .agent-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.agent-card { padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: #f9f3fd; }
.agent-card-heading { display: flex; gap: 12px; align-items: center; }
.agent-card-heading h2 { margin: 0; font-size: 1.05rem; line-height: 1.15; }
.agent-card-heading p { margin: 3px 0 0; }
.agent-icon { width: 37px; height: 37px; flex: none; background: var(--plum); color: #fff; }
.agent-card p, .agent-status p { font-size: .875rem; color: var(--muted); }
.agent-card > p { margin: 10px 0; }
.agent-card .project-chip { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; border-top: 1px solid #dfd2e6; padding-top: 8px; }
.project-chip span { color: var(--plum); }
.project-chip strong { color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
#agent-prompt { margin-top: 14px; font-size: .875rem; resize: vertical; }
.agent-status { display: flex; align-items: flex-start; gap: 9px; margin-top: 19px; font-size: .875rem; }
.agent-status p { margin: 2px 0 0; }
.status-indicator { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #89610b; margin-top: 6px; }
#setup-message {
  margin: 17px 0 0;
  border-left: 3px solid #6542aa;
  padding: 8px 11px;
  background: #f3ecfb;
  font-size: .875rem;
  overflow-wrap: anywhere;
}
#setup-message[role="alert"] { border-color: #9c303c; background: #fff0ee; color: #77222e; }
.setup-art {
  position: relative;
  display: grid;
  align-items: end;
  isolation: isolate;
  padding: clamp(26px, 3.8vw, 54px);
  min-width: 0;
  background: #211822;
  color: #fff8e9;
  overflow: hidden;
}
.setup-art img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 44%;
}
.setup-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 45%, #24152d22 61%, #1b1025cc 79%, #170e21f5);
}
.art-copy h2 { font-size: clamp(2.75rem, 4.85vw, 4.6rem); text-wrap: initial; }
.art-copy h2 em { color: var(--yellow); font-style: normal; }
.art-copy p { margin: 14px 0 0; max-width: 36ch; color: #fff6eb; font-size: 1rem; }
.setup-footer { display: flex; gap: 18px; padding-block: 15px; font-size: .8125rem; }
.setup-footer a { color: var(--muted); }
@media (max-width: 980px) {
  .setup-header, .setup-footer, .setup-layout { width: min(100% - 52px, 1320px); }
  .setup-main { padding: clamp(26px, 4.7vw, 45px); }
  .art-copy p { max-width: 32ch; }
}
@media (max-width: 700px) {
  .setup-header, .setup-footer, .setup-layout { width: min(100% - 28px, 480px); }
  .setup-header { min-height: 68px; gap: 12px; }
  .setup-brand { gap: 8px; }
  .setup-brand img { width: 64px; height: 44px; }
  .setup-brand span { padding-left: 8px; }
  .account-nav { font-size: .75rem; gap: 8px; }
  .account-nav:has(#account-password:not([hidden])) #nav-account { display: none; }
  .setup-layout { display: block; min-height: 0; border-radius: 17px; }
  .setup-main { padding: 27px clamp(18px, 5.5vw, 32px) 32px; }
  .setup-steps { margin-bottom: 28px; }
  .setup-art { padding: 22px; min-height: 270px; }
  .setup-art img { object-position: 50% 40%; }
  .setup-art::after { background: linear-gradient(180deg, transparent 48%, #24152d44 65%, #170e21f5 100%); }
  .art-copy h2 { font-size: clamp(1.8rem, 7.5vw, 2.65rem); }
  .art-copy p { margin-top: 7px; font-size: .8125rem; }
}
