/* Connecting an AI app: the connect page (connect.html), the OAuth consent page (authorize.html), the account page's
   onboarding checklist + connected apps (account.html), and the docs' setup tabs. Builds on site.css ("night grove"). */

/* Hosted-server mode; scoped so the public MCP guide and account/consent styles keep their existing behavior. */
.sc-mode .cx-page { display: none; }
.sc-page { padding-bottom: 64px; }
.sc-page[hidden], .sc-page [hidden] { display: none; }
.sc-lede { color: var(--text-dim); margin: 0 0 4px; max-width: 70ch; }
.sc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.sc-card { min-width: 0; padding: 24px; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); }
.sc-card:last-child { grid-column: 1 / -1; }
.sc-card h2 { margin: 10px 0 14px; }
.sc-card p { color: var(--text-dim); line-height: 1.6; }
.sc-label { color: var(--link); font: 600 var(--fs-xs)/1.5 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; }
.sc-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; }
.sc-copy code { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; padding: 8px 10px; background: var(--bg-input); border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.sc-copy > span { min-width: 64px; font-size: var(--fs-sm); color: var(--text-dim); }
.sc-card summary { cursor: pointer; margin: 16px 0; }
.sc-record { padding: 14px 0; border-bottom: 1px solid var(--border, #283232); }
.sc-record:last-child { border: 0; }
.sc-page .sc-error { color: #ffb8bf; overflow-wrap: anywhere; }
.sc-page .sc-error:empty { display: none; }
#scDomainForm { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 20px 0; }
#scDomainForm label { flex-basis: 100%; }
#scDomain { flex: 1 1 220px; width: 100%; min-width: 0; }
@media (max-width: 720px) { .sc-cards { grid-template-columns: 1fr; } .sc-card { padding: 18px; } }

/* ---------- consent (authorize.html, filled by src/cloud/mcp-oauth.js) ---------- */
.oa .eyebrow { margin-bottom: 12px; }
.oa .oa-title { font-size: clamp(26px, 2.5vw, 34px); line-height: 1.12; margin: 0 0 18px; overflow-wrap: anywhere; }
.oa-app { color: var(--amber); }
.oa .sub { color: var(--text-dim); margin-bottom: 22px; }
.oa-who { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg-input); border: 1px solid var(--line); margin-bottom: 18px; }
.oa-avatar { flex: none; width: 40px; height: 40px; image-rendering: pixelated; background: #1a1d1d; box-shadow: 0 0 0 2px #232828; }
.oa-letter { display: grid; place-items: center; font: 600 20px/1 var(--font-body); color: var(--amber-ink); background: var(--amber); }
/* width 0 + grow: the long email ellipsizes instead of widening the whole panel on a phone */
.oa-who > div { min-width: 0; flex: 1 1 0; width: 0; }
.oa-who b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-who span { display: block; font-size: 13.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-who .btn { margin-bottom: 3px; }
.oa-can { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; font-size: 15px; color: var(--text-dim); }
.oa-can li { position: relative; padding-left: 29px; line-height: 1.45; }
.oa-can li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; background: rgba(108, 201, 112, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3l2.6 2.5L12 5.4' fill='none' stroke='%236cc970' stroke-width='2.2' stroke-linecap='square'/%3E%3C/svg%3E") center/13px no-repeat; }
.oa-can li.no::before { background-color: rgba(255, 90, 110, 0.12); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 5l6 6M11 5l-6 6' fill='none' stroke='%23ff7a8c' stroke-width='2.2' stroke-linecap='square'/%3E%3C/svg%3E"); }
.oa-can b { color: var(--text); font-weight: 600; }
.oa-where { font-size: 13.5px; color: var(--text-faint); margin: 0 0 22px; line-height: 1.5; }
.oa-warn { font-size: 14px; line-height: 1.5; margin: 0 0 14px; padding: 10px 12px; color: #ffd0da; background: rgba(255, 90, 110, 0.1); border: 2px solid rgba(255, 90, 110, 0.45); }
.oa-warn b { color: #fff; }
.oa-where b { color: var(--text-dim); font-weight: 600; }
.oa-actions { gap: 14px; }
.oa-actions .btn { flex: 1 1 140px; }
.auth-form .oa-actions .btn-primary { width: auto; }
@media (max-width: 860px) { .oa-page { grid-template-columns: minmax(0, 1fr); } }

/* ---------- the connect page (connect.html + connect.js) ---------- */
.cx-head { padding-bottom: clamp(20px, 3vw, 32px); }
.cx-head h1 { max-width: 19ch; }
.cx-url { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 6px; padding: 10px 10px 10px 14px; background: var(--bg-input); border: 1px solid var(--line); max-width: 100%; }
.cx-url-label { font: 500 15px/1 var(--font-body); color: var(--text-faint); }
.cx-url code { background: none !important; border: 0 !important; padding: 0 !important; font-size: 15px; color: var(--teal) !important; overflow-wrap: anywhere; white-space: normal !important; }
.cx-url .btn { margin-bottom: 3px; }
.cx { padding-bottom: 96px; }
.cx-steps { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 18px; }
.cx-step { position: relative; background: var(--bg-1); border: 1px solid var(--line); padding: clamp(18px, 2.6vw, 30px); min-width: 0; }
.cx-step-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.cx-step-head h2 { font: 600 var(--fs-xl)/1.25 var(--font-body); margin: 0; }   /* a step title: the sans (in pixel type "Connect Claude Code" read "Oonnect Olaude Oode") */
.cx-n { flex: none; width: 36px; height: 36px; display: grid; place-items: center; font: 600 19px/1 var(--font-body); color: var(--amber-ink); background: var(--amber);
  box-shadow: inset 0 2px 0 #b8fff2, inset 0 -2px 0 var(--primary-lo), 0 0 0 2px #021a18; }
.cx-sub { font-size: 15px; margin: -6px 0 16px; }

/* step 1: the apps, as a row of tiles (logo, name, kind) that wraps */
.cx-clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.cx-client { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; text-align: center;
  padding: 18px 8px 14px; background: #0b0d0d; border: 1px solid var(--line); color: var(--text); font: inherit; cursor: var(--cur-pointer); transition: border-color 120ms, background 120ms, transform 80ms; min-width: 0; }
.cx-client:hover { border-color: #2f3838; background: #111515; }
.cx-client:active { transform: translateY(1px); }
.cx-client[aria-checked="true"] { border-color: var(--amber); background: #0d1a19; box-shadow: 4px 4px 0 rgba(63, 214, 200, 0.12); }
.cx-client[aria-checked="true"]::after { content: ""; position: absolute; top: -2px; right: -2px; width: 20px; height: 20px; background: var(--amber) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3l2.6 2.5L12 5.4' fill='none' stroke='%23022421' stroke-width='2.4' stroke-linecap='square'/%3E%3C/svg%3E") center/14px no-repeat; }
.cx-logo { width: 36px; height: 36px; margin-bottom: 8px; opacity: 0.82; transition: opacity 120ms, filter 120ms, transform 160ms var(--ease); }   /* colour: [data-ai] in site.css */
.cx-client:hover .cx-logo { opacity: 1; filter: brightness(1.12); transform: translateY(-2px); }
.cx-client[aria-checked="true"] .cx-logo { opacity: 1; filter: brightness(1.12); }
.cx-client b { max-width: 100%; font: 600 15.5px/1.15 var(--font-body); overflow-wrap: break-word; text-wrap: balance; }
.cx-client span { max-width: 100%; font-size: 12.5px; line-height: 1.25; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* step 2: how */
.cx-method { margin-bottom: 18px; }
.cx-only { margin: -4px 0 16px; font-size: 15px; color: var(--text-dim); }
.cx-only:empty { display: none; }
.cx-only b { color: var(--text); }
.cx-keybar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; padding: 14px 16px; margin-bottom: 22px; border: 2px dashed rgba(63, 214, 200, 0.4); background: rgba(63, 214, 200, 0.05); }
.cx-keybar.ok { border-style: solid; border-color: rgba(108, 201, 112, 0.45); background: rgba(108, 201, 112, 0.06); }
.cx-keybar > div:first-child { min-width: 0; flex: 1 1 280px; }
.cx-keybar b { display: block; font: 600 17px/1.25 var(--font-body); margin-bottom: 3px; }
.cx-keybar span { font-size: 14.5px; color: var(--text-dim); }
.cx-keybar .btn-row { gap: 12px; }
.cx-how { margin-bottom: 8px; }
.cx-how > li { color: #c9cfcf; min-width: 0; }   /* a grid item: without this a long command widens the whole step */
.cx-method { display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 520px; }
.cx-method button { white-space: normal; line-height: 1.15; }
.cx-how .code { margin: 12px 0 4px; }
/* commands wrap rather than scroll, so the whole key is always in view (Copy copies it as one line) */
.cx-how .code pre, #localPanels .code pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.cx-deeplink { margin: 12px 0 6px; }
.cx-after { margin: 10px 0 0; font-size: 14px; color: var(--text-dim); }
.cx-note { margin: 14px 0 0; padding: 12px 14px; font-size: 14px; color: var(--text-dim); border-left: 3px solid #2b3232; background: #0c0e0e; }
.cx-note[hidden] { display: none; }

/* step 3: the live check */
.cx-live { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); background: #0b0d0d; transition: border-color 300ms, background 300ms; }
.cx-live > div { min-width: 0; }
.cx-live b { display: block; font: 600 clamp(19px, 1.8vw, 22px)/1.2 var(--font-body); margin-bottom: 4px; }
.cx-live .dim { font-size: 14.5px; line-height: 1.5; }
.cx-live .faint { display: block; margin-top: 4px; }
.cx-pulse { flex: none; width: 34px; height: 34px; display: grid; place-items: center; font: 700 20px/1 var(--font-body); color: #06210a; background: var(--berry); box-shadow: 0 0 0 0 rgba(255, 180, 58, 0.55); animation: cx-pulse 1.8s infinite; }
@keyframes cx-pulse { 70% { box-shadow: 0 0 0 12px rgba(255, 180, 58, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 180, 58, 0); } }
.cx-live.out .cx-pulse { background: var(--line-2); animation: none; }
.cx-live.ok { border-color: rgba(108, 201, 112, 0.6); background: linear-gradient(90deg, rgba(108, 201, 112, 0.12), rgba(108, 201, 112, 0.03)); }
.cx-live.ok .cx-pulse { background: var(--green); animation: none; box-shadow: inset 0 2px 0 #c4f5c6, inset 0 -2px 0 #2f7a3b, 0 0 0 2px #06210a; }
.cx-live.ok b { color: #d9f5d0; }

/* step 4: prompts */
.cx-prompts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.cx-prompts .prompt { background: #0b0d0d; border: 1px solid var(--line); }

/* advanced: the local MCP */
.cx-advanced { border: 1px solid var(--line); background: #0e1010; margin-bottom: 40px; }
.cx-advanced[open] { border-color: #2b3232; }
.cx-advanced > summary { list-style: none; cursor: var(--cur-pointer); padding: 18px 54px 18px 22px; position: relative; display: grid; gap: 4px; }
.cx-advanced > summary::-webkit-details-marker { display: none; }
.cx-advanced > summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2px solid var(--text-dim); border-bottom: 2px solid var(--text-dim); transform: rotate(45deg); transition: transform var(--t); }
.cx-advanced[open] > summary::after { transform: rotate(225deg); margin-top: -2px; border-color: var(--amber); }
.cx-adv-title { font: 600 clamp(19px, 1.8vw, 22px)/1.2 var(--font-body); }
.cx-adv-sub { font-size: 14px; color: var(--text-faint); }
.cx-adv-body { padding: 4px 22px 22px; }
.cx-adv-body > p, .cx-adv-body li { color: #c9cfcf; }
.cx-why { padding-left: 1.2em; margin: 0 0 14px; }
.cx-why li { margin-bottom: 6px; }
.cx-why b { color: var(--text); }
.cx-dl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 12px 0 4px; }
.cx-folder { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-dim); flex: 1 1 260px; min-width: 0; }
.cx-folder .input { flex: 1; min-width: 0; padding: 9px 11px; font: 14px var(--font-mono); }
#localTabs { margin-top: 12px; flex-wrap: wrap; width: auto; }
.cx code.nw { white-space: nowrap !important; overflow-wrap: normal !important; }

.cx-help h2 { font-size: clamp(32px, 2.6vw, 36px); margin-bottom: 16px; }

/* the docs' setup section: every app's tab in view, commands wrap like on the connect page */
.docs-clients { flex-wrap: wrap; width: auto; }
#connect .code pre, #local .code pre { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 900px) { .cx-prompts { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .cx-clients { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .cx-client { padding: 14px 4px 11px; }
  .cx-logo { width: 30px; height: 30px; margin-bottom: 6px; }
  .cx-client b { font-size: 15px; }
  .cx-client span { font-size: 11.5px; }
  .cx-step-head { gap: 12px; margin-bottom: 14px; }
  .cx-n { width: 30px; height: 30px; font-size: 16px; }
  .cx-live { align-items: flex-start; padding: 14px; gap: 12px; }
  .cx-keybar .btn-row { width: 100%; }
  .cx-keybar .btn-row .btn { flex: 1; }
  .cx-folder { flex-direction: column; align-items: stretch; gap: 6px; }
  .cx-advanced > summary { padding: 16px 46px 16px 16px; }
  .cx-adv-body { padding: 4px 16px 18px; }
  .cx-method button { padding: 9px 10px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .cx-pulse { animation: none; } }

/* ---------- account page: getting started checklist + connected apps (account.js) ---------- */
.ob { display: grid; gap: 16px; }
.ob-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ob-steps li { position: relative; padding: 12px 12px 12px 46px; background: #0b0d0d; border: 1px solid var(--line); min-width: 0; }
.ob-steps li::before { content: attr(data-n); position: absolute; left: 10px; top: 12px; width: 26px; height: 26px; display: grid; place-items: center; font: 600 15px/1 var(--font-body); color: var(--text-dim); border: 1px solid var(--line-2); }
.ob-steps li.done { border-color: rgba(108, 201, 112, 0.4); background: rgba(108, 201, 112, 0.05); }
.ob-steps li.done::before { content: ""; border-color: transparent; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3l2.6 2.5L12 5.4' fill='none' stroke='%2306210a' stroke-width='2.4' stroke-linecap='square'/%3E%3C/svg%3E") center/16px no-repeat; }
.ob-steps li.next { border-color: var(--amber); box-shadow: 4px 4px 0 rgba(63, 214, 200, 0.1); }
.ob-steps li.next::before { color: var(--amber-ink); background: var(--amber); border-color: var(--amber); }
.ob-steps b { display: block; font: 600 16px/1.2 var(--font-body); margin-bottom: 3px; }
.ob-steps span { display: block; font-size: 13px; color: var(--text-faint); line-height: 1.35; }
.ob-steps a { font-size: 13px; }
.ob-bar { height: 8px; background: #1a1e1e; box-shadow: inset 0 0 0 2px #0a0c0c; }
.ob-bar i { display: block; height: 100%; width: 0; background: var(--green); transition: width 700ms var(--ease); }
@media (max-width: 900px) { .ob-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .ob-steps { grid-template-columns: 1fr; } }
.keys-table .seen { display: block; font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }
.keys-table .seen b { color: var(--text-dim); font-weight: 600; }
.apps-list { margin-top: 22px; }
.apps-list h3 { font-size: 18px; margin: 0 0 6px; }
.apps-list > p { font-size: 14.5px; margin: 0 0 12px; }
.sc-copy:has(> code:empty) { display: none; }   /* the vanity address shows only once the port is claimed (it drew as an empty bar) */

/* SEO landing pages (/minecraft-schematic-generator, /connect/claude, ...): body copy lines up with the hero column */
.seo-content { padding: 40px 0 80px; }
.seo-content p { max-width: 68ch; color: var(--text-dim); }
.seo-content p + p { margin-top: 14px; }
.seo-content h2 { margin: 0 0 14px; }
.seo-content * + h2 { margin-top: 40px; }
.seo-content ol { max-width: 68ch; margin: 0 0 16px; padding-left: 22px; color: var(--text); }
.seo-content ol li + li { margin-top: 8px; }
.seo-content ol li::marker { color: var(--amber); font-weight: 600; }
.seo-content .code { max-width: 760px; margin: 14px 0 18px; }
.seo-links { padding-top: 6px; }
/* /minecraft-server-hosting: the four server sizes as a flat row of cards */
.seo-tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
.seo-tiers article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.seo-tiers h3 { font-size: 16px; margin: 0 0 8px; color: var(--text); }
.seo-content .seo-tiers p { margin: 0; font-size: 14px; line-height: 1.55; }
@media (max-width: 960px) { .seo-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .seo-tiers { grid-template-columns: 1fr; } }
/* docs tables fit on a phone: the pricing page's "swipe to see every plan" hint doesn't apply here */
.docs .table-wrap::before { content: none; }
