/* The account in the style of the main site: Geist everywhere (Cinzel only for the product name), the site's palette, floating glass bar,
   blocks on one radius, reveal and spotlight motion. Loaded after account.css and the flow editor's css, so it wins over both;
   it is only linked from the account pages, so the console (admin) keeps the shared look. Details: docs/01 Context/reference/motion-and-style.md */
@property --a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; animation-timing-function: cubic-bezier(.215, .61, .355, 1); }

:root {
  --f: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: var(--f); --serif: var(--f); --mono: var(--f);
  --ease: cubic-bezier(.215, .61, .355, 1); --dur: .6s; interpolate-size: allow-keywords;
  /* the site's palette */
  --k-bg: #04020a; --k-deep: #08050f; --k-card: #0e0a1c; --k-card2: #140f26; --k-raise: #1a1430;
  --k-ink: #eeeaf7; --k-dim: #aea6c4; --k-faint: #6b6386; --k-acc: #8b5cf6; --k-acc2: #c4b5fd; --k-acc-deep: #6d43d6;
  --k-line: rgba(196, 181, 253, .2); --k-line2: rgba(196, 181, 253, .12); --k-edge: rgba(196, 181, 253, .22); --k-glow: rgba(139, 92, 246, .4);
  --glass: rgba(14, 10, 28, .72);
  --r-card: 16px; --r-screen: 20px; --r-chip: 12px;
  --eyebrow: 600 11px/1.2 var(--f); --track-eyebrow: .12em;
}
body { font: 400 15px/1.55 var(--f); background: radial-gradient(80% 60% at 70% 30%, #120a26 0, var(--k-bg) 60%) fixed, var(--k-bg); }
body, button, input { font-family: var(--f); }
#app { position: relative; z-index: 1; }

/* type: one family, three weights */
h1 { font: 700 clamp(28px, 4vw, 34px)/1.1 var(--f); letter-spacing: -.02em; }
h2 { font: 700 clamp(26px, 3.2vw, 34px)/1.12 var(--f); letter-spacing: -.02em; }
.lead { color: var(--k-dim); font-size: 16px; }
.chip, .cb-eyebrow, .cb-card h3, .cb-pal-group, .cb-chip { font-family: var(--f); }
.chip { font-weight: 600; letter-spacing: .1em; }
.cb-eyebrow, .cb-eyebrow.is-acc { color: var(--k-acc2); }
.cb-tabs small, .cb-n, .cb-ev time, .cb-sha, .btn kbd, .cb-pal-in kbd, .cb-tpl small { font-family: var(--f); }
.cb-chip { font-weight: 600; }

/* blocks: glass, one radius */
.card, .hero-card, .cb-card { border: 1px solid var(--k-line2); background: var(--glass); backdrop-filter: blur(10px); border-radius: var(--r-screen); }
.card { padding: 24px; }
.hero-card { padding: 28px; }
.cb-card { padding: 24px; background: var(--glass); }
.cb-card h3 { color: var(--k-faint); letter-spacing: .12em; }
.card, .hero-card, .cb-card, .cb-dev, .cb-flow, .cb-tpl { position: relative; --mx: 50%; --my: 50%; }
.card::after, .cb-card::after, .cb-dev::after, .cb-flow::after, .cb-tpl::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .32s var(--ease);
  background: radial-gradient(360px circle at var(--mx) var(--my), rgba(139, 92, 246, .14), transparent 60%); }
.card:hover::after, .cb-card:hover::after, .cb-dev:hover::after, .cb-flow:hover::after, .cb-tpl:hover::after { opacity: 1; }
.cb-card:hover, .cb-dev:hover, .cb-flow:hover { border-color: var(--k-acc2); box-shadow: 0 18px 50px -24px var(--k-acc); transform: none; }
.cb-flow:hover { transform: translateX(3px); }
.cb-dev, .cb-flow, .cb-tpl { border-color: var(--k-line2); background: var(--glass); border-radius: var(--r-card); }
.cb-empty { border-radius: var(--r-card); }
.msg { border-radius: var(--r-chip); }

/* buttons: stand still, the main one has the running light, hover only makes them brighter */
.btn { height: 44px; padding: 0 22px; font: 600 15px/1 var(--f); transition: filter .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease); }
.btn:hover, .btn:active { transform: none; filter: brightness(1.16); }
.btn:disabled:hover { filter: none; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn-xs { height: 28px; font-size: 12px; }
.btn-ghost { border-color: var(--k-line2); background: rgba(139, 92, 246, .1); }
.btn-ghost:hover { border-color: var(--k-acc2); background: rgba(139, 92, 246, .18); }
.btn-primary { position: relative; background: linear-gradient(180deg, var(--k-acc), var(--k-acc-deep)); }
.btn-primary:hover { box-shadow: 0 0 28px -4px var(--k-acc), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-primary::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--a), transparent 0 70%, var(--k-acc2) 88%, #fff 94%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: a-spin 3.5s linear infinite; }
@keyframes a-spin { to { --a: 360deg; } }
.btn-provider { border-radius: 999px; transition: box-shadow .3s var(--ease), filter .3s var(--ease); }
.btn-provider:hover { filter: none; background: #fff; box-shadow: 0 0 28px -6px var(--k-acc2); }
input { height: 44px; border-radius: var(--r-chip); background: rgba(4, 2, 10, .7); border-color: var(--k-edge); }
input:focus { border-color: var(--k-acc2); box-shadow: 0 0 0 3px rgba(139, 92, 246, .16), 0 0 18px -6px var(--k-acc); }

/* the floating bar: brand pill, tab pill, controls (as on the site) */
.cb-top { top: 0; height: auto; gap: 12px; padding: 14px 16px; border: 0; background: none; backdrop-filter: none; pointer-events: none; }
.cb-top > * { pointer-events: auto; }
.cb-brand { gap: 10px; padding: 6px 14px 6px 6px; border: 1px solid var(--k-line); border-radius: 999px; background: rgba(4, 2, 10, .6); backdrop-filter: blur(14px); }
.cb-brand b, .a-brand b { font: 700 17px/1 "Cinzel", var(--f); letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.cb-tabs { margin: 0 auto; padding: 5px; border-color: var(--k-line); background: rgba(4, 2, 10, .6); backdrop-filter: blur(16px) saturate(1.3); box-shadow: 0 10px 40px -20px #000; }
.cb-tabs a { height: 32px; font: 600 13px/1 var(--f); color: var(--k-dim); }
.cb-tabs a:hover, .cb-tabs a.is-on { color: var(--k-ink); }
.cb-pill { top: 5px; bottom: 5px; background: rgba(139, 92, 246, .18); box-shadow: none; transition: left .5s cubic-bezier(.22, 1.2, .36, 1), width .5s cubic-bezier(.22, 1.2, .36, 1); }
.cb-right .btn-ghost, .lang-toggle { border-color: var(--k-line); background: rgba(4, 2, 10, .6); backdrop-filter: blur(14px); }
.cb-avatar { background: linear-gradient(135deg, var(--k-acc), #4c2f9e); }
.cb-pop { border-radius: var(--r-screen); }
.lang-toggle { font-weight: 600; letter-spacing: .06em; }

/* the page: same width and rhythm as the site */
.cb-wrap { max-width: 1120px; padding: 0 24px 112px; }
.cb-hero { padding: 72px 0 8px; text-align: left; }
.cb-hero h1 { font: 700 clamp(36px, 5.2vw, 64px)/1.04 var(--f); letter-spacing: -.03em; max-width: 20ch; margin: 12px 0 20px; }
.cb-hero p { max-width: 62ch; margin: 0 0 12px; color: var(--k-dim); font-size: 18px; line-height: 1.6; }
.cb-hero .cb-hint { font-size: 13px; color: var(--k-dim); }
.cb-s { padding-top: 96px; scroll-margin-top: 72px; }
.cb-sh { display: block; margin-bottom: 40px; }
.cb-sh h2 { margin: 12px 0 0; max-width: 28ch; }
.cb-sh p, .cb-sh-note { margin: 16px 0 0; max-width: 62ch; text-align: left; color: var(--k-dim); font-size: 16px; }
.cb-sh-note:empty { display: none; }
.cb-two, .cb-grid3, .cb-grid2 { gap: 16px; }
.cb-list { gap: 12px; }
.cb-relv { font: 700 34px/1.1 var(--f); letter-spacing: -.02em; }
.cb-journey { margin-top: 48px; }
.cb-jstep b { font: 700 15px var(--f); }
.cb-jstep span:last-child { color: var(--k-dim); font-size: 13px; }
.cb-node { background: var(--k-bg); border-color: var(--k-line); }
.cb-journey::before { background: var(--k-line2); }
.cb-modal, .cb-pal, .cb-toast { border-radius: var(--r-screen); }
.cb-modal h3 { font: 700 20px/1.3 var(--f); }
.cb-grid-bg { background-image: linear-gradient(var(--k-line2) 1px, transparent 1px), linear-gradient(90deg, var(--k-line2) 1px, transparent 1px); }

/* sign-in, connect and plan: the panel arrives block by block over the particle tree */
.panel { max-width: 440px; }
.panel h1 { font: 700 clamp(30px, 5vw, 40px)/1.08 var(--f); letter-spacing: -.03em; margin: 0 0 12px; }
.panel .hero-card::after { background: radial-gradient(ellipse 45% 70% at 90% 40%, rgba(139, 92, 246, .32), transparent 70%); }
@keyframes a-in { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } }
.panel > * { animation: a-in .9s var(--ease) both; }
.panel > :nth-child(1) { animation-delay: .1s; } .panel > :nth-child(2) { animation-delay: .25s; } .panel > :nth-child(3) { animation-delay: .4s; }
.a-field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.a-brand { position: fixed; z-index: 5; top: 14px; left: 16px; display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border: 1px solid var(--k-line); border-radius: 999px;
  background: rgba(4, 2, 10, .6); backdrop-filter: blur(14px); text-decoration: none; animation: a-in .9s var(--ease) both; }
.a-brand img { border-radius: 8px; }

/* reveal on scroll: rise, un-blur, in turn */
.cb-rv { transform: translateY(20px); filter: blur(6px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), filter var(--dur) var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.cb-rv.is-in { filter: none; }
.cb-ev, .cb-dev, .cb-flow, .cb-tpl { animation-duration: .6s; animation-timing-function: var(--ease); }

/* read progress */
.a-progress { position: fixed; z-index: 70; top: 0; left: 0; right: 0; height: 2px; transform-origin: left; transform: scaleX(var(--p, 0)); pointer-events: none; background: linear-gradient(90deg, var(--k-acc), var(--k-acc2)); box-shadow: 0 0 10px var(--k-acc); }

@media (max-width: 860px) { .cb-hero { text-align: left; } .cb-s { padding-top: 72px; } }
@media (max-width: 640px) { .cb-top { padding: 10px 12px; } .cb-tabs { box-shadow: none; } .a-brand { top: 10px; left: 12px; } }
@media (prefers-reduced-motion: reduce) {
  .panel > *, .a-brand { animation: none; }
  .btn-primary::before { animation: none; }
  .cb-rv { filter: none; }
  .a-progress { display: none; }
}
a.btn, a.btn:hover { text-decoration: none; }
