/* The onboarding pages: setup.html, setup-github.html, invite.html, beta.html, link.html.
   Built on /brand.css (load it first). brand.css owns the tokens, type, wordmark and the parts:
   .b-btn (.p = primary), .b-card, .b-input, .b-label, .b-num. This file only lays them out and adds the
   parts that the onboarding needs (steps, choices, command rows, states). Static file: no inline style (CSP style-src 'self').
   Colour: green = good or live, amber = the person must act or something failed. A wait is grey (a spinner, no colour).
   One primary (white) button in a view. Progress is one plain line: "Step 2 of 3". */

/* names the page scripts and /copyprompt.css read, mapped onto the brand tokens */
:root {
  --surface: var(--card); --soft: var(--card2); --strong: var(--text); --on-strong: #070908;
  --font: var(--sans);
  --success: var(--green); --success-soft: rgba(122,227,95,.09); --success-line: rgba(122,227,95,.22);
  --warn: var(--amber);    --warn-soft: rgba(224,173,79,.09);    --warn-line: rgba(224,173,79,.24);
  --danger: var(--amber);  --danger-soft: var(--warn-soft);       --danger-line: var(--warn-line);     /* no red: a failure is amber */
  --field: #070908;
  --faint: #808984;        /* brand --faint is 4.05:1 on a card; small hints, the footer and the timer need 4.5:1 (WCAG AA) */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: var(--t-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
main, header { position: relative; z-index: 1; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--line3); }
a:hover { text-decoration-color: var(--text); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { color: var(--muted); }
strong { color: var(--text); font-weight: 500; }
code, .mono { font-family: var(--mono); font-size: 13px; letter-spacing: -0.01em; }
p code, li code, label.opt code, .hint code, .note code { padding: 1px 6px; border-radius: 6px; background: var(--card2); border: 1px solid var(--line); color: var(--text); font-size: 12.5px; white-space: nowrap; }
/* a command chip on its own line under the words that name it (no orphan period after it) */
label.opt span code.own, .hint code.own { display: block; width: max-content; max-width: 100%; margin-top: 6px; overflow-wrap: anywhere; white-space: normal; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
svg.gh { width: 16px; height: 16px; fill: currentColor; flex: none; }

/* ---------- header ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(5,7,6,.78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar .in { max-width: 1120px; margin: 0 auto; padding: 0 16px; height: 58px; display: flex; align-items: center; gap: 12px; }   /* the landing .nav: same width */
.bar .b-word { min-height: 40px; border-radius: 8px; }
.bar .right { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.bar .ghost { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; color: var(--muted); text-decoration: none; }   /* a text link, as on the landing */
.bar .ghost:hover { color: var(--text); }
.bar .right .b-btn { min-height: 34px; padding: 0 13px; font-size: 13px; position: relative; }
.bar .right .b-btn::after { content: ""; position: absolute; inset: -5px -2px; }       /* a 44px tap area, a quiet 34px button */

/* ---------- page ---------- */
.wrap { max-width: 720px; margin: 0 auto; padding: 56px 24px 88px; }
.intro { margin-bottom: 28px; }
.intro h1 { font: var(--t-h1); font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.035em; font-optical-sizing: auto; }
.intro p { margin-top: 12px; font-size: 16px; line-height: 1.55; max-width: 34em; }
.intro p, .note, .why, .hint, .invite .cta .note { text-wrap: pretty; }

/* ---------- progress ---------- */
.progress { margin: 0 0 18px; }
.progress { display: flex; align-items: center; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; min-height: 40px; }
.steplbl { font-size: 13px; color: var(--muted); }
.progress .who { margin: 0; font-size: 13px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: var(--muted); min-width: 0; }
.progress .who > span { min-width: 0; overflow-wrap: anywhere; }

/* ---------- step cards (.b-card gives the surface) ---------- */
.step { position: relative; margin-bottom: 12px; overflow: hidden; transition: border-color .2s; }
.step.now { border-color: var(--line2); }
.step.done .head h2 { color: var(--muted); }
.step.done .why { display: none; }                                  /* the summary line says it */
.step.done .head { padding-bottom: 12px; }
.step.failed { border-color: var(--danger-line); }
.step.failed .eyebrow { color: var(--danger); }

.head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 20px 22px; }
.head > div:only-child { grid-column: 1 / -1; }
.head h2 { font: var(--t-h3); letter-spacing: -0.015em; }
.head .why { margin-top: 4px; font: var(--t-small); color: var(--muted); }
.eyebrow { display: block; margin-bottom: 8px; color: var(--faint); }
.eyebrow.warn { color: var(--amber); }

/* a step that waits for an earlier one: the track above names it, so the card does not show */
.step.locked { display: none; }
/* the current step while the person changes an earlier one: a closed card, title only */
.step.queued .head h2 { color: var(--muted); }
.step.queued .why, .step.queued .pill { display: none; }

.pill { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 999px; white-space: nowrap;
  font: var(--t-label); letter-spacing: .05em; text-transform: uppercase; color: var(--faint); border: 1px solid var(--line); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.now { color: var(--text); border-color: var(--line2); }
.pill.working { color: var(--muted); border-color: var(--line2); background: rgba(255,255,255,.02); }   /* a wait: grey */
.pill.attn { color: var(--amber); border-color: var(--warn-line); background: var(--warn-soft); }        /* the person must act */
.pill.working::before { animation: pulse 1.4s ease-in-out infinite; }
.pill.done { color: var(--green); border-color: var(--success-line); background: var(--success-soft); }
/* a status word next to a card title: a dot and sentence-case text, no border or fill (green = on, amber = needs you) */
.stat { display: inline-flex; align-items: center; gap: 8px; min-height: 24px; white-space: nowrap; font-size: 13px; color: var(--muted); }
.stat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.stat.ok::before { background: var(--green); }
.stat.attn::before { background: var(--amber); }
.pill.failed { color: var(--amber); border-color: transparent; background: none; padding: 0; }
.pill.failed::before { display: none; }
@keyframes pulse { 50% { opacity: .3; } }

.body { padding: 0 22px 22px; display: grid; gap: 16px; min-width: 0; }
.summary { padding: 0 22px 18px; margin-top: -8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 12px; font: var(--t-small); }
.summary .link { min-height: 24px; position: relative; justify-self: end; }
.summary .link::after { content: ""; position: absolute; inset: -10px -6px; }
#sum-move-text .b-num { font-family: var(--mono); font-size: 13px; letter-spacing: -0.01em; }
.summary .what { color: var(--text); overflow-wrap: anywhere; }
.summary .b-num, .ready .b-num { font-family: var(--sans); letter-spacing: 0; }      /* a number inside a sentence: tabular figures in the sans, no mono */
.step.done .pill { display: none; }                                 /* a done step: the track and the summary dot say it; one green signal */
.summary .what::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-right: 8px; vertical-align: 2px; }
/* step 1 done: the account alone, one line, cut with an ellipsis (the full name is its title) */
#sum-connect-text { display: flex; align-items: center; min-width: 0; overflow-wrap: normal; }
#sum-connect-text::before { flex: none; }
#sum-connect-text .val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 13px; }

/* all three steps done: the cards close up into one short "your setup" list under the green card,
   then "Signed in as" under the list. The footer line is for a setup in progress. */
main.all-done { display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - 59px); min-height: calc(100dvh - 59px); padding-top: 32px; padding-bottom: 12vh; }
.all-done .progress { justify-content: center; }
.all-done .progress { order: 1; margin: 14px 0 0; }
.all-done .progress .who { margin-top: 0; }
.all-done .intro { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
.all-done .step.done, .all-done #track-text { display: none; }
.all-done .step.done { margin: 0; border-radius: 0; border-bottom-width: 0; box-shadow: none; }
.all-done #s-connect { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.all-done #s-move { border-radius: 0 0 var(--r-lg) var(--r-lg); border-bottom-width: 1px; }
.all-done .step.done .head { padding: 14px 18px 2px; }
.all-done .step.done .head .why, .all-done .step.done .pill { display: none; }
.all-done .step.done .eyebrow { margin-bottom: 4px; }
.all-done .step.done .summary { padding: 0 18px 14px; margin-top: 0; }

/* single-card pages (link, the server's own small pages) */
.step > h1 { font: var(--t-h2); letter-spacing: -0.025em; padding: 24px 24px 0; }
.step > p { padding: 10px 24px 0; }
.step > p:last-child { padding-bottom: 24px; }

/* ---------- choices ---------- */
.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label.opt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; cursor: pointer;
  background: rgba(255,255,255,.015); transition: border-color .15s, background .15s; }
label.opt:hover { border-color: var(--line2); }
label.opt:has(input:checked) { border-color: var(--line3); background: var(--raised); }
label.opt:focus-within { outline: 2px solid var(--text); outline-offset: 2px; }
label.opt input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 2px 0 0; border-radius: 50%; border: 1.5px solid var(--line3); background: transparent; display: grid; place-items: center; cursor: pointer; }
label.opt input::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--on-strong); transform: scale(0); transition: transform .12s; }
label.opt input:checked { background: var(--text); border-color: var(--text); }
label.opt input:checked::after { transform: scale(1); }
label.opt b { display: block; font-weight: 500; font-size: 14px; color: var(--text); }
label.opt span { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 3px; }
label.opt span code { display: inline; }
fieldset.ask { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
fieldset.ask legend { font-size: 14px; font-weight: 500; padding: 0; margin-bottom: 10px; }
#connect-claude, #connect-codex, #f-claude { display: grid; gap: 14px; }

/* ---------- fields (.b-input gives the box) ---------- */
.field { display: grid; gap: 8px; min-width: 0; }
.field label, .field > span:first-child { font-size: 13px; font-weight: 500; color: var(--text); }
.field .hint, .hint { font-size: 12.5px; line-height: 1.5; color: var(--faint); }
.b-input { min-width: 0; transition: border-color .15s, box-shadow .15s; }
textarea.b-input { padding: 10px 12px; resize: vertical; min-height: 96px; line-height: 1.5; }
select.b-input { padding-right: 10px; }
.b-input::placeholder { color: var(--faint); }
.b-input.mono { font-size: 14px; }
.b-input.mono::placeholder { font-family: var(--sans); letter-spacing: 0; }          /* typed values in mono, the prompt in words */
input[type=file] { font: 12.5px var(--sans); color: var(--muted); max-width: 100%; }
.field.bad .b-input { border-color: var(--danger-line); }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.vh:focus-visible + label { outline: 2px solid var(--text); outline-offset: 3px; }
label.mini { min-height: 40px; padding: 0 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-width: 0; }
.row > .b-input { flex: 1 1 240px; width: auto; }
.check { display: inline-flex; gap: 10px; align-items: center; min-height: 40px; font-size: 13.5px; color: var(--muted); cursor: pointer; justify-self: start; }
.check input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 0; flex: none; border-radius: 4px; border: 1.5px solid var(--line3); background: transparent;
  display: grid; place-items: center; cursor: pointer; transition: background .12s, border-color .12s; }
.check input::after { content: ""; width: 4px; height: 8px; margin-top: -2px; border: solid var(--on-strong); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg) scale(0); transition: transform .12s; }
.check input:checked { background: var(--text); border-color: var(--text); }
.check input:checked::after { transform: rotate(45deg) scale(1); }
.check input:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

/* ---------- buttons (.b-btn from brand.css) ---------- */
/* .button is the old name of .b-btn.p: the Copy button of step 3 and the invite button keep it (tests read that markup) */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 10px; cursor: pointer;
  font: 500 14px var(--sans); text-decoration: none; background: var(--text); color: var(--on-strong); border: 1px solid var(--text); transition: background .15s; }
.button:hover { background: #fff; }
.b-btn { white-space: nowrap; }
.b-btn.big, .button.big { min-height: 48px; padding: 0 26px; font-size: 15px; }
.b-btn:disabled, .button:disabled { background: transparent; color: var(--faint); border-color: var(--line); cursor: default; }
.link { display: inline-flex; align-items: center; min-height: 32px; font: 13px var(--sans); color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--line3); text-underline-offset: 3px; }
.link:hover { color: var(--text); }
.mini { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 12px; flex: none; border-radius: 8px; border: 1px solid var(--line2);
  background: var(--card2); color: var(--text); font: 500 12.5px var(--sans); cursor: pointer; transition: background .15s, border-color .15s; }
.mini:hover { background: var(--raised); border-color: var(--line3); }
.mini:disabled { color: var(--faint); cursor: default; }

/* a fold inside a card: the second way (sign-in code, CI key). Open with no summary when it is the only way. */
details.fold { margin: 0 22px; }
details.fold > .body { padding: 10px 0 22px; }
details.fold > .opts { padding: 10px 0 6px; }
#gh-signin { padding-bottom: 14px; }
#s-signin.gh details.fold { margin-bottom: 8px; }
#s-signin.gh details.fold > .body { padding-bottom: 14px; }
#s-signin:not(.gh) #other-signin, #s-ci:not(.ci-ready) #ci-more { border-top: 0; padding-top: 0; margin: 0; }
#s-signin:not(.gh) #other-signin > summary, #s-ci:not(.ci-ready) #ci-more > summary { display: none; }
#s-signin:not(.gh) #other-signin > .body { padding: 0 22px 22px; }
#s-ci:not(.ci-ready) #ci-more > .opts { padding: 0; }
#s-ci.ci-ready .why { display: none; }
#s-ci #ci-more { margin: 0; border-top: 0; padding-top: 0; }
#s-ci:not(.ci-ready) #ci-more > .opts { margin-top: 0; }
#ci-how { padding-top: 0; border-top: 0; }
#ci-how > .opts { margin-top: 6px; padding-bottom: 6px; }

/* ---------- states ---------- */
div.working { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 13.5px; color: var(--muted); background: rgba(255,255,255,.02); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
.signin-steps .working { margin-top: 8px; }
.body.loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 120px; padding: 22px; color: var(--muted); font-size: 14px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 1.6px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { display: grid; gap: 4px; background: var(--danger-soft); border: 1px solid var(--danger-line); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; color: var(--danger); }
.error b { font-weight: 500; }
.error .todo { color: var(--text); }
.error .detail { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.note { font-size: 13px; line-height: 1.5; color: var(--muted); }
.ok-note { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--green); background: var(--success-soft); border: 1px solid var(--success-line); border-radius: 10px; padding: 12px 14px; }
.ok-note::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.wsum { font-size: 14px; color: var(--text); order: -1; }

/* step 2 while the server copies or waits for an upload: no form, only the progress (an upload keeps its commands) */
.is-working .choice, .is-working #f-repo, .is-working #f-token, .is-working .go-row, .is-working:not(.is-upload) #f-upload { display: none; }
.is-upload .up-name { display: none; }
.up-name { margin-bottom: 6px; }

/* the human key card is the one thing to do: other white buttons go plain until "I saved it" */
main:has(> #once-signin:not([hidden])) .step:not(#once-signin) .b-btn.p { background: rgba(255,255,255,.03); color: var(--text); border-color: var(--line2); }
/* the person must act: an amber 1px line and an amber dot, no fill (the same as the sign-in error box) */
.warn-note { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  font-size: 13.5px; color: var(--text); background: none; border: 1px solid var(--warn-line); border-radius: 10px; padding: 11px 13px; }
.warn-note::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
/* beta signed out: one row at every width, the message cut with an ellipsis, "Sign in" fixed at the right */
#msg.warn-note { flex-wrap: nowrap; }
#msg.warn-note > span { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#msg.warn-note > a { flex: none; }

/* the human key, shown one time */
.once-card { border-color: var(--warn-line); }
.once { display: grid; gap: 8px; }
.once .k { color: var(--amber); }
.once .v { word-break: break-all; }

/* numbered steps inside a card: small outlined circles, the same as "what happens next" */
.signin-steps, .next-steps ol, .body > ol:not(.signin-steps), #ci-steps { margin: 0; padding: 0; list-style: none; counter-reset: n; display: grid; gap: 14px; font-size: 14px; color: var(--muted); min-width: 0; }
.signin-steps > li, .next-steps li, .body > ol:not(.signin-steps) > li, #ci-steps > li { counter-increment: n; position: relative; padding-left: 34px; min-height: 22px; line-height: 1.6; min-width: 0; }
.signin-steps > li::before, .next-steps li::before, .body > ol:not(.signin-steps) > li::before, #ci-steps > li::before { content: counter(n); position: absolute; left: 0; top: 0; width: 22px; height: 22px;
  display: grid; place-items: center; font: 500 11.5px/1 var(--mono); color: var(--text); border-radius: 50%; border: 1px solid var(--line2); }
.next-steps ol { gap: 8px; margin-top: 10px; }
.signin-steps .cmd, .signin-steps form.row { margin-top: 8px; }
.signin-steps a.open { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; word-break: break-all; }
.bigurl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0 6px; }
.timer { display: block; font: 12px var(--mono); font-variant-numeric: tabular-nums; color: var(--faint); }
.tline { display: flex; align-items: center; justify-content: flex-start; gap: 16px; min-height: 40px; }
.tline .link { min-height: 40px; }


.facts, .body dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0; margin: 0; font-size: 14px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.facts dt, .body dl dt { color: var(--muted); padding: 11px 14px; border-top: 1px solid var(--line); }
.facts dd, .body dl dd { margin: 0; padding: 11px 14px; border-top: 1px solid var(--line); overflow-wrap: anywhere; color: var(--text); }
.facts dt:first-of-type, .facts dd:first-of-type, .body dl dt:first-of-type, .body dl dd:first-of-type { border-top: 0; }
.body dl dd.mono { font-size: 13px; }
#ucode { font-size: 15px; letter-spacing: .08em; }

/* setup done (kit success-done): a calm card, a green dot for the live session, the facts, two buttons */
#move-ready { display: block; padding: 22px; margin-bottom: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
#move-ready .live { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; min-width: 0; }
#move-ready .live .b-dot { flex: none; box-shadow: 0 0 0 3px rgba(122,227,95,.14); }
#move-ready .live .mono { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
#move-ready h2 { font: var(--t-h2); letter-spacing: -0.025em; color: var(--text); }
#move-ready .sub { margin-top: 8px; font-size: 15px; color: var(--muted); }
#move-ready .kv { margin: 22px 0 0; padding: 6px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.015); }
#move-ready .kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; min-width: 0; }
#move-ready .kv > div + div { border-top: 1px solid var(--line); }
#move-ready .kv dt { color: var(--muted); font-size: 14px; flex: none; }
#move-ready .kv dd { margin: 0; color: var(--text); font-size: 14px; text-align: right; min-width: 0; overflow-wrap: anywhere; }
#move-ready .kv dd.mono { font-size: 13px; font-family: var(--mono); }
/* one line each: a long email ends in an ellipsis (its title has all of it), never a break at a hyphen */
#move-ready .kv dd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
/* the done view: the card has its own Dashboard button, so the header one steps aside */
body:has(main.all-done) #bar-right { display: none !important; }
#move-ready .kv:not(:has(> div:not([hidden]))) { display: none; }
#move-ready .actions { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#move-ready .actions .b-btn { min-height: 44px; }

/* the setup code: one real input over eight boxes (kit code-input); pasting fills every box */
.otp { position: relative; display: flex; align-items: center; gap: 8px; max-width: 100%; }
.otp .bx { flex: 1 1 0; min-width: 0; max-width: 48px; aspect-ratio: 5 / 6; display: grid; place-items: center; border: 1px solid var(--line2); border-radius: 10px;
  background: var(--field); font: 500 20px var(--mono); color: var(--text); text-transform: uppercase; transition: border-color .15s, box-shadow .15s; }
.otp .bx.cur { border-color: var(--line3); box-shadow: 0 0 0 3px rgba(238,241,239,.08); }
.otp .bx.cur:empty::before { content: ""; width: 1.5px; height: 22px; background: var(--text); animation: blink 1s steps(1) infinite; }
.otp .sep { flex: none; width: 10px; height: 1.5px; background: var(--line3); }
.otp .otp-in { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; margin: 0; font-size: 16px; cursor: text; }
.otp:has(.otp-in:focus-visible) { outline: none; }
.field.bad .otp .bx { border-color: var(--danger-line); }
@keyframes blink { 50% { opacity: 0; } }

/* step 1: Codex, the second tool. One row: the name and a line, one plain button; the flow opens under it */
.tool { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; min-width: 0; }
.tool-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.tool-what { display: grid; gap: 2px; min-width: 0; }
.tool-what b { font-weight: 500; font-size: 14px; color: var(--text); }
.tool-sub { font-size: 13px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-sub.ok { font-family: var(--mono); font-size: 12.5px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.tool-sub.ok::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.tool-row > .b-btn { flex: none; }
#codex-code { font-size: 15px; letter-spacing: .08em; }
.tool .tline { min-height: 32px; }

/* step 1 edit view: one decision. Rename sits in one row; the key fold stays out of the way */
#s-connect.editing #other-connect { display: none; }
#f-rename .row.inline { flex-wrap: nowrap; }
#f-rename .row.inline > .b-btn { flex: none; }
#f-rename .row.inline > .b-input { flex: 1 1 auto; min-width: 0; }
/* Claude sign-in turned off on the server: the key form is the one way, open, no fold and no "only if" note */
#s-connect.signin-off #other-connect { border-top: 0; padding-top: 0; }
#s-connect.signin-off #other-connect > summary, #s-connect.signin-off #f-apikey > .note { display: none; }
#s-connect.signin-off #other-connect > form { margin-top: 0; }
.code-row { margin-top: 8px; }

.ready { display: flex; gap: 14px; align-items: flex-start; background: var(--success-soft); border: 1px solid var(--success-line); border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 20px; }
.ready svg { width: 22px; height: 22px; flex: none; stroke: var(--green); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.ready > div { min-width: 0; flex: 1; }
.ready h3 { font: var(--t-h3); color: var(--text); }
.ready p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.ready .actions { margin-top: 14px; }
.ready .mono { color: var(--text); overflow-wrap: anywhere; }
.ready.quiet { background: var(--card); border-color: var(--line); }
.ready.quiet svg { display: none; }
.body.solo { padding: 18px 22px; }
.done-view { display: grid; gap: 16px; justify-items: start; }
.intro + .ready { margin-top: -8px; }

/* a command or value with a Copy button */
.cmd { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line2); border-radius: 10px; padding: 8px 8px 8px 12px; background: var(--field); min-width: 0; }
.cmd code { flex: 1; min-width: 0; padding: 7px 0 0; margin: 0; background: none; border: 0; border-radius: 0; font-size: 13px; color: var(--text);
  white-space: pre-wrap; overflow-wrap: break-word; }                    /* breaks between words; a long word only when it must */
.cmd .v, #ci-secret { word-break: break-all; }                           /* random keys: any break is fine */
.cmd code .nw { white-space: nowrap; }
.cmd code:empty::before { content: "…"; color: var(--faint); }
.cmd.big { align-items: center; padding: 8px 8px 8px 16px; }
.cmd.big code { padding-top: 0; font-size: 17px; font-weight: 500; }
.cmd.big code::before { content: "> "; color: var(--faint); }

.paste { display: grid; gap: 10px; }
/* a command on one line: it scrolls sideways inside its box, the button stays pinned at the right.
   When it does not fit, setup.js adds .more and the right edge fades, so the cut-off end is plain to see. */
.up-steps > li { color: var(--text); font-weight: 500; }
.up-steps .cmd { font-weight: 400; }
.cmd.line { align-items: center; padding: 6px 6px 6px 12px; }
.cmd.line code { padding: 0; white-space: pre; overflow-x: auto; overflow-wrap: normal; word-break: normal; scrollbar-width: none; line-height: 32px; }
.cmd.line code::-webkit-scrollbar { display: none; }
.cmd.line code.more { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
.cmd.line .mini { flex: none; align-self: center; }
.paste h3, .next-steps h3 { font-size: 14.5px; font-weight: 500; }
details.other { border-top: 1px solid var(--line); padding-top: 6px; }
details.other > summary { display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; }
details.other > summary::-webkit-details-marker { display: none; }
details.other > summary::before { content: ""; width: 6px; height: 6px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); transition: transform .15s; }
details.other[open] > summary::before { transform: rotate(45deg); }
details.other > summary:hover { color: var(--text); }
details.other form, details.other .opts { margin-top: 10px; }
.opts { display: grid; gap: 18px; }

/* lists inside a card (setup-github) */
.body > ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.body > ul li { position: relative; padding-left: 18px; }
.body > ul li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--line3); }

/* setup-github: the values to paste in GitHub */
#ci-secret { word-break: break-all; }
#f-ci, #f-make { display: grid; gap: 16px; min-width: 0; }

/* an inline link in a sentence: a 40px tap area with no change to the line */
a.tap { position: relative; }
a.tap::after { content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 44px; transform: translateY(-50%); }

/* bento cards: invite "what you get", beta */
.gets, .grid3 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gets li, .grid3 li { display: grid; gap: 6px; align-content: start; padding: 18px; min-width: 0; }
.gets b, .grid3 b { font-weight: 500; font-size: 14.5px; letter-spacing: -0.01em; color: var(--text); }
.gets span, .grid3 span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.grid3 .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 500 11.5px/1 var(--mono); color: var(--text); border: 1px solid var(--line2); margin-bottom: 6px; }
/* invite: one moment, one button, centred like the landing hero */
.invite .intro.hero { text-align: center; display: grid; justify-items: center; margin-bottom: 40px; }
.invite .intro.hero p { margin-left: auto; margin-right: auto; }
.invite .badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 12px; border: 1px solid var(--line2); border-radius: 999px; background: rgba(255,255,255,.02); color: var(--text); font-size: 11.5px; line-height: 1.3; }
.invite .badge + h1 { font: var(--t-h1); letter-spacing: -0.035em; }
.invite .cta { display: grid; justify-items: center; gap: 12px; margin-top: 26px; }
.invite .cta .note { max-width: 30em; margin: 0; font-size: 13px; color: var(--faint); }
.sect { margin: 36px 0 12px; }
.sect:first-of-type { margin-top: 0; }
.limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--card); }
.limits > div { padding: 14px 18px; border-top: 1px solid var(--line); display: grid; gap: 2px; min-width: 0; }
.limits > div:nth-child(-n+2) { border-top: 0; }
.limits > div:nth-child(even) { border-left: 1px solid var(--line); }
.limits dt { font-size: 13px; color: var(--muted); }
.limits dd { margin: 0; font-size: 15px; color: var(--text); }
.limits .b-num { font-family: var(--sans); letter-spacing: 0; }   /* every value in the sans with tabular figures: one font in the grid */
.sect.plain { font: 500 14px var(--sans); letter-spacing: -0.01em; text-transform: none; color: var(--text); }
.fine { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13.5px; color: var(--muted); }
.fine li { position: relative; padding-left: 16px; }
.fine-note { margin-top: 12px; font-size: 13px; }
.warn-note .tap { color: var(--text); font-weight: 500; }
.fine li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--line3); }
#s-feedback { margin-top: 36px; }

/* other pages that load this file and keep the old names (agents.html, the server's own small pages): same look, no new rules */
.step:not(.b-card) { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 -20px 80px -20px rgba(255,255,255,.05); }
.step.now:not(.b-card) { border-color: var(--line2); }
.button.secondary { background: rgba(255,255,255,.03); color: var(--text); border-color: var(--line2); }
.button.secondary:hover { background: rgba(255,255,255,.07); border-color: var(--line3); }
.button.small { min-height: 34px; padding: 0 13px; font-size: 13px; }
.mark { width: 20px; height: 20px; fill: currentColor; flex: none; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 500; text-decoration: none; }
.field > input:not(.b-input):not([type=checkbox]):not([type=radio]):not([type=file]), .field > textarea:not(.b-input) {
  width: 100%; min-height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--field); color: var(--text); font: 15px var(--sans); }

@media (prefers-reduced-motion: reduce) { .spin, .pill.working::before, .otp .bx.cur:empty::before { animation: none; } }

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .bar .in { padding: 0 16px; height: 56px; gap: 8px; }
  .bar .right .wide-only { display: none; }
  .bar .right .b-btn { padding: 0 12px; }
  .wrap { padding: 32px 16px 64px; }
  .intro { margin-bottom: 22px; }
  .intro h1 { font-size: 28px; line-height: 1.1; }
  .intro p { font-size: 15px; margin-top: 10px; }
  /* a pill sits on the first row next to the title; the description takes the whole width under them */
  .head { padding: 16px; column-gap: 10px; row-gap: 4px; align-items: center; }
  .head > div { display: contents; }
  .head > div > * { grid-column: 1; }
  .head > div > .why { grid-column: 1 / -1; margin-top: 0; }
  .head > div:only-child > * { grid-column: 1 / -1; }
  .head > .pill, .head > .stat { grid-column: 2; grid-row: 1; }
  .head > div > .eyebrow { margin-bottom: 4px; }
  .once-card .head > div > h2 { grid-row: auto; }
  .body, .summary { padding-left: 16px; padding-right: 16px; }
  details.fold { margin: 0 16px; }
  #s-signin:not(.gh) #other-signin > .body { padding: 0 16px 18px; }
  .body.solo { padding: 16px; }
  .body.loading { padding: 16px; }
  .body { padding-bottom: 18px; }
  .bigurl .b-btn { width: 100%; }
  .step > h1 { padding: 20px 16px 0; } .step > p { padding: 10px 16px 0; } .step > p:last-child { padding-bottom: 20px; }
  .choice, .choice.three, .gets, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .gets, .grid3 { gap: 10px; }
  .gets li, .grid3 li { padding: 14px 16px; gap: 4px; }
  .grid3 li:has(.n) { grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; }
  .grid3 .n { grid-row: span 2; margin: 0; }
  .invite .intro.hero { margin-bottom: 28px; }
  .invite .badge { margin-bottom: 14px; }
  .invite .cta { margin-top: 20px; width: 100%; }
  .invite .cta .b-btn { width: 100%; }
  .row > .b-btn, .row > .button { flex: 1 1 100%; }
  .b-btn, .button { min-height: 44px; }
  .bar .right .b-btn { min-height: 34px; }
  .mini, .link { min-height: 40px; }
  .cmd .mini { min-height: 32px; }
  .b-input { min-height: 44px; font-size: 16px; }
  .b-input.mono { font-size: 16px; }
  /* a command: it wraps, so all of it shows. Lines break at spaces first; a long URL breaks only when it must. Copy at the top right */
  .cmd { padding: 6px 6px 6px 12px; gap: 8px; align-items: flex-start; }
  .cmd code { padding: 7px 0 6px; white-space: pre-wrap; overflow-x: visible; overflow-wrap: break-word; word-break: normal; line-height: 1.55; font-size: 12.5px; }
  .cmd .v, #ci-secret { white-space: pre-wrap; word-break: break-all; overflow-x: visible; }
  /* a one-line command stays one line on a phone too: it scrolls sideways and its right edge fades (.more),
     so no URL or flag breaks in the middle. Copy always copies the whole line. */
  .cmd.line { align-items: center; }
  .cmd.line code { padding: 0; white-space: pre; overflow-x: auto; overflow-wrap: normal; word-break: normal; line-height: 32px; }
  .cmd.line .mini { align-self: center; }
  .cmd .mini { min-height: 32px; align-self: flex-start; position: relative; }
  .cmd.line .mini { align-self: center; }
  .cmd .mini::after { content: ""; position: absolute; inset: -6px -4px; }      /* a 44px tap area */
  .cmd.big { padding: 8px 8px 8px 14px; align-items: center; }
  .cmd.big code { font-size: 16px; padding: 0; }
  .cmd.big .button { min-height: 40px; }
  .b-btn.big, .button.big { width: 100%; }
  .ready { padding: 16px; }
  #move-ready { padding: 16px; }
  #move-ready .actions { grid-template-columns: minmax(0, 1fr); }
  /* a command inside a numbered step uses the whole card width, not the indent of the text */
  #f-upload .signin-steps > li > .cmd, #f-upload .signin-steps > li > .code-row { margin-left: -34px; }
  .otp { gap: 6px; }
  .otp .bx { font-size: 18px; border-radius: 8px; }
  .ready .actions .b-btn { flex: 1 1 100%; }
  .warn-note .b-btn { width: 100%; }
  .facts, .body dl { grid-template-columns: minmax(0, 1fr); }
  .facts dt, .body dl dt { padding: 10px 14px 0; font-size: 12px; }
  .facts dd, .body dl dd { border-top: 0; padding: 2px 14px 10px; }
  .facts dt:first-of-type, .body dl dt:first-of-type { border-top: 0; }
  .limits > div { padding: 12px 14px; }
  .all-done .step.done .head { padding: 12px 16px 2px; }
  .all-done .step.done .summary { padding: 0 16px 12px; }
  .tool-sub:not(.ok) { white-space: normal; }
  .tool-row { flex-direction: column; align-items: stretch; }
  .tool-row > .b-btn { width: 100%; }

}
@media (max-width: 360px) {
  /* "Step 1 of 3" on its own line, "Signed in as … · Sign out" under it on one baseline; the name ends in an ellipsis */
  .progress { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 2px; min-height: 0; }
  .progress .steplbl { white-space: nowrap; }
  .progress .who { width: 100%; flex-wrap: nowrap; gap: 10px; align-items: baseline; }
  .progress .who > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
  .progress .who .link { flex: none; min-height: 0; padding: 4px 0; position: relative; }
  .progress .who .link::after { content: ""; position: absolute; inset: -8px -6px; }      /* a 40px tap area on a short line */
  .all-done .progress { align-items: center; }
  .all-done .progress .who { width: auto; }
}
@media (max-width: 359px) {
  .intro h1 { font-size: 25px; }
  .limits { grid-template-columns: minmax(0, 1fr); }
  .limits > div:nth-child(2) { border-top: 1px solid var(--line); }
  .limits > div:nth-child(even) { border-left: 0; }
  .signin-steps > li { padding-left: 30px; }                          /* the number stays inline, a little smaller */
  .signin-steps > li::before { width: 20px; height: 20px; font-size: 11px; top: 1px; }
  #f-upload .signin-steps > li > .cmd, #f-upload .signin-steps > li > .code-row { margin-left: -30px; }
  .otp { gap: 4px; }
  .otp .sep { width: 6px; }
  .otp .bx { font-size: 16px; }
  /* the key line must show whole next to Copy: "use helicopter.dev" */
  .cmd.big { padding-left: 12px; gap: 6px; }
  .cmd.big code { font-size: 14px; letter-spacing: -0.02em; }
  .cmd.big code::before { content: ""; }
  .cmd.big .button { padding: 0 14px; }
}

/* step 1 edit view: no empty sign-in block between Rename and Done */
#s-connect.editing #f-claude:not(:has(#signin-steps:not([hidden]), #signin-prep:not([hidden]), #go-signin-start:not([hidden]))) { display: none; }
/* setup-github: the webhook secret is a one-line scroller like the URL above it (no break mid-token) */
.cmd.line #ci-secret { white-space: pre; word-break: normal; overflow-wrap: normal; }
.tool .tline { padding-left: 34px; }
.tool-sub { text-wrap: pretty; }
@media (max-width: 359px) { .tool .tline { padding-left: 30px; } }
#s-ci:not(.ci-ready) .head { padding-bottom: 8px; }
/* step 1: Claude and Codex are two equal rows (one button each); the first row has no line above it */
#tool-claude { border-top: 0; padding-top: 0; }
.tool-row > .b-btn:disabled { opacity: .45; cursor: default; }
#s-connect.editing #tool-claude .tool-row { display: none; }
#s-connect.editing #tool-claude { padding-top: 0; }
/* setup done: every value starts at the same column, so two equal emails end the same way */
#move-ready .kv > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
#move-ready .kv dd { text-align: right; }
@media (max-width: 359px) { #move-ready .kv > div { grid-template-columns: 64px minmax(0, 1fr); } }
/* the Codex phone app: the first way to drive the session, so its own row above the buttons.
   A green dot (live), "On your phone: Codex app → <name>", the pair code (or its link) at the right */
.phone-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 10px; margin: 12px 0 0;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.015); font-size: 14px; color: var(--text); }
.phone-line .b-dot { flex: none; }
.phone-line .pl-what { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
.phone-line .pl-what > span { min-width: 0; }
.phone-line .mono { font-family: var(--mono); font-size: 13px; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
#ready-codex-where::before { content: "\2192\00a0"; font-family: var(--sans); color: var(--muted); }
.phone-line .pl-end { justify-self: end; display: flex; align-items: center; }
.phone-line .pl-end:not(:has(> :not([hidden]))) { display: none; }
.phone-line .link { min-height: 32px; padding: 0; }
#ready-codex-pair { font-size: 15px; letter-spacing: .08em; }
#move-ready .phone-line { color: var(--text); font-size: 14px; margin-top: 12px; }
/* with the phone row: one button (Open the Claude app), Dashboard a text link next to it */
#move-ready.has-phone .actions { display: flex; align-items: center; gap: 20px; }
#move-ready.has-phone .actions .b-btn.p { flex: none; }
#move-ready.has-phone .actions #ready-dash { min-height: 44px; font-size: 14px; }
@media (max-width: 640px) {
  .phone-line { padding: 12px 14px; row-gap: 6px; }
  #move-ready.has-phone .actions { flex-direction: column; align-items: stretch; gap: 4px; }
  #move-ready.has-phone .actions .b-btn.p { width: 100%; }
  #move-ready.has-phone .actions #ready-dash { justify-content: center; }
}
@media (max-width: 359px) {
  /* the pair code goes under the words, in line with them (not squeezed at the right) */
  .phone-line { grid-template-columns: auto minmax(0, 1fr); }
  .phone-line .pl-end { grid-column: 2; justify-self: start; }
}
/* the done view on a phone: the card starts under the header, its buttons above the fold (no vertical centring) */
@media (max-width: 599px) {
  main.all-done { justify-content: flex-start; padding-top: 24px; padding-bottom: 40px; min-height: 0; }
}
/* the key line stays whole: the button keeps its word, the line never wraps */
.cmd.big code { white-space: nowrap; }
/* setup-github ready: the green "Ready" stat is the one green signal; the line under it is plain text */
.summary.plain .what { color: var(--muted); }
.summary.plain .what::before { display: none; }
/* the Claude flow's time line sits inside its numbered step: no extra indent, each part on one line */
.tool .signin-steps .tline { padding-left: 0; flex-wrap: wrap; gap: 4px 16px; }
.tool .tline .timer, .tool .tline .link { white-space: nowrap; }
#w-move.sel .spin { display: none; }

/* step 1 time line: the words in the sans like "Cancel" next to them, only the time in mono */
.timer { font: 12.5px var(--sans); font-variant-numeric: tabular-nums; }
.timer .t { font-family: var(--mono); font-size: 12px; color: var(--muted); }
/* a step's summary line: sans for words and emails alike (mono is for kv lists and commands); the dot hangs
   at the left so a second line starts under the text, and "Change" sits on the first line's baseline */
.summary { align-items: baseline; }
.summary .what { position: relative; padding-left: 14px; min-width: 0; text-wrap: pretty; }
.summary .what::before { position: absolute; left: 0; top: calc(.5lh - 3px); margin: 0; vertical-align: 0; }
#sum-connect-text { display: block; }
#sum-connect-text .val { display: block; font-family: var(--sans); font-size: inherit; letter-spacing: 0; }
#sum-move-text .b-num { font-family: var(--sans); font-size: inherit; letter-spacing: 0; }
/* step 1: one sign-in at a time; the other tool's button gives way to a muted line that says why */
.tool-wait { flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; }
@media (min-width: 641px) {
  /* both Connect buttons the same width, on the same right edge */
  .tool-row > .b-btn, .tool-row > .tool-wait { min-width: 168px; justify-content: center; text-align: center; }
}
.phone-line .b-dot { align-self: start; margin-top: 7px; }
.phone-line .pl-end { align-self: center; }
@media (max-width: 640px) { .tool-wait { margin-top: -4px; white-space: normal; } }
/* setup-github: a summary with no dot starts at the text edge; the App ID field sits at the same 18px rhythm as the copy rows */
.summary.plain .what { padding-left: 0; }
details.other #f-ci { margin-top: 0; }
/* CI ready: the "Change the key" fold sits right under the line (no dead band) */
#s-ci.ci-ready .summary { padding-bottom: 6px; }
#s-ci.ci-ready #ci-more { padding-top: 0; }
#s-ci.ci-ready > .body { padding-bottom: 12px; }
/* /link: the command to run again sits right under the intro, no card around a single row */
section.problem { margin-top: -8px; }
section.problem .cmd { max-width: 420px; }
/* /beta on a phone: the four short numbers two to a row; the two sentences take the whole row */
@media (max-width: 599px) {
  .limits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .limits > div { padding: 12px 14px; border-left: 0; border-top: 1px solid var(--line); }
  .limits > div:nth-child(-n+2) { border-top: 0; }
  .limits > div:nth-child(2), .limits > div:nth-child(4) { border-left: 1px solid var(--line); }
  .limits > div:nth-child(n+5) { grid-column: 1 / -1; }
}

.v3-body { display: grid; gap: 14px; }
.v3-body .row { flex-wrap: wrap; }
#setup-v3-title:focus { outline: none; }
#setup-v3-status { overflow-wrap: anywhere; }

/* The connected-account links and the skill form a single setup surface. */
.wrap:has(.setup-connections:not([hidden])) > .intro { margin-bottom: 24px; }
.wrap:has(.setup-connections:not([hidden])) > .intro h1 {
  font-size: clamp(30px, 4.4vw, 44px);
  letter-spacing: -.045em;
}
.setup-workflow:has(.setup-skill:not([hidden])) {
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: var(--r-lg);
}
.setup-connections { border-radius: inherit; }
.setup-connection {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 13px 24px;
  text-decoration: none;
  transition: background .15s;
}
.setup-connection:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.setup-connection + .setup-connection { border-top: 1px solid var(--line); }
.setup-connection:hover { background: var(--card2); }
.setup-connection:focus-visible { outline-offset: -4px; }
.setup-provider-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  color: var(--text);
}
.setup-provider-pair { gap: 4px; }
.setup-provider-mark img { display: block; flex: none; }
.setup-connection-copy { display: grid; gap: 2px; min-width: 0; }
.setup-connection-copy strong { font: var(--t-h3); }
.setup-connection-copy > span { font: var(--t-small); color: var(--muted); overflow-wrap: anywhere; }
.setup-connection-action, .setup-invite { display: inline-flex; align-items: center; gap: 10px; }
.setup-connection-action { color: var(--text); font: 500 13px var(--sans); }
.setup-arrow {
  width: 7px;
  height: 7px;
  margin-inline-end: 2px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.setup-skill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 24px;
  padding: 27px 28px 23px;
  background: var(--card2);
  border-radius: inherit;
  scroll-margin-top: 78px;
}
.setup-connections:not([hidden]) + .setup-skill {
  border-top: 1px solid var(--line2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.setup-skill h2 { font: var(--t-h2); letter-spacing: -.025em; text-wrap: pretty; }
.setup-skill h2:focus { outline: none; }
.setup-skill-intro p { max-width: 42ch; margin-top: 7px; font-size: 14px; }
.setup-skill-actions { display: grid; justify-items: start; gap: 6px; }
#setup-skill-copy { min-height: 44px; }
#setup-skill-status { color: var(--muted); font-size: 12.5px; }
#setup-skill-status:empty { display: none; }
.setup-skill-details { grid-column: 1 / -1; color: var(--muted); font: var(--t-small); }
.setup-skill-details summary { cursor: pointer; padding-block: 8px; width: fit-content; }
.setup-skill-details summary:hover { color: var(--text); }
.setup-skill-details pre {
  margin: 6px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.setup-invite {
  min-height: 44px;
  margin-top: 14px;
  padding: 0 4px;
  color: var(--muted);
  font: var(--t-small);
  text-decoration: none;
}
.setup-invite:hover { color: var(--text); }
@media (max-width: 540px) {
  .wrap:has(.setup-connections:not([hidden])) { padding-top: 34px; }
  .setup-connection { grid-template-columns: 39px minmax(0, 1fr) auto; gap: 10px; min-height: 70px; padding-inline: 16px; }
  .setup-provider-pair img { width: 16px; height: 16px; }
  .setup-skill { grid-template-columns: minmax(0, 1fr); gap: 11px; padding: 23px 19px 16px; }
  .setup-skill-actions { justify-items: stretch; }
  .setup-skill-details summary { min-height: 44px; padding-block: 11px; }
}

.sandbox-options > summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
}
.sandbox-options > summary:hover { color: var(--text); }
.sandbox-options .field { margin-top: 14px; }

body.ax main.wrap:has(.handoff:not([hidden])) { width: min(100%, 740px); max-width: 740px; margin: 0 auto; padding: 28px 0 48px; }
main.wrap:has(.handoff:not([hidden])) .intro { margin-bottom: 18px; }
main.wrap:has(.handoff:not([hidden])) .b-dots { display: none; }
.handoff { display: grid; gap: 16px; scroll-margin-top: 76px; }
.handoff-card { display: grid; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.handoff-card h2 { font-size: 16px; line-height: 1.4; }
.handoff-card p, .handoff-status p, #handoff-secret label { font-size: 14px; color: var(--muted); }
.setup-prompt { border-color: var(--line2); }
.setup-prompt h2 { font: var(--t-h3); }
.setup-prompt h2 + p { margin-top: 5px; }
.setup-prompt pre {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.65 var(--mono, monospace);
}
.setup-prompt-actions, .setup-survey-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.handoff .b-btn { min-height: 44px; }
.handoff-status, .key-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.handoff-card p:empty { display: none; }
.setup-agent-tools { min-width: 0; margin: 0; padding: 0; border: 0; }
.setup-agent-tools legend { padding: 0; font: var(--t-h3); }
.setup-agent-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-block: 14px; }
.setup-agent-options label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  font: 500 13px/1.3 var(--sans);
  color: var(--text);
  cursor: pointer;
}
.setup-agent-options label:hover { background: var(--card2); }
.setup-agent-options label:has(:checked) { border-color: var(--text); background: var(--card2); }
.setup-agent-options label:has(:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }
.setup-agent-options img { display: block; object-fit: contain; }
.setup-agent-options input { width: 14px; height: 14px; margin: 0; accent-color: var(--text); }
.setup-other-tool { color: var(--muted); font-size: 18px; text-align: center; }
.setup-agent-survey .setup-agent-tools p { margin: 6px 0 0; }
.setup-agent-survey .setup-survey-actions p { margin: 0; }
#handoff-secret, #handoff-key-status, #handoff-manage { flex-basis: 100%; }
#handoff-secret { display: grid; gap: 9px; min-width: 0; }
#handoff-secret input { width: 100%; min-width: 0; }
#handoff-manage { font-size: 14px; }
@media (max-width: 600px) {
  body.ax main.wrap:has(.handoff:not([hidden])) { padding-top: 16px; }
  .handoff-card { padding: 16px; }
  .setup-agent-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-prompt-actions .p { flex: 1; }
  .setup-prompt-actions #setup-skill-status { flex-basis: 100%; }
}
.trial-terms { margin: 0; }
.trial-terms div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 0; border-block-start: 1px solid var(--line); }
.trial-terms div:last-child { border-block-end: 1px solid var(--line); }
.trial-terms dt { color: var(--muted); }
.trial-terms dd { margin: 0; }
#handoff-project { flex-basis: 100%; display: grid; gap: 9px; justify-items: start; border-top: 1px solid var(--line); padding-top: 14px; }
#api-project-name { overflow-wrap: anywhere; }
.trial-brand { display: none; }
.trial-page .intro, .trial-page .b-dots, .trial-page .bar .right { display: none; }
.trial-page main.wrap { max-width: 418px; width: 100%; margin: auto; padding: clamp(50px,12vh,106px) 24px 48px; }
.trial-page #setup-v3 { background: transparent; box-shadow: none; border: 0; border-radius: 0; }
.trial-page #setup-v3 .head, .trial-page #setup-v3 .body { padding: 0; }
.trial-page #setup-v3 .head { margin-bottom: 20px; }
.trial-page #setup-v3 .head h2 { font-size: clamp(28px,3vw,36px); line-height: 1.12; letter-spacing: -.045em; }
.trial-page #setup-v3 .why { font-size: 14px; line-height: 1.5; }
.trial-page #setup-v3 .row { display: grid; gap: 10px; }
.trial-page #setup-v3 .b-btn { min-height: 44px; }
@media (min-width: 850px) {
  .trial-page { min-height: 100dvh; display: flex; flex-direction: column; }
  .trial-page .bar { position: absolute; inset: 0 0 auto; backdrop-filter: none; background: transparent; border: 0; }
  .trial-page .bar .in { max-width: none; padding: 26px 48px; height: auto; }
  .trial-offer .trial-brand { position: fixed; inset: 0 auto 0 0; width: 44.5%; border-right: 1px solid var(--line); background: #090b0a; display: flex; justify-content: center; align-items: center; }
  .trial-brand img { width: min(84%,470px); height: auto; margin-bottom: 100px; }
  .trial-brand div { position: absolute; left: 9%; right: 7%; bottom: 9%; }
  .trial-brand h2 { margin: 0 0 18px; font-size: clamp(36px,3.7vw,56px); line-height: 1; letter-spacing: -.055em; }
  .trial-brand p { max-width: 46ch; color: var(--muted); }
  .trial-offer main.wrap { margin-left: calc(72.25% - 209px); }
  .trial-page main.wrap { padding-block: 80px; }
}
