/* Lenci · Connections — the MCP catalog, connections, tool policies, activity and owner apps. Builds on studio.css tokens.
   Each card carries its vendor's colour as --bc (brandColor from the catalog): the logo well, the hover glow and the connected ring
   are all mixed from it, so the grid reads as a wall of brands on the studio's dark glass. Layout: hero → tabs → panels. */
:root {
  --cx: linear-gradient(135deg, #22d3ee 0%, #8b5cf6 55%, #d946ef 100%);
  --cx-h: linear-gradient(90deg, #22d3ee 0%, #8b5cf6 55%, #d946ef 100%);
  --cx-ink: #d9ccff; --ok: #34d399; --warn: #f5b041; --bad: #f87171;
  --glass: linear-gradient(180deg, rgba(23,23,35,.88), rgba(14,14,22,.92));
}
html, body { height: auto; min-height: 100%; }
body { overflow: auto; overflow-x: hidden; background: radial-gradient(1200px 700px at 90% -10%, rgba(139,92,246,.12), transparent 60%), radial-gradient(900px 600px at -10% 100%, rgba(34,211,238,.1), transparent 60%), var(--canvas); }
.cx-app { display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); min-height: 100vh; height: auto; }
.cx-main { min-width: 0; width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 22px 60px; }
.cx-ai { max-width: 960px; margin: 0 auto; }
.cx-ai h1 { margin: 0 0 8px; font: 700 28px/1.3 var(--display); }
.cx-ai h2 { margin: 0 0 8px; font: 600 18px/1.4 var(--display); }
.cx-ai h3 { margin: 0; font: 600 16px/1.4 var(--display); }
.cx-ai p { line-height: 1.6; }
.cx-ai section { margin-top: 24px; }
.cx-ai-free { color: #a7f3d0; }
.cx-ai .ghost, .cx-ai .primary { min-height: 44px; white-space: normal; text-align: center; }
.cx-ai-choices, .cx-ai-providers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cx-ai-choice, .cx-ai-provider { min-width: 0; padding: 18px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--glass); }
.cx-ai-choice { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.cx-ai-choice.active, .cx-ai-provider.active { border-color: var(--accent-2); }
.cx-ai-choice small, .cx-ai-provider small { display: block; margin-top: 4px; color: #a7f3d0; }
.cx-ai-provider .cx-field { margin: 14px 0 10px; }
.cx-ai-provider input { min-height: 44px; width: 100%; box-sizing: border-box; }
.cx-ai-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cx-ai-actions .ghost, .cx-ai-actions .primary { flex: 1 1 auto; }
.cx-ai-fallback { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; padding: 12px 0; color: var(--muted); cursor: pointer; line-height: 1.5; }
.cx-ai-fallback input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
.cx-ai #ai-status:empty, .cx-ai #ai-auth:empty { display: none; }
.cx-ai #ai-auth .primary { margin: 8px 0; }
@media (max-width: 600px) { .cx-ai-choices, .cx-ai-providers { grid-template-columns: minmax(0, 1fr); } .cx-ai-choice, .cx-ai-provider { padding: 15px; } }
.muted { color: var(--muted); }
a.ghost { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.ghost.danger:hover { border-color: #ef4444; color: #fca5a5; }
.ghost.small { padding: 5px 9px; font-size: 11px; }
.primary.small { padding: 8px 14px; font-size: 11.5px; border-radius: 10px; }
code, .cx-mono { font-family: var(--mono); font-size: 11.5px; }

/* ----------------------------------------------------------------- top bar */
.cx-brand { text-decoration: none; color: inherit; }
.cx-sep { color: var(--dim); font-size: 18px; line-height: 1; margin-top: -2px; }
.cx-wordmark { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -0.02em; line-height: 1; background: var(--cx-h); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cx-pro { color: #e4d9ff; border-color: rgba(139,92,246,.55); }
.cx-back::before { content: ""; width: 7px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-inline-end: 2px; flex: none; }
[dir="rtl"] .cx-back::before { transform: rotate(-135deg); }
.cx-toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 90; display: none; margin: 0; padding: 10px 16px; border-radius: 12px; background: rgba(18,18,28,.95); border: 1px solid var(--line-2); color: var(--ink); font-size: 12.5px; box-shadow: 0 20px 50px rgba(0,0,0,.5); max-width: min(92vw, 520px); }
.cx-toast.toast { display: block; animation: toastIn .3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* -------------------------------------------------------------------- hero */
.cx-hero { position: relative; margin: 18px 0 14px; border: 1px solid var(--line); border-radius: 26px; background: var(--glass); box-shadow: var(--edge), 0 30px 80px rgba(0,0,0,.45); overflow: hidden; isolation: isolate; animation: bootUp .5s var(--ease) both; }
.cx-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(900px 400px at 10% 0%, rgba(139,92,246,.22), transparent 60%), radial-gradient(700px 400px at 100% 100%, rgba(34,211,238,.16), transparent 60%); }
.cx-hero-bg i { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .5; animation: orb 14s ease-in-out infinite; }
.cx-hero-bg .o1 { width: 320px; height: 320px; left: -80px; top: -120px; background: #8b5cf6; }
.cx-hero-bg .o2 { width: 260px; height: 260px; right: 10%; top: -140px; background: #22d3ee; animation-delay: -5s; }
.cx-hero-bg .o3 { width: 220px; height: 220px; right: -60px; bottom: -120px; background: #d946ef; animation-delay: -9s; }
@keyframes orb { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, 20px) scale(1.12); } }
.cx-hero-inner { position: relative; padding: 44px 40px 20px; max-width: 760px; }
.cx-eyebrow { margin: 0 0 10px; font-family: var(--display); font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: #8be9fd; }
[dir="rtl"] .cx-eyebrow { letter-spacing: 0; }
.cx-hero h1 { margin: 0 0 12px; font-family: var(--display); font-size: clamp(30px, 4.6vw, 52px); line-height: 1.05; letter-spacing: -.03em; background: linear-gradient(90deg, #fff 0%, #d9ccff 50%, #8be9fd 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
[dir="rtl"] .cx-hero h1 { letter-spacing: 0; line-height: 1.3; }
.cx-hero-sub { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; max-width: 640px; }
.cx-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.cx-hero-cta:empty { display: none; }
.cx-hero-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; }
.cx-hero-stats:empty { display: none; }
.cx-stat { display: flex; flex-direction: column; gap: 1px; }
.cx-stat b { font-family: var(--display); font-size: 20px; font-weight: 700; background: linear-gradient(90deg, #c9b8ff, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.cx-stat span { font-size: 10.5px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
[dir="rtl"] .cx-stat span { letter-spacing: 0; }
/* the logo strip: one row of catalog logos drifting across the hero's foot */
.cx-strip { position: relative; margin-top: 10px; padding: 14px 0 18px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.cx-strip:empty { display: none; }
.cx-strip-track { display: flex; gap: 14px; width: max-content; animation: drift 60s linear infinite; direction: ltr; }
.cx-strip:hover .cx-strip-track { animation-play-state: paused; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.cx-strip-logo { --bc: #8b5cf6; flex: none; width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)); border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 24px rgba(0,0,0,.35), 0 0 22px color-mix(in srgb, var(--bc) 22%, transparent); transition: transform .25s var(--ease); }
.cx-strip-logo img { width: 28px; height: 28px; object-fit: contain; }

/* ----------------------------------------------------------------- banner */
.cx-banner { margin: 0 0 14px; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(245,176,65,.4); background: linear-gradient(180deg, rgba(245,176,65,.12), rgba(245,176,65,.04)); color: #fde7bb; font-size: 12.5px; }
.cx-banner.info { border-color: rgba(34,211,238,.35); background: linear-gradient(180deg, rgba(34,211,238,.1), rgba(34,211,238,.03)); color: #bfefff; }
.cx-banner a { color: inherit; }

/* ------------------------------------------------------------------- tabs */
.cx-tabs { position: sticky; top: 8px; z-index: 20; display: inline-flex; gap: 2px; padding: 3px; margin: 6px 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(10,10,15,.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: inset 0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.35); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.cx-tabs::-webkit-scrollbar { display: none; }
.cx-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--muted); padding: 8px 16px; border-radius: 999px; font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; transition: color var(--t), background var(--t), box-shadow var(--t); }
.cx-tab:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.cx-tab[aria-selected="true"] { color: #fff; background: var(--active); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 0 0 1px rgba(217,70,239,.3), 0 3px 14px rgba(139,92,246,.45); text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.cx-tab-ico { width: 14px; height: 14px; flex: none; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
#tab-servers .cx-tab-ico { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='6' rx='2'/%3E%3Crect x='3' y='14' width='18' height='6' rx='2'/%3E%3Cpath d='M7 7h.01M7 17h.01'/%3E%3C/svg%3E"); }
#tab-tools .cx-tab-ico { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0 5 5L22 9l-3-3-2-.5-2.3.8zM3 21l8.5-8.5'/%3E%3Cpath d='M9 15l6-6'/%3E%3C/svg%3E"); }
#tab-activity .cx-tab-ico { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l3-8 4 16 3-8h4'/%3E%3C/svg%3E"); }
#tab-apps .cx-tab-ico { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E"); }
.cx-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--magenta); color: #fff; font-size: 10px; line-height: 18px; text-align: center; font-family: var(--latin); }
.cx-panel { animation: bootUp .4s var(--ease) both; }
.cx-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 16px; }
.cx-panel-head h2 { margin: 0 0 4px; font-family: var(--display); font-size: 22px; letter-spacing: -.02em; }
.cx-panel-head p { margin: 0; max-width: 640px; font-size: 13px; }
.cx-legend { display: flex; gap: 6px; flex: none; }

/* ---------------------------------------------------------------- toolbar */
.cx-toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 16px; }
.cx-search { position: relative; display: flex; align-items: center; flex: 1 1 280px; min-width: 0; }
.cx-search input { width: 100%; padding: 11px 14px; padding-inline-start: 38px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--ink); font-size: 13px; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); transition: border-color var(--t), box-shadow var(--t), background var(--t); }
.cx-search input:focus { outline: none; border-color: rgba(139,92,246,.7); background: rgba(139,92,246,.06); box-shadow: 0 0 0 3px rgba(139,92,246,.18); }
.cx-search-ico { position: absolute; inset-inline-start: 13px; width: 15px; height: 15px; background: var(--dim); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat; pointer-events: none; }
.cx-cats { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 420px; }
.cx-cats .chip { font-size: 10.5px; padding: 6px 10px; }

/* ------------------------------------------------------------------- grid */
.cx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 12px; }
.cx-card { --bc: #8b5cf6; position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px 16px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--glass); box-shadow: var(--edge), 0 14px 34px rgba(0,0,0,.35); isolation: isolate; overflow: hidden; animation: cardIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 22ms); transition: transform .28s var(--ease), border-color .25s, box-shadow .28s var(--ease); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.cx-card::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: radial-gradient(70% 60% at 50% -10%, color-mix(in srgb, var(--bc) 32%, transparent), transparent 70%); opacity: .55; transition: opacity .3s; pointer-events: none; }
.cx-card::after { content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bc) 85%, #fff 10%), transparent); opacity: .7; pointer-events: none; }
.cx-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--bc) 55%, rgba(255,255,255,.2)); box-shadow: var(--edge), 0 24px 50px rgba(0,0,0,.5), 0 0 40px color-mix(in srgb, var(--bc) 30%, transparent); }
.cx-card:hover::before { opacity: 1; }
.cx-card.is-connected { border-color: color-mix(in srgb, var(--bc) 60%, rgba(52,211,153,.5)); box-shadow: var(--edge), 0 14px 34px rgba(0,0,0,.35), 0 0 0 1px color-mix(in srgb, var(--bc) 35%, transparent), 0 0 28px color-mix(in srgb, var(--bc) 25%, transparent); }
.cx-card.is-featured .cx-card-top::after { content: "★"; position: absolute; top: 0; inset-inline-end: 0; font-size: 11px; color: var(--gold); text-shadow: 0 0 10px rgba(245,176,65,.7); }
.cx-card-top { position: relative; display: flex; align-items: center; gap: 12px; }
.cx-logo { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.02)); border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 18px rgba(0,0,0,.4), 0 0 18px color-mix(in srgb, var(--bc) 25%, transparent); overflow: hidden; font-family: var(--display); font-weight: 800; font-size: 18px; color: #fff; }
.cx-logo img { width: 26px; height: 26px; object-fit: contain; display: block; }
.cx-logo.mono img { filter: brightness(0) invert(1); opacity: .92; }
.cx-logo.fallback { background: linear-gradient(135deg, color-mix(in srgb, var(--bc) 80%, #000 10%), color-mix(in srgb, var(--bc) 50%, #000 40%)); }
.cx-card-name { min-width: 0; display: flex; flex-direction: column; gap: 1px; padding-inline-end: 14px; }
.cx-card-name strong { font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[dir="rtl"] .cx-card-name strong, [dir="rtl"] .cx-conn-title strong, [dir="rtl"] .cx-sheet-head h2 { unicode-bidi: plaintext; text-align: end; }
.cx-card-name small { font-size: 10.5px; color: var(--dim); display: flex; gap: 6px; align-items: center; min-width: 0; }
.cx-card-name small span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-verified { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px rgba(52,211,153,.8); -webkit-mask: none; }
.cx-card-rel { overflow-wrap: anywhere; margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.1em; }
.cx-uses { display: flex; gap: 5px; flex-wrap: wrap; }
.cx-use { font-family: var(--display); font-size: 9.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); background: rgba(255,255,255,.03); }
[dir="rtl"] .cx-use { letter-spacing: 0; font-size: 11px; }
.cx-use.read { color: #8be9fd; border-color: rgba(34,211,238,.4); }
.cx-use.plan { color: #d9ccff; border-color: rgba(139,92,246,.5); }
.cx-use.act { color: #fbcfe8; border-color: rgba(217,70,239,.5); }
.cx-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line); }
.cx-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--dim); white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cx-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); flex: none; }
.cx-badge.signin::before { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.cx-badge.none::before { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.cx-badge.api_key::before, .cx-badge.url::before { background: var(--amber); }
.cx-badge.owner_app::before { background: var(--magenta); }
.cx-badge.blocked::before { background: var(--bad); }
.cx-badge.connected { color: #a7f3d0; }
.cx-badge.connected::before { background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.cx-card-acts { display: flex; gap: 5px; flex: none; }
.cx-card .connect-btn { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .04em; border: 1px solid color-mix(in srgb, var(--bc) 60%, rgba(255,255,255,.2)); background: linear-gradient(180deg, color-mix(in srgb, var(--bc) 32%, transparent), color-mix(in srgb, var(--bc) 12%, transparent)); color: #fff; padding: 7px 13px; border-radius: 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 4px 14px color-mix(in srgb, var(--bc) 25%, transparent); transition: transform var(--t) var(--ease), box-shadow var(--t), background var(--t); white-space: nowrap; }
.cx-card .connect-btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 8px 22px color-mix(in srgb, var(--bc) 40%, transparent); }
.cx-card .connect-btn[disabled] { opacity: .45; cursor: default; transform: none; }
.cx-acct { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink); min-width: 0; }
.cx-acct img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.cx-acct span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-card-err { margin: 0; font-size: 11px; color: #fca5a5; }
.cx-empty { text-align: center; color: var(--dim); padding: 30px 0; }
.cx-skel { height: 184px; border-radius: 20px; background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.07), rgba(255,255,255,.03)); background-size: 200% 100%; animation: skel 1.4s linear infinite; border: 1px solid var(--line); }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* -------------------------------------------------------------- custom URL */
.cx-custom { margin-top: 26px; padding: 20px 22px 18px; border-radius: 22px; border: 1px dashed rgba(255,255,255,.16); background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)); }
.cx-custom-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.cx-custom-head h2 { margin: 0 0 3px; font-family: var(--display); font-size: 17px; }
.cx-custom-head p { margin: 0; font-size: 12.5px; }
.cx-custom-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--cx); box-shadow: 0 8px 20px rgba(139,92,246,.35); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='34' height='34' rx='10' fill='%23000' stroke='none'/%3E%3Cpath d='M16 24l8-8M14.5 19.5l-3 3a4 4 0 0 0 5.7 5.7l3-3M25.5 20.5l3-3a4 4 0 0 0-5.7-5.7l-3 3' stroke='%23fff'/%3E%3C/svg%3E") center / contain no-repeat; mask: none; position: relative; }
.cx-custom-ico::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 24l8-8M14.5 19.5l-3 3a4 4 0 0 0 5.7 5.7l3-3M25.5 20.5l3-3a4 4 0 0 0-5.7-5.7l-3 3'/%3E%3C/svg%3E") center / contain no-repeat; }
.cx-custom-form { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.cx-field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 180px; min-width: 0; }
.cx-field.grow { flex: 3 1 320px; }
.cx-field label { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-family: var(--display); font-weight: 600; }
[dir="rtl"] .cx-field label { letter-spacing: 0; }
.cx-field input, .cx-field select, .cx-field textarea { width: 100%; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--ink); font-size: 13px; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); transition: border-color var(--t), box-shadow var(--t); }
.cx-field input:focus, .cx-field select:focus, .cx-field textarea:focus { outline: none; border-color: rgba(139,92,246,.7); box-shadow: 0 0 0 3px rgba(139,92,246,.18); }
.cx-field textarea { resize: vertical; font-family: var(--mono); font-size: 12px; }
.cx-custom-actions { flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cx-form-status { margin: 0; font-size: 12px; color: var(--muted); min-height: 1em; }
.cx-form-status.bad { color: #fca5a5; }

/* -------------------------------------------------------------------- sheet */
.cx-sheet-card { width: min(100%, 520px); padding: 0; overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.cx-sheet-card .modal-x { z-index: 2; background: rgba(10,10,15,.45); }
.cx-sheet-head { --bc: #8b5cf6; position: relative; display: flex; align-items: center; gap: 14px; padding: 24px 24px 18px; padding-inline-end: 56px; background: radial-gradient(90% 120% at 20% -20%, color-mix(in srgb, var(--bc) 38%, transparent), transparent 70%); border-bottom: 1px solid var(--line); }
.cx-sheet-head .cx-logo { width: 54px; height: 54px; border-radius: 16px; font-size: 22px; }
.cx-sheet-head .cx-logo img { width: 30px; height: 30px; }
.cx-sheet-head h2 { margin: 0; font-size: 20px; font-family: var(--display); letter-spacing: -.02em; }
.cx-sheet-head p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.cx-sheet-body { padding: 18px 24px; overflow: auto; display: grid; gap: 14px; min-height: 120px; }
.cx-sheet-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 24px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.cx-sheet-foot:empty { display: none; }
.cx-sheet-foot .primary { min-width: 160px; }
.cx-signin { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(34,211,238,.3); background: linear-gradient(180deg, rgba(34,211,238,.1), rgba(34,211,238,.02)); }
.cx-signin-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(34,211,238,.15); color: #8be9fd; }
.cx-signin-ico::after { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat; }
.cx-signin strong { display: block; font-size: 13px; }
.cx-signin strong code { font-size: 12px; color: #8be9fd; }
.cx-signin span { font-size: 11.5px; color: var(--muted); }
.cx-scopes { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.cx-scopes li { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; }
.cx-scopes li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--cx); box-shadow: 0 0 8px rgba(139,92,246,.6); }
.cx-scopes code { display: block; font-size: 10.5px; color: var(--dim); direction: ltr; text-align: start; word-break: break-all; }
.cx-sheet-sec { font-family: var(--display); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin: 0; }
[dir="rtl"] .cx-sheet-sec { letter-spacing: 0; }
.cx-sheet .cx-field { flex: none; }
.cx-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.cx-note a { color: #8be9fd; }
.cx-wait { display: grid; place-items: center; gap: 12px; padding: 18px 0 6px; text-align: center; }
.cx-wait p { margin: 0; font-size: 13px; }
.cx-wait .muted { font-size: 12px; }
.cx-wait-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.cx-spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255,255,255,.1); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cx-done { display: grid; place-items: center; gap: 10px; padding: 14px 0 6px; text-align: center; animation: bootUp .4s var(--ease) both; }
.cx-done-ring { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(52,211,153,.3), transparent 70%); border: 1px solid rgba(52,211,153,.5); box-shadow: 0 0 40px rgba(52,211,153,.35); color: var(--ok); font-size: 28px; }
.cx-done h3 { margin: 0; font-family: var(--display); font-size: 19px; }
.cx-done .cx-acct { justify-content: center; }
.cx-done .cx-acct img { width: 24px; height: 24px; }
.cx-error { padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(248,113,113,.4); background: rgba(248,113,113,.08); color: #fecaca; font-size: 12.5px; }
.cx-check { display: grid; gap: 8px; padding: 14px; border-radius: 14px; border: 1px solid rgba(217,70,239,.35); background: linear-gradient(180deg, rgba(217,70,239,.1), rgba(217,70,239,.02)); }
.cx-check h4 { margin: 0; font-size: 13px; font-family: var(--display); }
.cx-check p { margin: 0; font-size: 12px; color: var(--muted); }
.cx-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(10,10,15,.75); overflow: hidden; direction: ltr; }
.cx-copy code { padding: 9px 12px; font-size: 11.5px; color: #cdeefc; white-space: nowrap; overflow: auto; scrollbar-width: none; align-self: center; }
.cx-copy button { border: 0; border-inline-start: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--muted); font-family: var(--display); font-weight: 600; font-size: 11px; padding: 0 12px; transition: color var(--t), background var(--t); }
.cx-copy button:hover { color: var(--ink); background: rgba(255,255,255,.08); }
.cx-copy button.ok { color: #a7f3d0; }
.cx-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; font-size: 12px; }
.cx-kv dt { color: var(--dim); } .cx-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cx-tools-mini { display: flex; flex-wrap: wrap; gap: 5px; }
.cx-tools-mini code { padding: 3px 7px; border-radius: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.03); font-size: 11px; color: var(--muted); }

/* ------------------------------------------------------------------- tools */
.cx-tools { display: grid; gap: 14px; }
.cx-conn { --bc: #8b5cf6; border: 1px solid var(--line); border-radius: 20px; background: var(--glass); box-shadow: var(--edge), 0 14px 34px rgba(0,0,0,.3); overflow: hidden; }
.cx-conn-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: radial-gradient(80% 140% at 0% 0%, color-mix(in srgb, var(--bc) 22%, transparent), transparent 70%); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cx-conn-head .cx-logo { width: 38px; height: 38px; border-radius: 11px; font-size: 15px; }
.cx-conn-head .cx-logo img { width: 22px; height: 22px; }
.cx-conn-title { min-width: 0; flex: 1 1 200px; }
.cx-conn-title strong { display: block; font-family: var(--display); font-size: 14.5px; }
.cx-conn-title span { font-size: 11px; color: var(--dim); direction: ltr; unicode-bidi: isolate; }
.cx-conn-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-start: auto; }
.cx-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); }
.cx-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.cx-status.connected::before { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.cx-status.needs_auth::before { background: var(--amber); }
.cx-status.error::before { background: var(--bad); }
.cx-status.disabled::before { background: var(--dim); }
.cx-tool-rows { display: grid; }
.cx-tool { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.cx-tool:first-child { border-top: 0; }
.cx-tool-name { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.cx-tool-name code { font-size: 12.5px; color: var(--ink); direction: ltr; unicode-bidi: isolate; }
.cx-tool-desc { grid-column: 1; grid-row: 2; margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cx-tag { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; font-family: var(--display); font-weight: 600; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--dim); }
[dir="rtl"] .cx-tag { letter-spacing: 0; font-size: 11px; }
.cx-tag.ro { color: #8be9fd; border-color: rgba(34,211,238,.35); }
.cx-tag.write { color: #fbcfe8; border-color: rgba(217,70,239,.4); }
.cx-tag.locked { color: #fca5a5; border-color: rgba(248,113,113,.4); }
.cx-seg { grid-column: 2; grid-row: 1 / span 2; justify-self: end; align-self: center; display: inline-grid; grid-template-columns: repeat(3, 1fr); padding: 2px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0,0,0,.35); box-shadow: inset 0 1px 2px rgba(0,0,0,.5); }
.cx-seg button { border: 0; background: transparent; color: var(--muted); font-family: var(--display); font-weight: 600; font-size: 11px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; transition: color var(--t), background var(--t), box-shadow var(--t); }
.cx-seg button:hover { color: var(--ink); }
.cx-seg button[aria-pressed="true"] { color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.cx-seg button[aria-pressed="true"][data-policy="auto"] { background: linear-gradient(135deg, #0e7490, #22d3ee); box-shadow: 0 2px 10px rgba(34,211,238,.4); }
.cx-seg button[aria-pressed="true"][data-policy="confirm"] { background: linear-gradient(135deg, #7c3aed, #a855f7); box-shadow: 0 2px 10px rgba(139,92,246,.45); }
.cx-seg button[aria-pressed="true"][data-policy="off"] { background: linear-gradient(135deg, #52525b, #71717a); }
.cx-seg[aria-disabled="true"] { opacity: .5; }
.cx-seg[aria-disabled="true"] button { cursor: not-allowed; }
.cx-seg.busy { opacity: .6; pointer-events: none; }
.cx-pol { font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; color: #fff; }
[dir="rtl"] .cx-pol { letter-spacing: 0; }
.cx-pol.auto { background: linear-gradient(135deg, #0e7490, #22d3ee); } .cx-pol.confirm { background: linear-gradient(135deg, #7c3aed, #a855f7); } .cx-pol.off { background: linear-gradient(135deg, #52525b, #71717a); }
.cx-tools-empty, .cx-tools-err { padding: 14px 18px; font-size: 12.5px; color: var(--muted); }
.cx-tools-err { color: #fca5a5; }

/* ----------------------------------------------------------------- activity */
.cx-pending { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 18px; }
.cx-pending:empty { display: none; }
.cx-confirm { --bc: #d946ef; position: relative; padding: 16px 18px; border-radius: 18px; border: 1px solid rgba(217,70,239,.45); background: linear-gradient(180deg, rgba(217,70,239,.12), rgba(14,14,22,.9)); box-shadow: 0 0 30px rgba(217,70,239,.18), var(--edge); display: grid; gap: 10px; animation: cardIn .4s var(--ease) both; }
.cx-confirm-head { display: flex; align-items: center; gap: 10px; }
.cx-confirm-head .cx-logo { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }
.cx-confirm-head .cx-logo img { width: 20px; height: 20px; }
.cx-confirm-head strong { font-family: var(--display); font-size: 13.5px; display: block; }
.cx-confirm-head small { font-size: 11px; color: var(--dim); }
.cx-confirm-head code { color: #fbcfe8; }
.cx-args { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(10,10,15,.75); border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; line-height: 1.5; color: #cdeefc; max-height: 140px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; direction: ltr; text-align: left; }
.cx-confirm-acts { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.cx-confirm-acts .expires { margin-inline-end: auto; font-size: 11px; color: var(--dim); }
.cx-approve { font-family: var(--display); font-weight: 700; font-size: 11.5px; border: 0; color: #052e22; background: linear-gradient(135deg, #34d399, #a7f3d0); padding: 8px 16px; border-radius: 10px; box-shadow: 0 6px 18px rgba(52,211,153,.35); transition: transform var(--t) var(--ease); }
.cx-approve:hover { transform: translateY(-1px); }
.cx-calls { border: 1px solid var(--line); border-radius: 18px; background: var(--glass); box-shadow: var(--edge); overflow: hidden; }
.cx-call { display: grid; grid-template-columns: 120px minmax(0, 1.2fr) minmax(0, 1.4fr) auto; gap: 12px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 12.5px; }
.cx-call:first-child { border-top: 0; }
.cx-call.head { font-family: var(--display); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); background: rgba(255,255,255,.02); }
[dir="rtl"] .cx-call.head { letter-spacing: 0; font-size: 11.5px; }
.cx-call time { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.cx-call .conn { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cx-call .conn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-call .conn .cx-logo { width: 24px; height: 24px; border-radius: 7px; font-size: 11px; box-shadow: none; }
.cx-call .conn .cx-logo img { width: 14px; height: 14px; }
.cx-call code { color: var(--ink); direction: ltr; unicode-bidi: isolate; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.cx-call .actor { color: var(--dim); font-size: 11px; }
.cx-dec { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
[dir="rtl"] .cx-dec { letter-spacing: 0; font-size: 11px; }
.cx-dec::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cx-dec.executed { color: #a7f3d0; border-color: rgba(52,211,153,.4); }
.cx-dec.needs_confirmation { color: #fbcfe8; border-color: rgba(217,70,239,.45); }
.cx-dec.rejected, .cx-dec.blocked { color: #fde7bb; border-color: rgba(245,176,65,.45); }
.cx-dec.error, .cx-dec.timeout { color: #fecaca; border-color: rgba(248,113,113,.45); }
.cx-calls-empty { padding: 26px 18px; text-align: center; color: var(--dim); font-size: 12.5px; }

/* --------------------------------------------------------------------- apps */
.cx-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.cx-app-card { --bc: #8b5cf6; border: 1px solid var(--line); border-radius: 20px; background: var(--glass); box-shadow: var(--edge), 0 14px 34px rgba(0,0,0,.3); overflow: hidden; display: grid; }
.cx-app-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 12px; background: radial-gradient(80% 140% at 0% 0%, color-mix(in srgb, var(--bc) 24%, transparent), transparent 70%); }
.cx-app-head .cx-logo { width: 40px; height: 40px; border-radius: 12px; font-size: 16px; }
.cx-app-head .cx-logo img { width: 24px; height: 24px; }
.cx-app-head strong { display: block; font-family: var(--display); font-size: 14.5px; }
.cx-app-head small { font-size: 11px; color: var(--dim); }
.cx-app-head .cx-status { margin-inline-start: auto; }
.cx-app-body { display: grid; gap: 12px; padding: 4px 18px 18px; }
.cx-app-body form { display: grid; gap: 10px; }
.cx-app-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cx-app-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cx-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; }
.cx-switch input { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid var(--line-2); position: relative; margin: 0; cursor: pointer; transition: background var(--t); }
.cx-switch input::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.cx-switch input:checked { background: linear-gradient(135deg, #34d399, #22d3ee); }
.cx-switch input:checked::after { transform: translateX(14px); }
[dir="rtl"] .cx-switch input:checked::after { transform: translateX(-14px); }
.cx-env { font-size: 11.5px; color: #fde7bb; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(245,176,65,.35); background: rgba(245,176,65,.08); }

/* ----------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .cx-main { padding: 0 14px 50px; }
  .cx-hero { margin-top: 12px; border-radius: 20px; }
  .cx-hero-inner { padding: 30px 22px 14px; }
  .cx-panel-head { flex-direction: column; align-items: flex-start; }
  .cx-call { grid-template-columns: 90px minmax(0, 1fr) auto; }
  .cx-call .tool { grid-column: 1 / -1; }
  .cx-call.head .tool { display: none; }
  .cx-call .actor { display: none; }
}
@media (max-width: 560px) {
  .cx-pro, .cx-back span, .cx-nawaa span { display: none; }
  .cx-back, .cx-nawaa { padding: 7px 9px; }
  .cx-nawaa::before { content: "✦"; }
  .cx-hero-inner { padding: 26px 18px 12px; }
  .cx-hero-sub { font-size: 13px; }
  .cx-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cx-card { padding: 13px 12px 12px; border-radius: 16px; gap: 8px; }
  .cx-logo { width: 38px; height: 38px; border-radius: 11px; } .cx-logo img { width: 22px; height: 22px; }
  .cx-card-rel { -webkit-line-clamp: 3; font-size: 11.5px; }
  .cx-card-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .cx-card .connect-btn { width: 100%; }
  .cx-card-acts { flex-wrap: wrap; }
  .cx-card-acts .ghost { flex: 1 1 auto; text-align: center; }
  .cx-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; flex-basis: 100%; }
  .cx-cats::-webkit-scrollbar { display: none; }
  .cx-cats .chip { flex: none; }
  .cx-tabs { top: 6px; }
  .cx-tab { padding: 8px 12px; }
  .cx-custom { padding: 16px 14px; border-radius: 18px; }
  .cx-sheet-card { max-height: calc(100vh - 20px); }
  .modal { padding: 10px; }
  .cx-sheet-head { padding: 20px 18px 14px; padding-inline-end: 52px; }
  .cx-sheet-body, .cx-sheet-foot { padding-inline: 18px; }
  .cx-sheet-foot .primary { flex: 1 1 100%; }
  .cx-tool { grid-template-columns: 1fr; }
  .cx-seg { grid-column: 1; grid-row: auto; justify-self: start; }
  .cx-conn-acts { margin-inline-start: 0; }
  .cx-apps { grid-template-columns: 1fr; }
  .cx-app-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .cx-hero, .cx-hero-bg i, .cx-strip-track, .cx-card, .cx-panel, .cx-confirm, .cx-done, .cx-toast, .cx-badge.connected::before, .cx-skel { animation: none !important; }
  .cx-card, .cx-card .connect-btn, .cx-strip-logo, .cx-approve { transition: none; }
  .cx-card:hover, .cx-card .connect-btn:hover, .cx-approve:hover { transform: none; }
}
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .cx-card::before, .cx-card::after { display: none; }
  .cx-card:hover { border-color: rgba(168,85,247,.6); }
  .cx-card .connect-btn { background: linear-gradient(180deg, rgba(139,92,246,.3), rgba(139,92,246,.1)); border-color: rgba(168,85,247,.6); }
}
@media (max-width: 400px) { /* three tabs always fit a phone (pt/de labels): the icons go, the padding tightens */
  .cx-tabs { max-width: 100%; } .cx-tab { padding: 8px 10px; } .cx-tab-ico { display: none; }
}
