
:root {
  --bg: #0e1015; --bg-elevated: #12151c; --surface: #151821; --surface-hover: #1c2029;
  --border: #222734; --border-strong: #2c3242; --text: #e6e8ee; --text-muted: #9aa1b2;
  --text-dim: #7d8597; --accent: #8b5cf6; --accent-hover: #a78bfa;
  --accent-dim: rgba(139, 92, 246, 0.16); --code-bg: #0b0d12; --ok: #34d399; --error: #f87171;
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica,
    Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas,
    monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 14.5px/1.55 var(--font-sans);
  min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
code { font-family: var(--font-mono); font-size: .9em; background: var(--code-bg);
  border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; }
.container { max-width: 1040px; margin: 0 auto; padding: 0 24px; width: 100%; }
.nav { position: sticky; top: 0; z-index: 10; background: var(--bg-elevated);
  border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px;
  color: var(--text); letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 24px; height: 24px; border-radius: 6px; flex-shrink: 0; }
.apps { display: flex; gap: 4px; flex: 1; }
.apps a { color: var(--text-muted); padding: 6px 10px; border-radius: 6px; font-weight: 500; }
.apps a:hover { color: var(--text); background: var(--surface-hover); }
.apps a[aria-current] { color: var(--text); background: var(--surface-hover); }
.spacer { flex: 1; }
.me { display: inline-flex; align-items: center; gap: 10px; color: var(--text-muted);
  font-size: 13px; }
.me:hover { color: var(--text); }
.me-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-wrap { position: relative; }
.menu-wrap > summary { list-style: none; cursor: pointer; }
.menu-wrap > summary::-webkit-details-marker { display: none; }
.menu { position: absolute; right: 0; top: 44px; width: 300px; max-width: calc(100vw - 32px);
  background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45); padding: 6px; z-index: 20; }
.menu-who { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px;
  border-bottom: 1px solid var(--border); }
.menu-who strong { display: block; font-size: 14px; color: var(--text); }
.menu-who span:not(.avatar) { display: block; color: var(--text-dim); font-size: 12.5px; }
.menu-section { padding: 6px 0; border-bottom: 1px solid var(--border); }
.menu-section:last-child { border-bottom: none; padding-bottom: 0; }
.menu-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-dim); padding: 6px 10px 2px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  border-radius: 6px; color: var(--text); font: 500 13.5px var(--font-sans); background: none;
  border: 0; text-align: left; cursor: pointer; }
.menu-item:hover { background: var(--surface-hover); color: var(--text); }
.menu-item .avatar { width: 22px; height: 22px; font-size: 10px; }
.avatar.alt { background: #2b3550; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--border-strong);
  color: var(--text); display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0; }
main { flex: 1; padding: 40px 0 72px; }
.narrow { max-width: 640px; margin: 0 auto; }
.intro { margin-bottom: 24px; }
/* A breadcrumb above the title, despite the name. */
.eyebrow { display: block; color: var(--text-dim); font-size: 13px; margin-bottom: 6px; }
h1 { font-size: 24px; line-height: 1.25; letter-spacing: -.015em; font-weight: 650;
  margin-bottom: 6px; }
h2 { font-size: 16px; letter-spacing: -.01em; font-weight: 650; }
.intro p, main > .narrow > p { color: var(--text-muted); }
.notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; border: 1px solid; }
.notice-ok { color: var(--ok); border-color: rgba(52, 211, 153, .35);
  background: rgba(52, 211, 153, .08); }
.notice-info { color: var(--text); border-color: var(--border-strong);
  background: var(--surface); }
.notice-error { color: var(--error); border-color: rgba(248, 113, 113, .35);
  background: rgba(248, 113, 113, .08); }
/* A fallback guide's steps, each with the exact values to enter listed under it. */
.steps, .card.steps { list-style: none; counter-reset: step; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding: 16px 20px 16px 60px;
  border-top: 1px solid var(--border); }
.steps > li:first-child { border-top: none; }
.steps > li::before { content: counter(step); position: absolute; left: 20px; top: 15px;
  width: 24px; height: 24px; border-radius: 50%; background: var(--surface-hover);
  color: var(--accent-hover); font-size: 12px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; }
.values { list-style: none; display: grid; gap: 6px; margin-top: 10px; color: var(--text-muted);
  font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 24px; margin-bottom: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border); }
.status { display: flex; align-items: center; gap: 10px; color: var(--text-muted);
  font-size: 13px; }
.pill { font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 3px 10px;
  border-radius: 999px; text-transform: uppercase; }
.pill-on { color: var(--ok); background: rgba(52, 211, 153, .12); }
.pill-off { color: var(--text-muted); background: var(--surface-hover); }
.field { margin-top: 18px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input[type=password], input[type=number], input[type=text], select { width: 100%;
  padding: 10px 12px;
  font: inherit; color: var(--text); background: var(--bg-elevated);
  border: 1px solid var(--border-strong); border-radius: 8px; transition: border-color .15s; }
input[type=password]:hover, input[type=number]:hover, input[type=text]:hover,
select:hover {
  border-color: var(--text-dim); }
input:focus, select:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim); }
input::placeholder { color: var(--text-dim); }
/* The upgrade form shows the limits of the plan picked in its dropdown. */
form:has(select[name=tier]) .tier-info { display: none; }
form:has(select[name=tier] option[value=personal]:checked) .tier-personal,
form:has(select[name=tier] option[value=team]:checked) .tier-team,
form:has(select[name=tier] option[value=personal_loop]:checked) .tier-personal_loop,
form:has(select[name=tier] option[value=team_loop]:checked) .tier-team_loop { display: block; }
.upgrade-to { margin: 4px 0; color: var(--text); }
/* Show only the fields for the chosen agent; the page runs no script, so :has() does it. */
form:has(select[name=agent] option[value=claude]:checked) .for-openai,
form:has(select[name=agent] option[value=openai]:checked) .for-claude {
  display: none; }
.help { color: var(--text-dim); font-size: 12.5px; margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px;
  color: var(--text-muted); margin-top: 20px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; margin-top: 24px;
  padding: 9px 18px; border-radius: 7px; font: 600 13.5px var(--font-sans); cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { color: #fff; }
.btn-secondary { background: var(--surface-hover); color: var(--text);
  border-color: var(--border-strong); margin-top: 14px; }
.btn-secondary:hover { border-color: var(--text-dim); color: var(--text); }
.signin { max-width: 400px; margin: 16px auto 0; }
.signin .intro { text-align: center; }
.btn-block { display: flex; width: 100%; margin-top: 10px; }
.card > .btn-block:first-child { margin-top: 0; }
.sign-in-extra { margin-top: 8px; font-size: 13px; color: var(--text-muted); }
.sign-in-extra summary { cursor: pointer; padding: 6px 2px; }
.sign-in-extra summary:hover { color: var(--text); }
.sign-in-extra[open] { background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 14px 14px; }
.sign-in-extra .field { margin-top: 8px; }
.account-kind { display: block; color: var(--text-dim); font-size: 12.5px; margin-top: 2px; }
.accounts { list-style: none; }
.account-name { flex: 1; min-width: 0; }
.account-actions { display: flex; align-items: center; gap: 10px; }
.github-accounts { margin: 14px 0; }
/* A picker's rows: tick what to connect; connected ones show a dot instead. */
.picks { list-style: none; margin: 12px 0 0; }
.picks-title { font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-dim); margin-top: 16px; }
.picks li { border-top: 1px solid var(--border); }
.picks li:first-child { border-top: none; }
.pick { display: flex; align-items: center; gap: 14px; padding: 12px 4px; margin: 0;
  font-weight: 400; cursor: pointer; }
.pick input { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }
.pick-box { width: 16px; flex-shrink: 0; }
label.pick:has(input:checked) { background: var(--accent-dim); }
fieldset.tiers { border: 0; padding: 0; min-width: 0; }
fieldset.tiers legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
label.tier { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
label.tier input { margin-top: 3px; flex: none; }
label.tier:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
label.tier:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
label.tier-off { cursor: not-allowed; opacity: .6; }
.tier-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tier-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.tier-estimate { color: var(--text-muted); font-size: 13px; }
.tier-desc { color: var(--text-muted); font-size: 13px; line-height: 1.45; }
.tier-reason { font-size: 13px; color: var(--text); font-style: italic; }
.picker-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--border); }
.picker-foot .btn { margin-top: 0; }
.picker-foot .help { margin-top: 0; flex: 1; min-width: 220px; }
.picker + details { margin-top: 14px; }
.use-keys { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.use-keys .btn, .connection .use-key .btn { margin-top: 0; }
.use-keys + .help { margin-top: 10px; }
.meter { height: 8px; border-radius: 999px; background: var(--surface-hover); overflow: hidden;
  margin-bottom: 20px; }
.meter-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.card.batch { padding: 0; overflow: hidden; }
.batch-rows { list-style: none; }
.batch-row { display: flex; align-items: center; gap: 14px; padding: 13px 20px;
  border-top: 1px solid var(--border); }
.batch-row:first-child { border-top: none; }
.batch-row .state { color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.mark { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: inline-flex;
  align-items: center; justify-content: center; border: 1px dashed var(--border-strong); }
.mark-ok { color: var(--ok); background: rgba(52, 211, 153, .15); border: none; }
.mark-error { color: var(--error); background: rgba(248, 113, 113, .14); border: none; }
.batch-foot { display: flex; justify-content: flex-end; padding: 16px 20px;
  border-top: 1px solid var(--border); background: var(--bg-elevated); }
.batch-foot .btn, .batch-continue .btn { margin-top: 0; }
.batch-continue { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.connections { list-style: none; margin-top: 10px; }
.connection { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--border); }
.connection:first-child { border-top: none; }
.connection .status { flex-wrap: wrap; justify-content: flex-end; }
.connection .account-name .help { margin-top: 4px; }
.connection form .btn { margin-top: 0; }
.account-card .connections { margin: 8px 0 4px; }
.shared-form { margin-top: 6px; padding-top: 4px; border-top: 1px solid var(--border); }
/* Straight under the card's heading, its rule already divides them. */
.card-head + .shared-form { margin-top: 0; border-top: 0; }
.plans { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.plans > h3 { margin-bottom: 8px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.form-foot .btn { margin-top: 0; }
.form-foot .help { margin-top: 0; }
.plan-row { padding: 14px 0; border-top: 1px solid var(--border); }
.plan-row:first-of-type { border-top: none; padding-top: 10px; }
.plan-row h3 { margin-bottom: 4px; }
.plan-row .billing { margin-top: 0; padding-top: 0; border-top: none; }
.upgrade-panel { margin-top: 14px; padding: 18px 20px; border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, .45); background: var(--accent-dim); }
.upgrade-head { font-size: 15px; font-weight: 600; color: var(--text); }
.upgrade-plans { list-style: none; padding: 0; margin-top: 8px; display: grid; gap: 4px;
  color: var(--text-muted); font-size: 13.5px; }
.upgrade-plans strong { color: var(--text); }
.upgrade-plans .price { color: var(--accent-hover); font-weight: 600; }
.upgrade-panel .upgrade .btn { margin-top: 14px; padding: 10px 22px; font-size: 14px; }
.advanced > summary { cursor: pointer; list-style: none; display: flex; flex-direction: column;
  gap: 4px; }
.advanced > summary::-webkit-details-marker { display: none; }
.advanced > summary h2::before { content: "▸ "; color: var(--text-dim); }
.advanced[open] > summary h2::before { content: "▾ "; }
.custom-setup { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.inline-form { margin-top: 10px; }
.inline-form .btn { margin-top: 0; }
.add-org { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-top: 16px; border-top: 1px solid var(--border); }
.add-org .btn { margin-top: 0; }
.add-org .help { margin-top: 0; flex: 1; min-width: 220px; }
.state { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); }
.dot-on { background: var(--ok); }
.dot-warn { background: #fbbf24; }
.state-warn { color: #fbbf24; }
.acct-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.acct-head h1 { margin: 0; }
.acct-kind { color: var(--text-muted); font-size: 14px; }
.acct-strip { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0 24px; font-size: 14px;
  color: var(--text-muted); }
.acct-strip .ok, .state .ok { color: var(--ok); }
.callout { border: 1px solid var(--accent); background: var(--accent-dim); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.account { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border); }
.account:first-child { padding-top: 0; }
.account:last-child { border-bottom: none; padding-bottom: 0; }
.account .btn { margin-top: 0; }
.add-account, .signout { display: flex; flex-wrap: wrap; gap: 0 10px; }
/* Connected accounts and deleting an account. */
.identities { list-style: none; margin-top: 8px; }
.identity { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0;
  border-top: 1px solid var(--border); }
.identity:first-child { border-top: none; }
.identity .account-name { min-width: 160px; }
.identity form .btn { margin-top: 0; }
/* One row a forge, like the accounts lists: badge, name, and Connect on the right. */
.connect-list { margin-top: 10px; }
.connect-list .account { justify-content: flex-start; gap: 14px; }
.connect-list .account-name { flex: 1; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.btn-link { background: none; border: 0; padding: 0; font: inherit; font-size: 13px;
  color: var(--accent-hover); cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
.wireframe-remove { display: inline; margin-left: 8px; }
.btn-quiet { background: transparent; color: var(--text-muted);
  border-color: var(--border-strong); }
.btn-quiet:hover { color: var(--text); border-color: var(--text-dim); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-danger { background: transparent; color: var(--error); border-color: rgba(248, 113, 113, .35);
  margin-top: 0; }
.btn-danger:hover { color: var(--error); border-color: var(--error); }
.btn-danger-solid { background: var(--error); color: #1a0b0b; border-color: var(--error);
  margin-top: 0; }
.btn-danger-solid:hover { color: #1a0b0b; }
.account-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap; }
.account-foot .btn { margin-top: 0; }
.card.danger { border-color: rgba(248, 113, 113, .35); }
.plan-list { list-style: none; margin-top: 12px; }
.plan-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px;
  padding: 12px 0; border-top: 1px solid var(--border); }
.plan-list li:first-child { border-top: none; }
.plan-list .when { color: var(--text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.plan-list .sub { flex-basis: 100%; color: var(--text-dim); font-size: 12.5px; }
.keeps { margin: 12px 0 8px 18px; color: var(--text-muted); font-size: 13.5px; }
.keeps li { margin-top: 4px; }
.signin .extra { margin: 8px 0 2px; font-size: 13px; color: var(--text-muted); text-align: center; }
.signin-note { text-align: center; }
.billing { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
.billing-plan { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.billing-actions { display: flex; flex-wrap: wrap; gap: 0 10px; }
.overview { list-style: none; padding: 0; overflow: hidden; }
.overview li + li { border-top: 1px solid var(--border); }
.overview-row, .row-link { display: flex; align-items: center; gap: 14px; color: var(--text);
  text-decoration: none; }
.overview-row { padding: 16px 20px; }
.overview-row:hover, .row-link:hover { background: var(--surface-hover); }
.forge-badge { width: 32px; height: 32px; border-radius: 8px; flex: none; display: inline-flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
  letter-spacing: .02em; color: #fff; background: var(--surface-hover);
  border: 1px solid var(--border-strong); }
.forge-badge.forge-github { color: var(--text); }
/* Each passes 4.5:1 with its text color. */
.forge-badge.forge-gitlab { background: #fc6d26; color: #1b0f08; border-color: transparent; }
.forge-badge.forge-bitbucket { background: #0052cc; border-color: transparent; }
.forge-badge.forge-azure { background: #005a9e; border-color: transparent; }
h1 .forge-badge { vertical-align: 3px; margin-right: 12px; }
.row-link { flex: 1; margin: -12px -8px; padding: 12px 8px; border-radius: 8px; }
.chevron { color: var(--text-dim); font-size: 18px; line-height: 1; }
.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.billing-plan .pill { flex: none; }
.billing-plan .help { margin-top: 0; }
h3 { font-size: 15px; letter-spacing: -.01em; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; }
.footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--text-dim);
  font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer nav a { color: var(--text-muted); }
.footer nav a:hover { color: var(--text); }
@media (max-width: 600px) { main { padding-top: 24px; } h1 { font-size: 21px; }
  .card { padding: 18px; } .container { padding: 0 16px; } .nav-inner { gap: 12px; }
  .me-name { display: none; } .btn-block { min-height: 44px; } }
