/* Nextura console — shared styles for /app/ pages. Tokens mirror the landing page. */
:root {
  --accent: #3B5BFF;
  --accent-hover: #2A46D9;
  --accent-soft: #7B93FF;
  --bg: #F6F4EF;
  --surface: #FFFFFF;
  --surface-alt: #FDFCF9;
  --ink: #171A2B;
  --muted: #5C6072;
  --border: rgba(23,26,43,0.12);
  --chip: rgba(23,26,43,0.06);
  --dark: #0F1322;
  --dark-ink: #F3F1EA;
  --lime: #C9E265;
  --ok-bg: #E9F5E4;
  --ok-ink: #2A7A3B;
  --warn: #B4232A;
  --warn-bg: #FCEDEE;
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Instrument Sans', 'Helvetica Neue', ui-sans-serif, system-ui, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0E1220;
  --surface: #181D30;
  --surface-alt: #131828;
  --ink: #F3F1EA;
  --muted: #9BA0B4;
  --border: rgba(243,241,234,0.14);
  --chip: rgba(243,241,234,0.08);
  --ok-bg: rgba(201,226,101,0.14);
  --ok-ink: #C9E265;
  --warn: #F0A6AB;
  --warn-bg: rgba(180,35,42,0.18);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* author display rules (grid/flex on chips, rows, guide) must not defeat the hidden attribute */
[hidden] { display: none !important; }
body { font-family: var(--font-body); background: var(--bg); color: var(--ink); min-height: 100dvh; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============ Nav ============ */
.cx-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 32px; max-width: 1180px; margin: 0 auto; }
.cx-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.cx-brand:hover { color: var(--ink); }
/* Human-network N mark — the console brand always sits on the dark band, so it
   uses the dark-mode variant colors (consumed by the #nxmark symbol vars). */
.cx-brand { --nx-line: #5B8DEF; --nx-fig: #C9D8F5; --nx-fig-accent: #5B8DEF; }
.cx-brand__mark { width: 32px; height: 32px; display: block; }
.cx-brand__word { font-family: 'Sora', var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.cx-brand__tag { font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; margin-left: 4px; }
.cx-nav__right { display: flex; align-items: center; gap: 12px; }
.cx-kbd { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; background: transparent; cursor: pointer; font-family: var(--font-body); }
.cx-kbd kbd { font-family: var(--font-display); font-size: 11.5px; font-weight: 600; background: var(--chip); border-radius: 5px; padding: 2px 6px; }
.cx-kbd:hover { background: var(--chip); color: var(--ink); }
.cx-theme { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--ink); font-size: 14px; cursor: pointer; display: grid; place-items: center; }
.cx-theme:hover { background: var(--chip); }
.cx-user { display: flex; align-items: center; gap: 10px; }
.cx-user__ava { width: 34px; height: 34px; border-radius: 50%; background: #CBD8F0; color: #2B4A8A; display: grid; place-items: center; font-weight: 600; font-size: 12.5px; overflow: hidden; }
.cx-user__ava img, .cx-me__ava img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.cx-user__name { font-size: 14px; font-weight: 600; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-out { border: 1px solid var(--border); background: transparent; color: var(--muted); font-family: var(--font-body); font-size: 13.5px; font-weight: 600; border-radius: 999px; padding: 9px 18px; cursor: pointer; }
.cx-out:hover { background: var(--chip); color: var(--ink); }

/* ============ Header ============ */
.cx-head { padding: 44px 0 34px; }
.cx-kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.cx-head h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.03em; line-height: 1.05; }
.cx-head p { margin-top: 10px; font-size: 16px; color: var(--muted); }
.cx-crumb { display: inline-block; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.cx-crumb:hover { color: var(--ink); }

/* ============ Layout ============ */
.cx-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; padding-bottom: 72px; align-items: start; }
.cx-side { display: grid; gap: 20px; }

/* ============ App cards ============ */
.cx-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cx-app { border-radius: 22px; padding: 30px; display: flex; flex-direction: column; gap: 10px; min-height: 220px; transition: transform 0.25s ease; }
a.cx-app:hover { transform: translateY(-4px); }
.cx-app--flagship { background: var(--dark); color: var(--dark-ink); }
a.cx-app--flagship:hover { color: var(--dark-ink); }
.cx-app--surface { background: var(--surface); border: 1px solid var(--border); color: var(--ink); }
a.cx-app--surface:hover { color: var(--ink); }
.cx-app--soon { background: transparent; border: 1.5px dashed var(--border); color: var(--muted); min-height: 170px; }
/* App needs a workspace the user doesn't have (no company / removed) */
.cx-app--disabled { opacity: 0.55; pointer-events: none; cursor: default; }
.cx-app--disabled .cx-app__go { color: var(--muted); }
.cx-app__top { display: flex; justify-content: space-between; align-items: flex-start; }
.cx-app__ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.cx-app__ico--accent { background: var(--accent); color: #FFF; }
.cx-app__ico--chip { background: var(--chip); color: inherit; }
.cx-badge { font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; }
.cx-badge--flagship { background: rgba(201,226,101,0.16); color: var(--lime); }
.cx-badge--soon { letter-spacing: 0.06em; border: 1px solid var(--border); color: var(--muted); }
.cx-app__name { font-family: var(--font-display); font-weight: 700; font-size: 23px; letter-spacing: -0.02em; margin-top: auto; }
.cx-app__desc { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.cx-app--flagship .cx-app__desc { color: rgba(243,241,234,0.7); }
.cx-app__go { font-size: 14.5px; font-weight: 600; color: var(--accent); }
.cx-app--flagship .cx-app__go { color: var(--accent-soft); }

/* ============ Panels ============ */
.cx-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 26px; }
.cx-panel--dashed { background: transparent; border-style: dashed; border-width: 1.5px; }
.cx-panel__caption { font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.cx-panel__foot { margin-top: 16px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.cx-panel h3 { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--ink); }
.cx-me { display: flex; align-items: center; gap: 14px; }
.cx-me__ava { width: 50px; height: 50px; border-radius: 50%; background: #CBD8F0; color: #2B4A8A; display: grid; place-items: center; font-weight: 600; font-size: 16px; flex-shrink: 0; overflow: hidden; }
.cx-me__name { font-weight: 600; font-size: 16px; color: var(--ink); }
.cx-me__sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.cx-pill { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.cx-pill--ok { background: var(--ok-bg); color: var(--ok-ink); }
.cx-pill--warn { background: var(--warn-bg); color: var(--warn); }
.cx-pill--muted { background: var(--chip); color: var(--muted); }
.cx-rows { display: grid; gap: 10px; margin-top: 18px; }
.cx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--chip); border-radius: 13px; padding: 12px 15px; }
.cx-row__l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cx-row__ico { width: 28px; height: 28px; border-radius: 8px; color: #FFF; display: grid; place-items: center; font-size: 11px; font-weight: 700; font-family: var(--font-display); flex-shrink: 0; }
.cx-row__name { font-weight: 600; font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-row__sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.cx-row__val { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cx-row__val--accent { color: var(--accent); }
.cx-soonbtn { margin-top: 14px; display: inline-block; border: 1px solid var(--border); color: var(--muted); font-size: 13px; font-weight: 600; border-radius: 999px; padding: 9px 18px; cursor: not-allowed; background: transparent; font-family: var(--font-body); }

/* ============ Forms ============ */
.cx-field { margin-bottom: 16px; }
.cx-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.cx-input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-alt); color: var(--ink); font-family: var(--font-body); font-size: 14.5px; outline: none; transition: border-color 150ms ease, box-shadow 150ms ease; }
.cx-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,91,255,0.15); }
.cx-btn { display: inline-block; border: none; border-radius: 999px; background: var(--accent); color: #FFF; font-family: var(--font-body); font-size: 14px; font-weight: 600; padding: 12px 22px; cursor: pointer; transition: background-color 150ms ease; }
.cx-btn:hover { background: var(--accent-hover); }
.cx-btn[disabled] { opacity: 0.6; cursor: default; }
.cx-btn--ghost { background: transparent; border: 1px solid var(--border); color: var(--ink); }
.cx-btn--ghost:hover { background: var(--chip); }
.cx-btn--danger { background: transparent; border: 1px solid rgba(180,35,42,0.4); color: var(--warn); }
.cx-btn--danger:hover { background: var(--warn-bg); }
.cx-note { display: none; margin-top: 14px; padding: 11px 14px; border-radius: 11px; font-size: 13px; line-height: 1.5; }
.cx-note.on { display: block; }
.cx-note--err { background: var(--warn-bg); color: var(--warn); }
.cx-note--ok { background: var(--ok-bg); color: var(--ok-ink); }
.cx-reqs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 5px; font-size: 12.5px; color: var(--muted); }
.cx-reqs li::before { content: '○ '; }
.cx-reqs li.ok { color: var(--ok-ink); }
.cx-reqs li.ok::before { content: '✓ '; }

/* ============ Usage meters ============ */
.cx-meter { margin-top: 16px; }
.cx-meter:first-of-type { margin-top: 0; }
.cx-meter__row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; margin-bottom: 7px; }
.cx-meter__name { font-weight: 600; color: var(--ink); }
.cx-meter__val { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.cx-meter__track { height: 8px; border-radius: 999px; background: var(--chip); overflow: hidden; }
.cx-meter__fill { height: 100%; border-radius: 999px; background: var(--accent); transition: width 0.4s ease; }
.cx-meter__warn { margin-top: 6px; font-size: 12.5px; color: var(--warn); font-weight: 600; display: none; }
.cx-meter__warn.on { display: block; }

/* ============ Command palette ============ */
.cx-cmdk { position: fixed; inset: 0; background: rgba(15,19,34,0.45); display: none; align-items: flex-start; justify-content: center; padding: 14vh 20px 0; z-index: 50; }
.cx-cmdk.on { display: flex; }
.cx-cmdk__box { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,0.35); overflow: hidden; }
.cx-cmdk__input { width: 100%; border: none; outline: none; background: transparent; color: var(--ink); font-family: var(--font-body); font-size: 15.5px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.cx-cmdk__list { max-height: 320px; overflow-y: auto; padding: 8px; }
.cx-cmdk__item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: none; background: transparent; color: var(--ink); font-family: var(--font-body); font-size: 14.5px; font-weight: 500; padding: 12px 14px; border-radius: 11px; cursor: pointer; }
.cx-cmdk__item .cx-row__ico { width: 26px; height: 26px; }
.cx-cmdk__item.is-active { background: var(--chip); }
.cx-cmdk__empty { padding: 18px; font-size: 14px; color: var(--muted); }

/* ============ Console v2 — dark header band ============ */
.cx-shell { max-width: 1360px; margin: 0 auto; padding: 0 40px; }
.cx-band { position: relative; background: var(--dark); color: var(--dark-ink); padding-bottom: 150px; overflow: hidden; }
.cx-band--bar { padding-bottom: 0; overflow: visible; }
.cx-band__clip { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cx-band__glow { position: absolute; top: -200px; left: 50%; width: 1000px; height: 560px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(59,91,255,0.28), transparent 70%); pointer-events: none; }
.cx-band .cx-nav { position: relative; z-index: 5; max-width: 1360px; padding: 18px 40px; }
.cx-band .cx-brand, .cx-band .cx-brand:hover { color: var(--dark-ink); }
.cx-band .cx-brand__tag { color: rgba(243,241,234,0.7); border-color: rgba(243,241,234,0.25); }
.cx-band .cx-theme { color: var(--dark-ink); border-color: rgba(243,241,234,0.25); }
.cx-band .cx-theme:hover { background: rgba(243,241,234,0.1); }

/* search pill */
.cx-search { display: inline-flex; align-items: center; gap: 10px; background: rgba(243,241,234,0.08); border: 1px solid rgba(243,241,234,0.2); border-radius: 999px; padding: 9px 16px; width: 230px; cursor: pointer; font-family: var(--font-body); color: rgba(243,241,234,0.6); font-size: 14px; transition: border-color 200ms ease; }
.cx-search:hover { border-color: rgba(243,241,234,0.45); }
.cx-search__label { flex: 1; text-align: left; }
.cx-search kbd { font-family: var(--font-display); font-size: 11.5px; font-weight: 600; background: rgba(243,241,234,0.12); color: rgba(243,241,234,0.7); padding: 3px 8px; border-radius: 6px; }

/* account menu */
.cx-menu { position: relative; }
.cx-menu__btn { display: flex; align-items: center; gap: 10px; background: rgba(243,241,234,0.08); border: 1px solid rgba(243,241,234,0.2); border-radius: 999px; padding: 5px 14px 5px 5px; cursor: pointer; font-family: var(--font-body); transition: border-color 200ms ease; }
.cx-menu__btn:hover { border-color: rgba(243,241,234,0.45); }
.cx-menu__btn .cx-user__ava { width: 32px; height: 32px; font-size: 13px; }
.cx-menu__name { font-size: 14px; font-weight: 600; color: var(--dark-ink); max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-menu__caret { font-size: 10px; color: rgba(243,241,234,0.6); }
.cx-menu__pop { position: absolute; right: 0; top: calc(100% + 10px); width: 280px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px rgba(15,19,34,0.3); padding: 8px; z-index: 60; transform-origin: top right; visibility: hidden; opacity: 0; transform: translateY(6px) scale(0.96); transition: opacity 120ms ease, transform 120ms ease, visibility 0s linear 120ms; }
.cx-menu__pop.on { visibility: visible; opacity: 1; transform: none; transition: opacity 200ms cubic-bezier(0.22, 1, 0.36, 1), transform 200ms cubic-bezier(0.22, 1, 0.36, 1); }
.cx-menu__head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 14px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.cx-menu__head .cx-me__ava { width: 40px; height: 40px; font-size: 14px; }
.cx-menu__who { min-width: 0; }
.cx-menu__who-name { font-weight: 600; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-menu__who-mail { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-menu__item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border: none; background: transparent; border-radius: 12px; font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--ink); text-align: left; cursor: pointer; transition: background-color 150ms ease; }
.cx-menu__item:hover { background: var(--chip); color: var(--ink); }
.cx-menu__item .cx-menu__ico { width: 20px; text-align: center; flex-shrink: 0; }
.cx-menu__item--danger { color: var(--warn); }
.cx-menu__item--danger:hover { background: var(--warn-bg); color: var(--warn); }
.cx-menu__sep { border-top: 1px solid var(--border); margin: 6px 0; }

/* greeting inside the band */
.cx-hero { position: relative; z-index: 3; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding-top: 48px; }
.cx-hero .cx-kicker { color: var(--accent-soft); margin-bottom: 14px; }
.cx-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 5vw, 58px); line-height: 1.04; letter-spacing: -0.03em; margin: 0 0 12px; }
.cx-hero p { font-size: 17px; color: rgba(243,241,234,0.65); }
.cx-hero__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 8px; }
.cx-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(243,241,234,0.22); border-radius: 999px; padding: 8px 16px; font-size: 13.5px; font-weight: 500; color: rgba(243,241,234,0.85); white-space: nowrap; }
.cx-chip__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }

/* app cards overlapping the band */
.cx-apps--v2 { grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: -110px; position: relative; z-index: 4; }
.cx-apps--v2 .cx-app { border-radius: 20px; padding: 26px; }
.cx-apps--v2 .cx-app--flagship { border: 1px solid rgba(243,241,234,0.1); box-shadow: 0 24px 50px rgba(15,19,34,0.28); }
.cx-apps--v2 .cx-app--surface { box-shadow: 0 24px 50px rgba(15,19,34,0.12); }
.cx-apps--v2 .cx-app--soon { background: var(--surface); min-height: 220px; }
.cx-apps--v2 .cx-app__name { font-size: 22px; }
.cx-apps--v2 .cx-app--soon .cx-app__name, .cx-apps--v2 .cx-app--soon .cx-app__ico { color: var(--muted); }
.cx-apps--v2 .cx-app__desc { font-size: 13.5px; }

/* account row */
.cx-account { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 44px 0 80px; align-items: start; }
.cx-account .cx-panel { border-radius: 20px; }
.cx-account h3 { font-size: 20px; }

/* ============ Getting-started guide ============ */
/* Collapse/expand rides grid-template-rows on the wrapper so dismissing
   doesn't leave a layout jump; the inner clip does the masking. */
.cx-guide { display: grid; grid-template-rows: 1fr; opacity: 1; margin-top: 26px; transition: grid-template-rows 320ms cubic-bezier(0.25, 1, 0.5, 1), opacity 220ms ease, margin-top 320ms cubic-bezier(0.25, 1, 0.5, 1); }
.cx-guide.is-collapsed { grid-template-rows: 0fr; opacity: 0; margin-top: 0; }
.cx-guide__clip { min-height: 0; overflow: hidden; }
.cx-guide__card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 24px 26px 26px; position: relative; overflow: hidden; }
/* entrance only on page arrival — reopening animates the wrapper expand instead */
.cx-guide.is-boot .cx-guide__card { animation: cxFadeUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) 160ms both; }
.cx-guide__card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-soft)); }
.cx-guide__head { display: flex; align-items: baseline; gap: 14px; }
.cx-guide__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.cx-guide__count { font-size: 13px; font-weight: 600; color: var(--muted); }
.cx-guide__skip { margin-left: auto; border: none; background: transparent; color: var(--muted); font-family: var(--font-body); font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
.cx-guide__skip:hover { background: var(--chip); color: var(--ink); }
.cx-guide__bar { height: 6px; border-radius: 999px; background: var(--chip); overflow: hidden; margin: 14px 0 18px; }
.cx-guide__bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-soft)); transform-origin: 0 50%; transform: scaleX(0); transition: transform 500ms cubic-bezier(0.25, 1, 0.5, 1); }
.cx-guide__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cx-gstep { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-alt); transition: background-color 240ms ease, border-color 240ms ease; }
.cx-gstep.done { background: var(--ok-bg); border-color: transparent; }
.cx-gstep__bubble { position: relative; width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--chip); color: var(--muted); font-family: var(--font-display); font-weight: 700; font-size: 13px; transition: background-color 240ms ease, color 240ms ease; }
.cx-gstep.done .cx-gstep__bubble { background: var(--ok-ink); color: var(--surface); }
/* number ↔ check share one slot (icon swap) */
.cx-gstep__num { transition: opacity 140ms ease, transform 200ms cubic-bezier(0.22, 1, 0.36, 1); }
.cx-gstep.done .cx-gstep__num { opacity: 0; transform: scale(0.5); }
.cx-gstep__check { position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; opacity: 0; transform: scale(0.6); transition: opacity 140ms ease 60ms, transform 220ms cubic-bezier(0.22, 1, 0.36, 1) 60ms; }
.cx-gstep.done .cx-gstep__check { opacity: 1; transform: scale(1); }
/* a step completing live (API refresh) gets a stroke draw + gentle pop */
.cx-gstep.just-done .cx-gstep__check path { stroke-dasharray: 20; stroke-dashoffset: 20; animation: cxDraw 340ms 120ms cubic-bezier(0.25, 1, 0.5, 1) forwards; }
.cx-gstep.just-done .cx-gstep__bubble { animation: cxPop 400ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes cxDraw { to { stroke-dashoffset: 0; } }
@keyframes cxPop { 0% { transform: scale(1); } 40% { transform: scale(1.16); } 100% { transform: scale(1); } }
.cx-gstep__body { min-width: 0; }
.cx-gstep__title { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.cx-gstep__sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.cx-gstep__act { margin-top: 9px; display: inline-flex; align-items: center; gap: 6px; border: none; background: transparent; padding: 0; font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; transition: color 200ms ease; }
.cx-gstep__act:hover { color: var(--accent-hover); }
.cx-gstep__act[disabled] { color: var(--muted); cursor: default; }
.cx-gstep__act.is-sent { color: var(--ok-ink); }
.cx-gstep__act.is-error { animation: cxShake 320ms ease; color: var(--warn); }
@keyframes cxShake { 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }
.cx-chip--btn { background: transparent; font-family: var(--font-body); cursor: pointer; transition: background-color 200ms ease; }
.cx-chip--btn:hover { background: rgba(243,241,234,0.1); }
@media (max-width: 860px) { .cx-guide__steps { grid-template-columns: 1fr; } }

/* ============ Spotlight tour ============ */
.cx-tour { position: fixed; inset: 0; z-index: 80; opacity: 0; transition: opacity 240ms ease; }
.cx-tour.on { opacity: 1; }
/* the ring's giant shadow is the dim layer — one element, one cutout */
.cx-tour__ring { position: fixed; top: 0; left: 0; border-radius: 18px; border: 2px solid var(--accent); box-shadow: 0 0 0 5px rgba(59,91,255,0.28), 0 0 0 9999px rgba(15,19,34,0.55); pointer-events: none; }
/* first placement is instant; is-live enables the glide between stops */
.cx-tour.is-live .cx-tour__ring { transition: transform 300ms cubic-bezier(0.25, 1, 0.5, 1), width 300ms cubic-bezier(0.25, 1, 0.5, 1), height 300ms cubic-bezier(0.25, 1, 0.5, 1); }
.cx-tour__tip { position: fixed; top: 0; left: 0; width: min(340px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 18px 16px; box-shadow: 0 24px 60px rgba(15,19,34,0.35); }
.cx-tour.is-live .cx-tour__tip { transition: transform 300ms cubic-bezier(0.25, 1, 0.5, 1); }
.cx-tour__step { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.cx-tour__title { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; color: var(--ink); margin-top: 6px; }
.cx-tour__body { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin-top: 6px; }
.cx-tour__row { display: flex; align-items: center; gap: 8px; margin-top: 15px; }
.cx-tour__dots { display: flex; gap: 5px; margin-right: auto; }
.cx-tour__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--chip); transition: background-color 200ms ease; }
.cx-tour__dot.on { background: var(--accent); }
.cx-tour__btn { border: none; background: var(--accent); color: #FFF; font-family: var(--font-body); font-size: 13px; font-weight: 600; border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: background-color 150ms ease; }
.cx-tour__btn:hover { background: var(--accent-hover); }
.cx-tour__btn--ghost { background: transparent; color: var(--muted); }
.cx-tour__btn--ghost:hover { background: var(--chip); color: var(--ink); }

/* entrance — one-time page arrival, hero leads then cards follow */
@keyframes cxFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.cx-hero { animation: cxFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.cx-apps--v2 .cx-app { animation: cxFadeUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
.cx-apps--v2 .cx-app:nth-child(2) { animation-delay: 40ms; }
.cx-apps--v2 .cx-app:nth-child(3) { animation-delay: 80ms; }
.cx-apps--v2 .cx-app:nth-child(4) { animation-delay: 120ms; }

/* kill transitions for one frame while the theme flips */
[data-theme-switching] *, [data-theme-switching] *::before, [data-theme-switching] *::after { transition: none !important; }

@media (max-width: 1080px) {
  .cx-apps--v2 { grid-template-columns: 1fr 1fr; }
  .cx-account { grid-template-columns: 1fr; }
  .cx-hero { flex-direction: column; align-items: flex-start; gap: 20px; }
}
@media (max-width: 720px) {
  .cx-shell { padding: 0 20px; }
  .cx-band { padding-bottom: 120px; }
  .cx-band .cx-nav { padding: 16px 20px; }
  .cx-search { width: auto; }
  .cx-search__label { display: none; }
  .cx-menu__name, .cx-menu__caret { display: none; }
  .cx-menu__btn { padding: 4px; }
  .cx-apps--v2 { grid-template-columns: 1fr; margin-top: -90px; }
  .cx-hero { padding-top: 28px; }
  .cx-hero p { font-size: 15.5px; }
}

/* ============ Responsive ============ */
@media (max-width: 1020px) { .cx-layout { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .cx-nav { padding: 18px 20px; flex-wrap: wrap; }
  .cx-kbd, .cx-user__name { display: none; }
  .wrap { padding: 0 20px; }
  .cx-apps { grid-template-columns: 1fr; }
  .cx-head { padding: 28px 0 24px; }
}
@media (prefers-reduced-motion: reduce) {
  a.cx-app:hover { transform: none; }
  .cx-meter__fill, .cx-input, .cx-btn { transition: none; }
  .cx-hero, .cx-apps--v2 .cx-app { animation: none; }
  .cx-menu__pop { transform: none; transition: opacity 120ms ease, visibility 0s linear 120ms; }
  .cx-menu__pop.on { transition: opacity 120ms ease; }
  .cx-guide { transition: opacity 120ms ease; }
  .cx-guide.is-boot .cx-guide__card, .cx-gstep.just-done .cx-gstep__bubble, .cx-gstep.just-done .cx-gstep__check path, .cx-gstep__act.is-error { animation: none; }
  .cx-guide__bar span, .cx-gstep__num, .cx-gstep__check { transition: none; }
  .cx-tour { transition: opacity 120ms ease; }
  .cx-tour.is-live .cx-tour__ring, .cx-tour.is-live .cx-tour__tip { transition: none; }
}
