.cg-connect {
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --cg-ui: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 16%, rgba(129, 24, 38, .07), transparent 28rem),
    var(--paper);
  color: var(--ink);
}

.cg-nav .nav__in { justify-content: space-between; }

.cg-hero {
  padding: 132px 0 88px;
  border-bottom: 1px solid var(--line);
}

.cg-setup-grid {
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(520px, 600px);
  justify-content: space-between;
  gap: 72px;
  align-items: start;
}

.cg-hero__copy { padding-top: 44px; }
.cg-kicker {
  color: var(--orange-deep);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.cg-hero__copy h1 {
  max-width: 620px;
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 5.2vw, 4.8rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.cg-lede {
  max-width: 570px;
  margin: 24px 0 0;
  color: var(--ink-2);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.65;
}

.cg-quick-steps {
  display: grid;
  gap: 17px;
  margin: 32px 0;
  padding: 0;
  list-style: none;
}

.cg-quick-steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 13px;
  align-items: start;
}

.cg-quick-steps li > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #d8cfc1;
  border-radius: 50%;
  background: rgba(255, 253, 249, .8);
  color: #811826;
  font-size: .8rem;
  font-weight: 800;
}

.cg-quick-steps strong { display: block; font-size: .96rem; }
.cg-quick-steps p { margin-top: 2px; color: var(--ink-2); font-size: .87rem; line-height: 1.5; }
.cg-open-chatgpt { min-width: 230px; }
.cg-policy { max-width: 430px; margin: 19px 0 0; color: var(--ink-3); font-size: .79rem; line-height: 1.55; }

.cg-example-wrap { min-width: 0; }
.cg-example-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 10px 10px 0;
  color: var(--ink-2);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.cg-example-label span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0a8f53;
  box-shadow: 0 0 0 4px rgba(10, 143, 83, .1);
}

.cg-mcp-dialog {
  box-sizing: border-box;
  width: 100%;
  padding: 22px 20px 18px;
  border: 1px solid #d9d9d9;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 34px 80px -34px rgba(28, 25, 21, .42), 0 8px 22px rgba(28, 25, 21, .08);
  color: #161616;
  font-family: var(--cg-ui);
  font-size: 14px;
  line-height: 1.35;
}

.cg-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 15px;
}
.cg-dialog-head h2 { font-family: var(--cg-ui); font-size: 1.29rem; font-weight: 700; letter-spacing: -.02em; }
.cg-dialog-close { color: #444; font-size: 1.28rem; font-weight: 300; line-height: 1; }

.cg-logo-callout {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px 18px;
  align-items: center;
  margin: 2px 0 21px;
  padding: 17px;
  border: 2px solid rgba(129, 24, 38, .25);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff0f2 0%, #fff 72%);
  box-shadow: 0 13px 28px -23px rgba(129, 24, 38, .7);
}
.cg-logo-callout__visual {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border: 1px solid rgba(129, 24, 38, .18);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 9px 22px -15px rgba(45, 16, 21, .55);
  text-decoration: none;
}
.cg-logo-callout__visual img { width: 86px; height: 86px; object-fit: contain; }
.cg-logo-callout__copy { min-width: 0; }
.cg-logo-step {
  margin: 0 0 3px;
  color: #811826;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.cg-logo-callout h3 {
  margin: 0;
  font-family: var(--cg-ui);
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -.015em;
}
.cg-logo-callout__copy > p:not(.cg-logo-step, .cg-logo-meta) {
  margin-top: 5px;
  color: #4d4d4d;
  font-size: .75rem;
  line-height: 1.4;
}
.cg-logo-meta { margin-top: 6px; color: #811826; font-size: .7rem; font-weight: 700; }
.cg-logo-download {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 10px;
  background: #811826;
  box-shadow: 0 9px 20px -14px rgba(129, 24, 38, .8);
  color: #fff !important;
  font: 750 .86rem/1 var(--cg-ui);
  text-decoration: none;
  transition: background .15s, box-shadow .15s, transform .15s;
}
.cg-logo-download span { font-size: 1.15rem; line-height: 1; }
.cg-logo-download:hover { background: #68121e; box-shadow: 0 11px 22px -14px rgba(129, 24, 38, .95); }
.cg-logo-download:active { transform: translateY(1px); }

.cg-form-field { display: grid; gap: 6px; margin-top: 14px; }
.cg-form-field > label,
.cg-connection > legend { padding: 0; font-size: .85rem; font-weight: 500; }

.cg-form-field > input,
.cg-input-copy input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid #d4d4d4;
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: #1d1d1d;
  font: 400 .86rem/1 var(--cg-ui);
}
.cg-input-copy input { font-family: var(--font-mono); font-size: .78rem; }
.cg-form-field > input:focus,
.cg-input-copy input:focus { border-color: #7b7b7b; box-shadow: 0 0 0 2px rgba(0, 0, 0, .08); }

.cg-input-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.cg-input-copy button {
  min-width: 68px;
  padding: 0 12px;
  border: 1px solid #d2d2d2;
  border-radius: 8px;
  background: #f7f7f7;
  color: #242424;
  font: 650 .77rem/1 var(--cg-ui);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.cg-input-copy button:hover { border-color: #ababab; background: #efefef; }
.cg-input-copy button:active { transform: translateY(1px); }
.cg-input-copy button:focus-visible,
.cg-logo-callout__visual:focus-visible,
.cg-logo-download:focus-visible,
.cg-dialog-actions a:focus-visible { outline: 3px solid rgba(255, 107, 53, .34); outline-offset: 2px; }

.cg-connection { position: relative; display: grid; gap: 7px; margin: 17px 0 0; padding: 0; border: 0; }
.cg-connection-switch {
  position: absolute;
  top: -4px;
  right: 0;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 9px;
  background: #f1f1f1;
  color: #8b8b8b;
  font-size: .69rem;
}
.cg-connection-switch span { padding: 4px 9px; border-radius: 7px; }
.cg-connection-switch span:first-child { background: #fff; color: #202020; box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }

.cg-advanced {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin-top: 16px;
  padding: 17px 15px;
  border: 1px solid #e5e5e5;
  border-radius: 9px;
  background: #fafafa;
  color: #adadad;
  text-align: left;
}
.cg-advanced span:first-child { display: grid; gap: 4px; }
.cg-advanced strong { font-size: .83rem; }
.cg-advanced small { max-width: 430px; font-size: .71rem; line-height: 1.35; }
.cg-advanced span:last-child { font-size: 1.2rem; }

.cg-risk {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid #f0b08d;
  border-radius: 7px;
  background: #fffaf7;
}
.cg-risk > span { color: #e75f20; font-size: 1rem; }
.cg-risk p { font-size: .79rem; }
.cg-risk a { text-underline-offset: 2px; }

.cg-consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 11px;
  align-items: start;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
}
.cg-consent input { width: 16px; height: 16px; margin: 5px 0 0; accent-color: #161616; }
.cg-consent label { display: grid; gap: 3px; }
.cg-consent strong { font-size: .82rem; }
.cg-consent span { color: #5d5d5d; font-size: .7rem; line-height: 1.42; }

.cg-copy-status { min-height: 18px; margin: 7px 2px -3px; color: #087c49; font-size: .72rem; font-weight: 700; }
.cg-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}
.cg-dialog-actions > a { font-size: .82rem; font-weight: 500; text-underline-offset: 2px; }
.cg-dialog-actions > div { display: flex; gap: 9px; }
.cg-dialog-actions button {
  height: 36px;
  padding: 0 17px;
  border: 1px solid #d6d6d6;
  border-radius: 999px;
  background: #f8f8f8;
  color: #222;
  font: 650 .77rem/1 var(--cg-ui);
}
.cg-dialog-actions .cg-create-disabled { border-color: #aaa; background: #aaa; color: #fff; }

.cg-trust { padding: 82px 0; background: var(--night); color: var(--night-text); }
.cg-trust__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; }
.cg-trust h2,
.cg-download h2 { font-family: var(--font-display); }
.cg-trust p,
.cg-trust li { color: var(--night-dim); }
.cg-download__box {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}
.cg-download h2,
.cg-download p { margin: 0; }
.cg-download p { margin-top: 8px; color: var(--ink-2); }
.cg-foot .foot__base { display: flex; justify-content: space-between; }

@media (max-width: 1020px) {
  .cg-setup-grid { grid-template-columns: minmax(280px, .8fr) minmax(480px, 1fr); gap: 38px; }
  .cg-hero__copy h1 { font-size: clamp(2.65rem, 5.5vw, 4rem); }
}

@media (max-width: 920px) {
  .cg-hero { padding-top: 120px; }
  .cg-setup-grid { grid-template-columns: minmax(0, 600px); justify-content: center; gap: 48px; }
  .cg-hero__copy { padding-top: 0; }
  .cg-hero__copy h1 { max-width: 680px; }
  .cg-lede,
  .cg-policy { max-width: 620px; }
  .cg-example-label { justify-content: flex-start; margin-left: 10px; }
  .cg-trust__grid { grid-template-columns: 1fr; gap: 36px; }
  .cg-download__box { align-items: stretch; flex-direction: column; }
}

@media (max-width: 640px) {
  .cg-hero { padding: 108px 0 64px; }
  .cg-hero__copy h1 { font-size: clamp(2.45rem, 12vw, 3.45rem); }
  .cg-quick-steps { margin-block: 28px; }
  .cg-open-chatgpt { width: 100%; }
  .cg-mcp-dialog { padding: 20px 15px 16px; border-radius: 18px; }
  .cg-dialog-head h2 { font-size: 1.13rem; }
  .cg-logo-callout { grid-template-columns: 76px minmax(0, 1fr); gap: 13px; padding: 14px; }
  .cg-logo-callout__visual { width: 72px; height: 72px; border-radius: 17px; }
  .cg-logo-callout__visual img { width: 64px; height: 64px; }
  .cg-logo-callout h3 { font-size: .98rem; }
  .cg-input-copy { grid-template-columns: 1fr; }
  .cg-input-copy button { min-height: 36px; }
  .cg-connection-switch { position: static; justify-self: start; margin: -1px 0 1px; }
  .cg-advanced { padding: 15px 13px; }
  .cg-dialog-actions { align-items: flex-start; flex-direction: column; }
  .cg-dialog-actions > div { width: 100%; }
  .cg-dialog-actions button { flex: 1; padding-inline: 10px; }
  .cg-foot .foot__base { align-items: flex-start; flex-direction: column; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .cg-connect *,
  .cg-connect *::before,
  .cg-connect *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
