html.document-page {
  --icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 4v12M4 10h12' fill='none' stroke='%230B0B0B' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  --icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10h10' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  --icon-external: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M7.5 4.5h8v8M15.5 4.5l-11 11' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  html.document-page:not([data-theme="light"]) {
    --icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 4v12M4 10h12' fill='none' stroke='%23F4F2F3' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    --icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10h10' fill='none' stroke='%23121012' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  }
}
/* Same, when Settings → Theme is set to Dark. */
html.document-page[data-theme="dark"] {
    --icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 4v12M4 10h12' fill='none' stroke='%23F4F2F3' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    --icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10h10' fill='none' stroke='%23121012' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  }

/* Hero */
.setup-main { max-width: 1040px; margin-top: 48px; }
.setup-main > * { max-width: none; }
.setup-main h1 { margin-bottom: 24px; font-size: 80px; line-height: 80px; }
.setup-main > .connect-lead { max-width: 600px; font-size: 18px; line-height: 28px; }
.setup-main > .connect-small { margin-top: 24px; }

/* Full-bleed hairline, then nav + content. */
.setup-layout { position: relative; display: grid; grid-template-columns: 200px minmax(0, 760px); gap: 40px; margin-top: 72px; }
.setup-layout::before { content: ""; position: absolute; top: 0; left: 50%; width: 100vw; height: 1px; transform: translateX(-50%); background: var(--line); }
.setup-nav { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; gap: 6px; padding-top: 48px; }
.setup-nav p { align-self: flex-start; display: flex; align-items: center; height: 22px; margin: 0; padding: 0 8px; background: var(--ink); color: var(--on-ink); font: 700 12px/14px var(--font); font-variation-settings: 'wdth' 75; letter-spacing: .04em; text-transform: uppercase; }
.setup-nav a { display: flex; align-items: center; height: 34px; padding: 0 8px; border-radius: 999px; color: var(--ink); font-weight: 400; font-size: 14px; line-height: 20px; text-decoration: none; }
.setup-nav a:hover { background: var(--fill); }
.setup-page:has(#chatgpt[open]) .setup-nav a[href="#chatgpt"],
.setup-page:has(#claude[open]) .setup-nav a[href="#claude"],
.setup-page:has(#vscode[open]) .setup-nav a[href="#vscode"],
.setup-page:has(#cursor[open]) .setup-nav a[href="#cursor"],
.setup-page:has(#claude-code[open]) .setup-nav a[href="#claude-code"],
.setup-page:has(#codex[open]) .setup-nav a[href="#codex"],
.setup-page:has(#gemini-cli[open]) .setup-nav a[href="#gemini-cli"] { background: var(--pistachio-tint); color: var(--pistachio-text); font-weight: 600; }
.setup-nav-rule { height: 1px; background: var(--line); }
.setup-content { min-width: 0; padding-top: 48px; }
.setup-content :is(section, details) { scroll-margin-top: 24px; }
.setup-main .setup-content section { margin-top: 72px; padding-top: 0; border-top: 0; }
.setup-main .setup-content > section:first-child { margin-top: 0; }
.setup-main .setup-content h2 { margin: 0; font-size: 24px; line-height: 30px; }
.setup-content p { line-height: 24px; }
.setup-content p.connect-small { font-size: 14px; line-height: 22px; }
.setup-content h2 + p { margin-top: 16px; }
#connection-details > label.connect-small { display: block; margin-top: 20px; font-weight: 500; font-size: 13px; line-height: 18px; }
#connection-details .connect-inline { margin-top: 8px; }
#connection-details .connect-inline + p { margin-top: 20px; }
#connection-details .setup-steps + p.connect-small { margin-top: 24px; }
#connection-details p.connect-small + p.connect-small { margin-top: 12px; }

/* Numbered steps: black condensed label blocks. */
.setup-steps { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; counter-reset: step; }
.setup-steps li { position: relative; min-height: 24px; padding-left: 38px; line-height: 24px; counter-increment: step; }
.setup-steps li::before { content: counter(step); position: absolute; top: 0; left: 0; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; background: var(--ink); color: var(--on-ink); font: 700 14px/16px var(--font); font-variation-settings: 'wdth' 75; }
.setup-page code, .setup-page pre { font: inherit; text-transform: none; }
.setup-page :not(pre) > code { overflow-wrap: anywhere; padding: 1px 5px; border-radius: 4px; background: var(--fill); font-weight: 500; font-size: 14px; }

/* Client accordions. */
.client-guide { border-top: 1px solid var(--line); }
.setup-content > section:first-child + .client-guide { margin-top: 48px; }
.client-guide:last-of-type { border-bottom: 1px solid var(--line); }
.client-guide summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 0; color: var(--ink); font-size: 17px; font-weight: 700; line-height: 24px; list-style: none; cursor: pointer; }
.client-guide summary::-webkit-details-marker { display: none; }
.client-guide summary::after { content: ""; flex-shrink: 0; width: 36px; height: 36px; border-radius: 999px; background: var(--icon-plus) center / 20px no-repeat, var(--fill); }
.client-guide[open] > summary::after { background: var(--icon-minus) center / 20px no-repeat, var(--ink); }
.client-guide small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 14px; font-weight: 400; line-height: 20px; letter-spacing: 0; }
.guide-body { padding: 0 0 28px; }
.guide-body > :first-child { margin-top: 0; }
.guide-body > .setup-steps:first-child { margin-top: 0; }
.guide-body > p { margin-top: 20px; }
.guide-body > .setup-steps + p { margin-top: 20px; }
.guide-body > p.connect-small { margin-top: 12px; }
.setup-content a[target="_blank"] { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.setup-content a[target="_blank"]::after { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--icon-external) center / contain no-repeat; mask: var(--icon-external) center / contain no-repeat; }

/* Copyable code (not drawn on Paper — styled as a D card). */
.setup-code { margin: 20px 0 0; overflow: hidden; border-radius: 8px; background: var(--fill); }
.setup-code > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 500; line-height: 18px; }
.setup-code pre { overflow-x: auto; margin: 0; padding: 16px; color: var(--ink); font-size: 14px; line-height: 22px; tab-size: 2; }
.setup-page .setup-code button { height: 32px; padding: 0 14px; font-size: 13px; }
.setup-content .setup-note { margin-top: 20px; padding-left: 16px; border-left: 4px solid var(--pistachio-ink); }

/* Try your connection. */
#first-test blockquote { margin-top: 16px; padding: 18px 24px 18px 28px; font-size: 14px; line-height: 22px; letter-spacing: 0; }
.setup-page button.setup-copy-prompt { height: 40px; margin-top: 12px; padding: 0 18px 0 14px; }
#first-test > p { margin-top: 24px; }
#first-test > p:has(+ blockquote) { margin-top: 28px; }
#first-test > blockquote + p { margin-top: 12px; }
#first-test > button + p { margin-top: 24px; }
.setup-tools { margin: 24px 0 0; border-top: 1px solid var(--line); }
.setup-tools > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); line-height: 24px; }
.setup-tools dt { font-weight: 600; overflow-wrap: anywhere; }
.setup-tools dd { margin: 0; color: var(--ink-2); }
.setup-tools + p { margin-top: 28px !important; }
#visual-guide-heading + p + p.connect-small { margin-top: 12px; }

/* Troubleshooting. */
#help-heading { padding-bottom: 20px; }
.setup-help { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 24px; margin: 0; border-top: 1px solid var(--line); }
.setup-help :is(dt, dd) { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--line); line-height: 24px; }
.setup-help dt { font-weight: 700; }
.setup-help dd { color: var(--ink-2); }
.setup-help dd strong { color: var(--ink); }
.setup-help + p { margin-top: 20px; }
.setup-page .connect-footer { margin-top: 72px; padding-bottom: 24px; }

/* Header pill */
.setup-page .connect-header .connect-pill { height: 36px; padding: 0 16px; }

/* Floating toast + skip link. */
.setup-copy-status { position: fixed; bottom: 24px; left: 50%; z-index: 1; box-sizing: border-box; width: max-content; max-width: calc(100% - 64px); margin: 0; padding: 12px 18px; transform: translateX(-50%); border: 1.5px solid var(--ink); border-radius: 14px; background: var(--ground); box-shadow: 3px 3px 0 var(--panel-shadow); color: var(--ink); font-size: 14px; font-weight: 500; line-height: 20px; }
.setup-copy-status:empty { display: none; }
.setup-skip { position: fixed; top: -100px; left: 20px; z-index: 2; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--on-ink) !important; font-weight: 600 !important; text-decoration: none !important; }
.setup-skip:focus { top: 12px; }

@media (max-width: 1120px) { .setup-layout { grid-template-columns: 180px minmax(0, 1fr); } }
@media (max-width: 760px) {
  .setup-main h1 { font-size: 44px; line-height: 46px; }
  .setup-main > .connect-lead { font-size: 16px; line-height: 24px; }
  .setup-layout { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 40px; }
  .setup-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 32px 0 24px; border-bottom: 1px solid var(--line); }
  .setup-nav p { flex-shrink: 0; margin: 0 100% 4px 0; white-space: nowrap; }
  .setup-nav a { padding: 0 14px; border: 1.5px solid var(--ink); font-weight: 600; }
  .setup-nav-rule { display: none; }
  .setup-content { padding-top: 32px; }
}
@media (max-width: 540px) {
  .setup-main { margin-top: 24px; }
  .setup-main h1 { font-size: 34px; line-height: 38px; }
  .setup-tools > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .setup-help { grid-template-columns: minmax(0, 1fr); }
  .setup-help dt { padding-bottom: 4px; border-bottom: 0; }
  .setup-help dd { padding-top: 0; }
  .setup-page .connect-header .connect-pill { height: 36px; padding: 0 14px; font-size: 13px; }
  .setup-page .connect-footer { flex-wrap: wrap; gap: 12px; }
}
