/* /connect (api/connectpage.py). 2026-10-19 redesign (Gal: "tempting and
   cool, our language"): the landing hero's vocabulary on the shell page.
   Huge two-line headline with the lime word, aurora, the shiny lime button,
   the live example card as a chat mock, chips, a numbered step rail, a
   terminal copy box, segmented tabs and the tools grid. Literal colours so it
   reads the same under styles.css. Motion lives in web/agentfx.js and only
   ever animates from a state that script set itself (html.afx): without JS
   or with reduced motion everything here is visible and still. */
.cnwrap { max-width: 1180px; margin: 0 auto; padding: 8px 0 20px; color: #e8eaed; }
/* the OAuth pages (api/oauth.py: consent, refusals, return) reuse cnwrap,
   cn-step and cn-p as plain cards in the narrow FAQ column; the step grid
   above is scoped to .cn-steps so they keep that layout (regression
   2026-10-19, the free-account refusal squeezed into a 70px column) */
.faqwrap.cnwrap { max-width: 860px; margin: 0; padding: 14px 0 0; }
.card.cn-step { padding: 20px 22px 22px; margin-bottom: 14px; scroll-margin-top: 90px; }
.cnwrap code { font-family: "JetBrains Mono", monospace; }

/* ---------- hero ---------- */
.cn-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 48px; align-items: center; padding: 44px 8px 40px; overflow: hidden; border-radius: 22px; }
.cn-aur { position: absolute; inset: 0; z-index: -2; pointer-events: none; filter: blur(64px); opacity: .6; overflow: hidden; }
.cn-aur i { position: absolute; border-radius: 50%; }
.cn-aur i:nth-child(1) { width: 460px; height: 360px; right: 2%; top: 4%; background: radial-gradient(circle, rgba(198,242,78,.30), transparent 65%); animation: cnDrift 16s ease-in-out infinite; }
.cn-aur i:nth-child(2) { width: 420px; height: 340px; left: -4%; top: 34%; background: radial-gradient(circle, rgba(185,140,255,.20), transparent 65%); animation: cnDrift2 19s ease-in-out infinite; }
.cn-aur i:nth-child(3) { width: 340px; height: 260px; right: 34%; bottom: -10%; background: radial-gradient(circle, rgba(143,212,160,.18), transparent 65%); animation: cnDrift 22s ease-in-out infinite reverse; }
@keyframes cnDrift { 50% { transform: translate(60px, -40px) scale(1.18); } }
@keyframes cnDrift2 { 50% { transform: translate(-70px, 36px) scale(.9); } }
.cn-grid { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(198,242,78,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(198,242,78,.045) 1px, transparent 1px);
  background-size: 52px 52px; -webkit-mask-image: radial-gradient(ellipse at 40% 45%, #000 20%, transparent 70%); mask-image: radial-gradient(ellipse at 40% 45%, #000 20%, transparent 70%); }
.cn-hero-l, .cn-hero-r { min-width: 0; }
.cn-h1.lh1 { font-size: clamp(40px, 4.3vw, 64px); line-height: 1.02; letter-spacing: -.04em; font-weight: 800; color: #e8eaed; }
.cn-w { display: inline-block; }
.cn-ln { white-space: nowrap; }
@media (max-width: 480px) { .cn-ln { white-space: normal; } }
.cn-acc { background: linear-gradient(110deg, #c6f24e 20%, #e4ffa1 40%, #8fd4a0 55%, #c6f24e 80%); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: cnShine 6s 1.6s linear infinite; padding-bottom: .06em; }
@keyframes cnShine { to { background-position: -200% center; } }
.cn-live { display: inline-flex; align-items: center; margin: 22px 0 0; padding: 7px 14px; border: 1px solid rgba(143,212,160,.35); border-radius: 999px;
  background: rgba(143,212,160,.06); font: 500 11.5px "JetBrains Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: #8fd4a0; }
.cn-ping { width: 7px; height: 7px; border-radius: 50%; background: #c6f24e; margin-right: 10px; box-shadow: 0 0 0 0 rgba(198,242,78,.6); animation: cnPing 1.8s ease-out infinite; }
@keyframes cnPing { 70% { box-shadow: 0 0 0 9px rgba(198,242,78,0); } 100% { box-shadow: 0 0 0 0 rgba(198,242,78,0); } }
.cn-lede { font-size: 18px; line-height: 1.6; color: #b4bbc2; max-width: 54ch; margin: 18px 0 0; }
.cn-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cn-plan { margin: 16px 0 0; font-size: 13.5px; color: #a0a8b0; max-width: 56ch; }

/* the shiny lime button: the landing's .lp-btn glow, sheen and hover */
.cn-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px;
  padding: 0 26px; border-radius: 12px; background: #c6f24e; color: #08090b; border: 1px solid #c6f24e; font-weight: 700; font-size: 15.5px;
  text-decoration: none; overflow: hidden; transition: background .2s, box-shadow .25s, border-color .2s; will-change: transform; }
.cn-btn::after { content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-120%);
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); animation: cnSheen 3.6s ease-in-out infinite; }
@keyframes cnSheen { 60%, 100% { transform: translateX(120%); } }
.cn-btn svg { transition: transform .25s; }
.cn-btn:hover { background: #aedb32; color: #08090b; box-shadow: 0 14px 40px rgba(198,242,78,.32); text-decoration: none; }
.cn-btn:hover svg { transform: translateX(3px); }
.cn-btn:focus-visible, .cn-wk a:focus-visible, .cn-tools li:focus-visible { outline: 2px solid #c6f24e; outline-offset: 3px; }
.cn-btn.ghost { background: rgba(255,255,255,.03); color: #e8eaed; border-color: #2a3037; }
.cn-btn.ghost::after { display: none; }
.cn-btn.ghost:hover { border-color: #c6f24e; color: #c6f24e; box-shadow: none; background: rgba(198,242,78,.06); }

/* the example card as the hero's chat window */
.cn-hero .ad-card.cn-demo { margin: 0; }

/* ---------- works with ---------- */
.cn-works { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 4px 8px 0; padding: 18px 0 6px; border-top: 1px solid #1d2126; }
.cn-wk-h { margin: 0; font: 600 11.5px "JetBrains Mono", monospace; letter-spacing: .16em; text-transform: uppercase; color: #8fd4a0; }
.cn-wk, .lp-wk { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.wkc { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid #2a3037; border-radius: 999px;
  background: rgba(255,255,255,.03); color: #e8eaed; font: 600 13.5px Archivo, system-ui, sans-serif; text-decoration: none;
  transition: border-color .2s, color .2s, background .2s, box-shadow .25s, transform .2s; }
.wkc .wk-i { color: #8fd4a0; transition: color .2s; flex: 0 0 auto; }
a.wkc:hover, a.wkc:focus-visible, li.wkc:hover { border-color: #c6f24e; background: rgba(198,242,78,.08); box-shadow: 0 0 22px rgba(198,242,78,.18); transform: translateY(-2px); text-decoration: none; color: #e8eaed; }
a.wkc:hover .wk-i, li.wkc:hover .wk-i { color: #c6f24e; }

/* ---------- steps: a numbered rail that draws on scroll ---------- */
.cn-steps { position: relative; list-style: none; margin: 46px 0 0; padding: 0; }
.cn-steps::before { content: ""; position: absolute; left: 31px; top: 34px; bottom: 34px; width: 2px; background: #1d2126; border-radius: 2px; }
.cn-steps::after { content: ""; position: absolute; left: 31px; top: 34px; bottom: 34px; width: 2px; border-radius: 2px;
  background: linear-gradient(#c6f24e, #8fd4a0); transform-origin: 50% 0; transform: scaleY(var(--rail, 1)); box-shadow: 0 0 12px rgba(198,242,78,.5); }
.cn-steps > .cn-step { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 22px; margin: 0 0 22px; scroll-margin-top: 90px; }
.cn-num { position: relative; z-index: 1; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px;
  background: #c6f24e; color: #08090b; font: 800 30px "JetBrains Mono", monospace; box-shadow: 0 0 0 6px #07080a, 0 10px 34px rgba(198,242,78,.28); }
.cn-body { min-width: 0; padding: 22px 24px 22px; border: 1px solid #1d2126; border-radius: 18px;
  background: linear-gradient(160deg, rgba(198,242,78,.045), transparent 40%), #0f1216; transition: border-color .3s; }
.cn-step:hover .cn-body { border-color: #2a3037; }
.cn-h2 { margin: 0 0 4px; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; color: #e8eaed; }
.cn-h2.big { font-size: clamp(30px, 3.6vw, 48px); }
.cn-p { font-size: 15px; line-height: 1.6; color: #b4bbc2; margin: 8px 0 12px; max-width: 72ch; }
.cn-p a, .cn-plan a { color: #c6f24e; }
/* the redirect URI on the consent page must be readable in full on a phone */
.cn-p .mono { overflow-wrap: anywhere; }
.cn-p code, .cn-or code { font-size: 12.5px; color: #e8eaed; background: rgba(255,255,255,.05); border: 1px solid #23282e; border-radius: 5px; padding: 1px 6px; overflow-wrap: anywhere; }
.cn-step .abtn { margin: 6px 8px 4px 0; }
.cn-keys { list-style: none; margin: 0 0 12px; padding: 0; }
.cn-keys li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid #171b20; font-size: 13.5px; }
.cn-keys .ksub { color: #a0a8b0; font-size: 12.5px; }
.cn-form { margin-top: 10px; }
.knew .cn-copy { margin: 8px 0 10px; }

/* copy blocks: the text is plain in the HTML so it is selectable without JS */
.cn-copy { position: relative; display: flex; align-items: stretch; margin: 6px 0 12px; }
.cn-code { display: block; flex: 1 1 auto; min-width: 0; margin: 0; padding: 12px 92px 12px 14px;
  font-family: "JetBrains Mono", monospace; font-size: 12.5px; line-height: 1.55; color: #e8eaed;
  background: #07080a; border: 1px solid #23282e; border-radius: 10px; white-space: pre-wrap;
  overflow-wrap: anywhere; word-break: break-word; }
span.cn-code { font-family: Archivo, -apple-system, "Segoe UI", sans-serif; font-size: 14.5px; transition: border-color .2s; }
.cn-qs li:hover span.cn-code { border-color: #3a4149; }
.cn-copy .cpbtn { top: 50%; transform: translateY(-50%); min-height: 34px; }
.cn-copy .cpbtn.ok { box-shadow: 0 0 0 4px rgba(198,242,78,.18), 0 0 26px rgba(198,242,78,.55); }

/* the setup prompt: a terminal with a glowing copy button */
.cn-term { position: relative; margin: 10px 0 6px; border: 1px solid #2a3037; border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, #0d1014, #07080a); box-shadow: 0 0 0 1px rgba(198,242,78,.06), 0 18px 60px rgba(0,0,0,.45), 0 0 50px rgba(198,242,78,.07); }
.cn-term-h { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid #1d2126;
  font: 600 11px "JetBrains Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: #a0a8b0; }
.cn-term-h i { width: 9px; height: 9px; border-radius: 50%; background: #2a3037; }
.cn-term-h i:first-child { background: #c6f24e; box-shadow: 0 0 8px #c6f24e; }
.cn-term-h span { margin-left: 8px; }
.cn-term .cn-copy { margin: 0; }
.cn-term .cn-code { border: 0; border-radius: 0; background: transparent; padding: 18px 120px 18px 18px; font-size: 14px; color: #e8eaed; }
.cn-term .cn-code::before { content: "> "; color: #c6f24e; font-weight: 700; }
.cn-term .cpbtn { right: 14px; padding: 9px 16px; font-size: 12px; color: #08090b; background: #c6f24e; border-color: #c6f24e;
  box-shadow: 0 0 22px rgba(198,242,78,.35); }
.cn-term .cpbtn:hover { background: #aedb32; color: #08090b; border-color: #aedb32; }
.cn-or { margin-top: 18px; }
.cn-fname { font: 11px "JetBrains Mono", monospace; letter-spacing: .12em; color: #a0a8b0; text-transform: uppercase; margin: 10px 0 4px; }
.cn-lim { margin: -2px 0 10px; font-size: 12.5px; line-height: 1.5; color: #a0a8b0; padding-left: 10px; border-left: 2px solid #3a4149; max-width: 72ch; }

/* tabs: a radio per agent; the per-id rules are generated inline by
   connectpage._tabs. The labels sit in a segmented, scrollable pill row;
   connect.js slides a lime indicator under the checked one (html.cnjs). */
.cn-tabs { display: flex; flex-wrap: wrap; margin-top: 12px; min-width: 0; }
.cn-r { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cn-seg { position: relative; display: flex; gap: 4px; flex: 0 0 100%; max-width: 100%; padding: 5px; border: 1px solid #23282e; border-radius: 14px;
  background: #0b0c0f; overflow-x: auto; scrollbar-width: none; }
.cn-seg::-webkit-scrollbar { display: none; }
.cn-tab { position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1px solid transparent; color: #b4bbc2; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: color .25s, background .25s; }
.cn-tab:hover { color: #e8eaed; background: rgba(255,255,255,.04); }
.cn-ind { position: absolute; z-index: 0; top: 5px; left: 0; height: 38px; width: 0; border-radius: 10px; background: #c6f24e;
  box-shadow: 0 6px 22px rgba(198,242,78,.35); opacity: 0; transition: transform .45s cubic-bezier(.2,.8,.2,1), width .45s cubic-bezier(.2,.8,.2,1); }
html.cnjs .cn-ind { opacity: 1; }
html.cnjs .cn-seg .cn-tab { background: transparent !important; border-color: transparent !important; }
html.cnjs .cn-seg .cn-tab.on { color: #08090b !important; }
.cn-panel { display: none; flex: 0 0 100%; width: 100%; min-width: 0; margin-top: 12px; }
.cn-qs { list-style: none; margin: 0; padding: 0; }
.cn-qs li .cn-copy { margin: 0 0 8px; }

/* ---------- tools + limits ---------- */
.cn-sec { margin: 64px 8px 0; scroll-margin-top: 90px; }
.cn-tools { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; padding: 0; }
.cn-tool { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px; border: 1px solid #1d2126; border-radius: 14px;
  background: #0f1216; transition: border-color .2s, transform .2s, box-shadow .25s; }
.cn-tool:hover { border-color: rgba(198,242,78,.5); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 20px rgba(198,242,78,.08); }
.cn-tool code { font: 700 13.5px "JetBrains Mono", monospace; color: #c6f24e; overflow-wrap: anywhere; }
.cn-tool span { font-size: 13.5px; line-height: 1.45; color: #b4bbc2; }
.cn-limcard { margin: 18px 0 6px; padding: 6px 18px; border: 1px solid #1d2126; border-radius: 16px; background: #0f1216; overflow-x: auto; }
.cn-limcard .apitab { margin: 0; }
.cnwrap .fqfoot { margin: 40px 8px 0; }

@media (max-width: 1080px) {
  .cn-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cn-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .cnwrap { padding-top: 0; }
  .cn-hero { padding: 26px 0 26px; border-radius: 0; }
  .cn-h1.lh1 { font-size: clamp(36px, 11vw, 48px); }
  .cn-lede { font-size: 16px; }
  .cn-ctas .cn-btn { flex: 1 1 100%; }
  .cn-works { margin: 0; }
  .cn-steps { margin-top: 30px; }
  .cn-steps::before, .cn-steps::after { left: 21px; }
  .cn-steps > .cn-step { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .card.cn-step { padding: 16px 14px 18px; }
  .cn-num { width: 44px; height: 44px; border-radius: 13px; font-size: 21px; box-shadow: 0 0 0 4px #07080a, 0 8px 24px rgba(198,242,78,.25); }
  .cn-body { padding: 16px 14px 18px; }
  .cn-code { padding: 10px 12px 48px; font-size: 12px; }
  .cn-copy .cpbtn { top: auto; bottom: 8px; transform: none; }
  .cn-term .cn-code { padding: 14px 14px 56px; font-size: 13px; }
  .cn-sec { margin: 48px 0 0; }
  .cn-tools { grid-template-columns: minmax(0, 1fr); }
  .cn-limcard { padding: 4px 12px; }
  .cnwrap .fqfoot { margin: 32px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cn-aur i, .cn-acc, .cn-ping, .cn-btn::after { animation: none; }
  .cn-btn::after { display: none; }
  .cn-ind, .cn-tab, .wkc, .cn-tool, .cn-btn, .cn-btn svg { transition: none; }
  a.wkc:hover, li.wkc:hover, .cn-tool:hover { transform: none; }
}

/* ---------- second pass (2026-10-19, Gal: "when you scroll, the card comes
   alive"). Every state below is a class web/agentfx.js adds: without JS or
   with reduced motion none of it applies and nothing is dimmed. ---------- */
/* ambient layer: lime and teal mesh with parallax depth, a faint grid */
.cn-amb { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.cn-amb i { translate: 0 var(--py, 0px); position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; will-change: transform; }
.cn-amb i:nth-child(1) { width: 52vw; height: 46vh; left: 30%; top: 8%; background: radial-gradient(circle, rgba(198,242,78,.16), transparent 65%); animation: cnDrift 24s ease-in-out infinite; }
.cn-amb i:nth-child(2) { width: 44vw; height: 50vh; left: -8%; top: 40%; background: radial-gradient(circle, rgba(64,200,180,.13), transparent 65%); animation: cnDrift2 28s ease-in-out infinite; }
.cn-amb i:nth-child(3) { width: 40vw; height: 40vh; right: -6%; top: 62%; background: radial-gradient(circle, rgba(143,212,160,.12), transparent 65%); animation: cnDrift 32s ease-in-out infinite reverse; }
.cn-amb b { position: absolute; inset: -20% 0; background-image: linear-gradient(rgba(198,242,78,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(198,242,78,.03) 1px, transparent 1px);
  background-size: 64px 64px; -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }

/* the CTA breathes a lime glow every few seconds while idle */
html.afx .cn-btn:not(.ghost) { animation: cnBreath 4.5s ease-in-out 2s infinite; }
html.afx .cn-btn:not(.ghost):hover { animation: none; }
@keyframes cnBreath { 0%, 70%, 100% { box-shadow: 0 0 0 0 rgba(198,242,78,0); } 82% { box-shadow: 0 0 0 7px rgba(198,242,78,.16), 0 0 36px rgba(198,242,78,.45); } }

/* tools: lift, the name lights; the grid gets a wave of light on entry */
.cn-tool code { background: linear-gradient(90deg, rgba(198,242,78,.22), rgba(198,242,78,.22)) no-repeat 0 100% / 0% 100%; transition: background-size .45s cubic-bezier(.2,.8,.2,1); border-radius: 4px; padding: 0 2px; margin: 0 -2px; }
.cn-tool:hover code { background-size: 100% 100%; }
html.afx .cn-tool:hover { transform: translateY(-4px) scale(1.01); }

/* the setup prompt: a caret that keeps blinking after it typed itself */
.cn-caret { display: inline-block; width: 9px; height: 1.15em; margin-left: 3px; vertical-align: -3px; background: #c6f24e; box-shadow: 0 0 10px rgba(198,242,78,.7); animation: adBlink 1s steps(1) infinite; }
.cpbtn svg { width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; }
.cpbtn svg path { stroke-dasharray: 20; stroke-dashoffset: 20; animation: cnCheck .4s .05s ease-out forwards; }
@keyframes cnCheck { to { stroke-dashoffset: 0; } }

/* tabs: the indicator lands on a spring */
.cn-ind { transition: transform .6s cubic-bezier(.34,1.56,.64,1), width .6s cubic-bezier(.34,1.56,.64,1); }

@media (prefers-reduced-motion: reduce) {
  .cn-amb i, .cn-caret, html.afx .cn-btn:not(.ghost) { animation: none; }
  .cpbtn svg path { animation: none; stroke-dashoffset: 0; }
  .cn-tool code, .cn-ind { transition: none; }
}
