:root {
  color-scheme: dark;
  --ink: #ececf1;
  --muted: #a2a2ad;
  --muted-2: #74747f;
  --surface: rgba(31, 31, 35, .86);
  --surface-strong: #1b1b1f;
  --surface-soft: rgba(255,255,255,.05);
  --line: rgba(255,255,255,.085);
  --line-strong: rgba(255,255,255,.14);
  --accent: #8b7cff;
  --accent-rgb: 139, 124, 255;
  --success: #57d3a4;
  --warning: #f0ae6d;
  --danger: #ff7a86;
  --shadow: 0 30px 90px rgba(0,0,0,.42);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body {
  overflow: hidden; background: #121214; color: var(--ink);
  font: 15px/1.55 ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button, textarea, input, select { outline: none; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .28);
}
[hidden] { display: none !important; }

.eyebrow {
  margin: 0; color: #aaa1ff; font-size: 10px; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase;
}
.muted { margin: 0; color: var(--muted); }
.error { min-height: 20px; margin: 0; color: var(--danger); font-size: 13px; }
.brand-mark {
  position: relative; width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.14); border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #b5abff, var(--accent) 52%, #483d9f);
  box-shadow: 0 0 34px rgba(var(--accent-rgb), .22), inset 0 1px 1px rgba(255,255,255,.55);
}
.brand-mark::before, .brand-mark span {
  content: ""; position: absolute; border: 1px solid rgba(255,255,255,.72); border-radius: 50%;
}
.brand-mark::before { width: 18px; height: 8px; transform: rotate(48deg); }
.brand-mark span { width: 8px; height: 18px; transform: rotate(48deg); }
.brand-mark.small { width: 32px; height: 32px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup strong, .brand-lockup small, .brand-name strong, .brand-name small { display: block; }
.brand-lockup strong, .brand-name strong { font-size: 15px; letter-spacing: -.02em; }
.brand-lockup small, .brand-name small { color: #aaa1ff; font-size: 8px; font-weight: 800; letter-spacing: .22em; }

.login-shell {
  position: relative; min-height: 100dvh; display: grid; place-items: center; overflow: hidden; padding: 24px;
  background:
    radial-gradient(circle at 72% 24%, rgba(105,87,230,.18), transparent 35%),
    radial-gradient(circle at 15% 80%, rgba(59,179,149,.08), transparent 38%),
    #08080d;
}
.login-shell::before {
  content: ""; position: absolute; inset: 0; opacity: .2;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(circle, black, transparent 72%);
}
.login-orbit { position: absolute; width: min(76vw, 780px); aspect-ratio: 1; border: 1px solid rgba(139,124,255,.1); border-radius: 50%; }
.login-orbit::before, .login-orbit::after {
  content: ""; position: absolute; inset: 15%; border: 1px solid rgba(139,124,255,.12); border-radius: 50%; transform: rotate(36deg) scaleY(.38);
}
.login-orbit::after { inset: 30%; transform: rotate(-42deg) scaleY(.52); }
.login-orbit i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #a89cff; box-shadow: 0 0 18px #8b7cff; }
.login-orbit i:nth-child(1) { left: 9%; top: 31%; }
.login-orbit i:nth-child(2) { right: 14%; top: 21%; }
.login-orbit i:nth-child(3) { right: 28%; bottom: 8%; }
.login-card {
  position: relative; z-index: 1; width: min(100%, 432px); display: grid; gap: 17px; padding: 34px;
  border: 1px solid var(--line); border-radius: 28px; background: rgba(14,13,20,.82);
  box-shadow: var(--shadow); backdrop-filter: blur(24px);
}
.login-copy { margin: 14px 0 4px; }
.login-copy h1 { margin: 8px 0 14px; font-size: clamp(38px, 7vw, 58px); line-height: .98; letter-spacing: -.055em; }
.login-copy .muted { max-width: 350px; }
.login-card label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.login-card input {
  width: 100%; min-height: 49px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 13px; background: rgba(255,255,255,.045); color: var(--ink);
}
.login-card input:focus { border-color: rgba(var(--accent-rgb), .62); background: rgba(255,255,255,.065); }
.primary {
  min-height: 46px; padding: 0 18px; border: 0; border-radius: 13px;
  background: var(--accent); color: #09080d; font-weight: 800; cursor: pointer;
  box-shadow: 0 10px 28px rgba(var(--accent-rgb), .2);
}
.primary:hover { filter: brightness(1.08); }
.primary:disabled { opacity: .55; cursor: default; }
.primary.wide { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }

.app-shell {
  position: relative; width: 100%; height: 100dvh; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(circle at 62% 38%, rgba(var(--accent-rgb), .035), transparent 34%),
    radial-gradient(circle at 14% 88%, rgba(87,211,179,.018), transparent 30%),
    #121214;
}
.particle-canvas {
  position: absolute; z-index: -3; inset: 0; width: 100%; height: 100%;
  opacity: .46; filter: saturate(.72); transition: opacity .45s ease;
}
.ambient-grid {
  position: absolute; z-index: -2; inset: 0; pointer-events: none; opacity: .025;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 55% 42%, black, transparent 76%);
}
.app-shell::after {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 56% 40%, transparent 20%, rgba(18,18,20,.06) 60%, rgba(10,10,12,.46) 100%),
    linear-gradient(0deg, rgba(13,13,15,.86) 0%, transparent 30%);
}
.product-header {
  position: relative; z-index: 5; height: 64px; display: grid; grid-template-columns: 1fr auto;
  align-items: center; padding: max(11px, env(safe-area-inset-top)) clamp(16px, 2.5vw, 32px) 8px;
  gap: clamp(10px, 2vw, 24px);
}
.brand-button { display: inline-flex; justify-self: start; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 9px; }
.glass-button, .round-button {
  border: 1px solid var(--line); background: rgba(20,19,28,.62); color: var(--ink); cursor: pointer; backdrop-filter: blur(16px);
}
.glass-button { min-height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 11px; font-size: 12px; }
.button-count {
  min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px;
  border-radius: 999px; background: rgba(var(--accent-rgb), .22); color: #d9d4ff; font-size: 9px;
}
.glass-button:disabled { opacity: .48; cursor: default; }
.soft-pill {
  display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px;
  border: 1px solid rgba(var(--accent-rgb), .18); border-radius: 999px;
  background: rgba(var(--accent-rgb), .1); color: #c4bcff; font-size: 10px; font-weight: 750;
}

.workbench { height: calc(100dvh - 64px); display: flex; min-width: 0; }
.task-create-panel, .task-list-panel, .activity-panel { background: rgba(24,24,27,.84); backdrop-filter: blur(18px); }
.range-setting { display: grid; gap: 12px; color: var(--muted); font-size: 13px; }
.range-setting input { width: 100%; accent-color: var(--accent); }
.telegram-pairing { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.telegram-pairing p { flex: 1 1 100%; margin: 0; }
.skill-drafts-panel { display: grid; gap: 14px; margin-top: 18px; }
.task-tabs { display: inline-flex; align-self: start; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.025); }
.task-tab { min-height: 30px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.task-tab.active { background: var(--surface-soft); color: var(--ink); }
.task-view { display: grid; gap: 12px; }
.task-form { display: grid; gap: 14px; }
.task-form label { display: grid; gap: 7px; color: #d5d2df; font-size: 12px; }
.task-form textarea, .task-form input, .task-form select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px;
  background: #0c0b11; color: var(--ink); color-scheme: dark;
}
.task-form textarea { min-height: 118px; resize: vertical; line-height: 1.5; }
.task-form input, .task-form select { min-height: 42px; }
.task-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.task-form-actions .muted { min-width: 0; font-size: 10px; }
.timeline-list { display: grid; }
.timeline-card { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.timeline-card:first-child { padding-top: 2px; border-top: 0; }
.timeline-card h3 { margin: 0; font-size: 15px; }
.timeline-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline-card.failed { border-left: 2px solid rgba(255,122,134,.42); padding-left: 12px; }
.timeline-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.timeline-meta time { color: #bbb7c7; font-size: 10px; }
.timeline-empty { padding: 24px 2px; color: var(--muted-2); font-size: 12px; text-align: center; }
.text-button { justify-self: start; padding: 0; border: 0; background: none; color: var(--muted); font-size: 10px; cursor: pointer; }
.danger-text { color: #e68e98; }
.chat-stage {
  width: min(100%, 1120px); min-width: 0; height: 100%; flex: 1;
  display: grid; grid-template-rows: minmax(0, 1fr) auto; margin-inline: auto;
}
.messages {
  min-height: 0; overflow-y: auto;
  padding: clamp(20px, 3.2vh, 32px) clamp(18px, 4vw, 44px) 28px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent;
}
.welcome-card { width: min(620px, 62vw); margin: clamp(24px, 7vh, 72px) auto 0; text-align: center; }
.welcome-card h1 { margin: 8px 0 12px; font-size: clamp(42px, 5vw, 64px); line-height: .96; letter-spacing: -.052em; }
.welcome-card > p:not(.eyebrow) { width: min(480px, 100%); margin: 0; color: #aaa7b8; font-size: clamp(15px, 1.5vw, 19px); }
.welcome-card > p:not(.eyebrow), .starter-prompts { margin-inline: auto; }
.starter-prompts { width: min(540px, 100%); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.starter-prompt {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.035);
  color: #c4c1ce; font-size: 12px; cursor: pointer; backdrop-filter: blur(12px);
}
.starter-prompt:hover { border-color: rgba(var(--accent-rgb), .42); color: white; }
.starter-prompt.onboarding-action {
  border-color: rgba(var(--accent-rgb), .4); background: rgba(var(--accent-rgb), .13); color: #e0dcff;
}
.message {
  width: min(100%, 720px); display: flex; margin: 0 auto 26px;
  color: #e2e2e7; animation: rise .22s ease both;
}
.message.user { justify-content: flex-end; margin-bottom: 26px; }
.bubble {
  min-width: 0; max-width: 100%; padding: 0; border: 0; border-radius: 0;
  background: transparent; box-shadow: none; backdrop-filter: none;
  font-size: 16px; line-height: 1.58; letter-spacing: -.008em;
}
.message.user .bubble {
  max-width: min(480px, 68vw); padding: 9px 14px; border: 1px solid rgba(255,255,255,.065); border-radius: 18px;
  background: rgba(43,43,47,.96); color: #e4e4e9; line-height: 1.45; box-shadow: none;
}
.message.user .muted { display: block; margin-top: 6px; color: #9995a3; }
.bubble p, .bubble pre, .bubble ul, .bubble ol, .bubble h1, .bubble h2, .bubble h3 { margin: 0 0 12px; }
.bubble > :last-child { margin-bottom: 0; }
.bubble p { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble h1, .bubble h2, .bubble h3 { font-size: 1em; font-weight: 680; letter-spacing: -.012em; }
.message.assistant .bubble { width: 100%; }
.message.assistant .bubble ul, .message.assistant .bubble ol { padding-left: 1.35em; }
.message.assistant .bubble li + li { margin-top: 6px; }
.bubble pre { max-width: 100%; padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #09090d; color: #d7d4e4; }
.bubble code { padding: 2px 5px; border-radius: 5px; background: rgba(255,255,255,.07); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.bubble pre code { padding: 0; background: none; }
.bubble a { color: #b7aeff; }
.bubble.streaming::after { content: ""; display: inline-block; width: 5px; height: 13px; margin-left: 4px; background: var(--accent); animation: blink .8s infinite; }
.tool-card, .artifact-card {
  width: min(100%, 680px); margin: 0 0 18px 42px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 13px; background: rgba(17,16,24,.7); color: var(--muted); font-size: 12px;
}
.artifact-card a { color: #b7aeff; }

.work-surface {
  width: 0; min-width: 0; height: 100%; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden; border-left: 1px solid transparent; background: rgba(20,20,23,.96);
  opacity: 0; transform: translateX(28px); pointer-events: none;
  transition: width .24s cubic-bezier(.22,.8,.25,1), opacity .18s ease, transform .24s cubic-bezier(.22,.8,.25,1);
  backdrop-filter: blur(26px);
}
.workbench.space-open .work-surface {
  width: clamp(360px, 30vw, 500px); border-left-color: var(--line); opacity: 1; transform: translateX(0); pointer-events: auto;
}
.work-surface-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 12px; }
.work-surface-header h2 { margin: 3px 0 0; font-size: 24px; letter-spacing: -.035em; }
.work-surface-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.work-context-usage {
  max-width: 210px; padding: 6px 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-soft); color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums;
  text-overflow: ellipsis; white-space: nowrap;
}
.work-tabs { display: flex; gap: 4px; padding: 0 16px 12px; border-bottom: 1px solid var(--line); }
.work-tab {
  min-height: 34px; flex: 1; border: 0; border-radius: 9px; background: transparent;
  color: var(--muted); font-size: 11px; font-weight: 750; cursor: pointer;
}
.work-tab.active { background: var(--surface-soft); color: var(--ink); }
.work-view { min-height: 0; overflow-y: auto; padding: 17px 18px 30px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.work-trace { display: grid; gap: 8px; }
.work-event {
  display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: start; gap: 10px;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.024);
}
.work-event-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 4px rgba(240,174,109,.07); }
.work-event.completed .work-event-dot { background: var(--success); box-shadow: 0 0 0 4px rgba(87,211,164,.07); }
.work-event.measured .work-event-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(139,124,255,.08); }
.work-event.failed .work-event-dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(255,122,134,.07); }
.work-event-copy { min-width: 0; }
.work-event-copy strong, .work-event-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-event-copy strong { font-size: 12px; }
.work-event-copy small { margin-top: 2px; color: var(--muted-2); font-size: 10px; }
.work-event-state { color: var(--muted); font-size: 10px; white-space: nowrap; }
.work-expand {
  width: 100%; min-height: 34px; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px;
  background: transparent; color: var(--muted); font-size: 10px; cursor: pointer;
}
.work-empty { min-height: 180px; display: grid; align-content: center; gap: 6px; padding: 18px; color: var(--muted); text-align: center; }
.work-empty strong { color: #c9c6d2; font-size: 13px; }
.work-empty span { font-size: 11px; }
.work-canvas { display: grid; gap: 13px; }
.canvas-result { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.canvas-result header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.canvas-result header strong { font-size: 13px; }
.canvas-result header span { color: var(--muted-2); font-size: 9px; }
.canvas-body { color: #d1ced9; font-size: 13px; overflow-wrap: anywhere; }
.canvas-body p, .canvas-body pre, .canvas-body ul, .canvas-body h1, .canvas-body h2, .canvas-body h3 { margin: 0 0 10px; }
.canvas-body > :last-child { margin-bottom: 0; }
.canvas-body pre { max-width: 100%; padding: 11px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; background: #08080c; }
.canvas-body a { color: #b7aeff; }
.canvas-artifacts { display: grid; gap: 7px; margin-top: 13px; }
.canvas-artifact { padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; color: #c8c4d1; font-size: 11px; }
.canvas-artifact a { color: #b7aeff; }
.fleet-canvas {
  display: grid; gap: 12px; padding: 16px; border: 1px solid rgba(var(--accent-rgb), .22);
  border-radius: 18px; background:
    radial-gradient(circle at 96% 0, rgba(var(--accent-rgb), .14), transparent 38%),
    rgba(255,255,255,.026);
}
.fleet-canvas > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fleet-canvas h3 { margin: 4px 0 0; font-size: 17px; letter-spacing: -.025em; }
.fleet-total {
  flex: 0 0 auto; min-width: 42px; padding: 8px 9px; border: 1px solid rgba(var(--accent-rgb), .3);
  border-radius: 999px; background: rgba(var(--accent-rgb), .09); color: #ddd8ff;
  font-size: 10px; font-weight: 800; text-align: center;
}
.fleet-capsules, .fleet-proposals { display: grid; gap: 7px; }
.fleet-capsule, .fleet-proposal {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 13px;
  background: rgba(255,255,255,.025);
}
.fleet-capsule > div, .fleet-proposal > div:first-child { min-width: 0; }
.fleet-capsule strong, .fleet-capsule small, .fleet-proposal strong, .fleet-proposal small { display: block; }
.fleet-capsule strong, .fleet-proposal strong {
  overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap;
}
.fleet-capsule small, .fleet-proposal small { margin-top: 3px; color: var(--muted-2); font-size: 9px; }
.fleet-capsule > span { color: var(--warning); font-size: 9px; font-weight: 750; }
.fleet-capsule.ready > span { color: var(--success); }
.fleet-proposals { padding-top: 4px; border-top: 1px solid var(--line); }
.fleet-proposal-actions { display: flex; flex: 0 0 auto; gap: 6px; }
.fleet-decision {
  min-height: 31px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 9px; font-weight: 750; cursor: pointer;
}
.fleet-decision.approve {
  border-color: rgba(87,211,164,.28); background: rgba(87,211,164,.1); color: #a8efd6;
}
.fleet-decision:hover { border-color: rgba(var(--accent-rgb), .45); color: var(--ink); }
.onboarding-canvas {
  position: relative; overflow: hidden; display: grid; gap: 14px; padding: 17px;
  border: 1px solid rgba(var(--accent-rgb), .25); border-radius: 18px;
  background:
    radial-gradient(circle at 92% 4%, rgba(var(--accent-rgb), .18), transparent 34%),
    linear-gradient(145deg, rgba(33,30,49,.86), rgba(15,14,22,.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 18px 48px rgba(0,0,0,.18);
}
.onboarding-canvas::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .28;
  background-image: radial-gradient(circle, rgba(255,255,255,.18) .6px, transparent .8px);
  background-size: 23px 23px; mask-image: linear-gradient(130deg, black, transparent 58%);
}
.onboarding-canvas > * { position: relative; z-index: 1; }
.onboarding-canvas > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.onboarding-canvas h3 { margin: 5px 0 0; font-size: 20px; line-height: 1.08; letter-spacing: -.035em; }
.onboarding-progress {
  flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid rgba(var(--accent-rgb), .36); border-radius: 50%;
  background: rgba(var(--accent-rgb), .1); color: #ddd8ff; font-size: 10px; font-weight: 800;
}
.onboarding-copy { margin: 0; color: #aaa7b5; font-size: 11px; line-height: 1.55; }
.onboarding-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.onboarding-card {
  position: relative; min-height: 132px; display: grid; grid-template-rows: auto 1fr auto; gap: 9px;
  padding: 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255,255,255,.035); color: var(--ink); text-align: left; cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.onboarding-card:hover {
  transform: translateY(-2px); border-color: rgba(var(--accent-rgb), .48);
  background: rgba(var(--accent-rgb), .09);
}
.onboarding-card.complete { border-color: rgba(87,211,164,.2); }
.onboarding-card-header { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.onboarding-card-header strong { font-size: 12px; }
.onboarding-card-header small {
  max-width: 74px; overflow: hidden; color: var(--muted-2); font-size: 8px;
  text-overflow: ellipsis; white-space: nowrap;
}
.onboarding-card.complete .onboarding-card-header small { color: var(--success); }
.onboarding-card-copy { color: #9c99a8; font-size: 9px; line-height: 1.48; }
.onboarding-card-arrow { color: #c7c0ff; font-size: 15px; }
.onboarding-complete {
  min-height: 40px; border: 1px solid rgba(var(--accent-rgb), .32); border-radius: 12px;
  background: rgba(var(--accent-rgb), .12); color: #e1ddff; font-size: 10px; font-weight: 800;
  cursor: pointer;
}
.onboarding-complete:hover { background: rgba(var(--accent-rgb), .2); }
.work-surface-note { padding: 10px 18px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted-2); font-size: 10px; }
.message.micro-status { margin-bottom: 20px; }
.message.micro-status .bubble { color: #9d9da7; font-size: 13px; }

.composer {
  position: relative; width: min(820px, calc(100% - 40px));
  margin: 0 auto max(clamp(24px, 3.5vh, 40px), env(safe-area-inset-bottom)); padding: 12px 12px 10px;
  border: 1px solid rgba(255,255,255,.1); border-radius: 24px;
  background: rgba(38,38,43,.96);
  box-shadow: 0 18px 54px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.035);
  backdrop-filter: blur(24px) saturate(112%);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.composer:focus-within {
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 20px 58px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.045);
}
.composer textarea {
  display: block; width: 100%; min-height: 46px; max-height: 168px; resize: none;
  padding: 2px 8px 7px; overflow-y: auto; border: 0; background: transparent;
  color: var(--ink); font-size: 16px; line-height: 1.5; letter-spacing: -.01em;
  box-shadow: none !important; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent;
}
.composer textarea::placeholder { color: #85858e; opacity: 1; }
.composer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.composer-actions { min-width: 0; display: flex; align-items: center; gap: 8px; }
.composer-actions-end { justify-content: flex-end; }
.round-button { flex: 0 0 39px; width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; }
.round-button:hover, .glass-button:hover { border-color: var(--line-strong); background: rgba(255,255,255,.08); }
.composer .round-button {
  flex-basis: 40px; width: 40px; height: 40px; border-color: transparent;
  background: rgba(255,255,255,.025); font-size: 21px;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.composer .round-button:hover { border-color: rgba(255,255,255,.11); background: rgba(255,255,255,.09); transform: translateY(-1px); }
.voice-icon {
  position: relative; width: 20px; height: 24px; border: 0; border-radius: 0;
  background:
    linear-gradient(currentColor, currentColor) center 17px / 2px 6px no-repeat,
    linear-gradient(currentColor, currentColor) center 22px / 8px 2px no-repeat;
}
.voice-icon::before {
  content: ""; position: absolute; top: 1px; left: 5px; width: 10px; height: 15px;
  border: 2px solid currentColor; border-radius: 999px;
}
.voice-icon::after {
  content: ""; position: absolute; top: 7px; left: 1px; width: 18px; height: 13px;
  border: 2px solid currentColor; border-top: 0; border-radius: 0 0 12px 12px;
}
#voice.recording { color: white; border-color: rgba(255,122,134,.7); background: rgba(255,122,134,.24); animation: pulse 1.2s infinite; }
.send-button {
  flex: 0 0 40px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: #b7b7bd; color: #1b1b1e; font-size: 21px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.18);
  transition: filter .16s ease, transform .16s ease, box-shadow .16s ease;
}
.send-button:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.32); }
.send-button:disabled { opacity: .35; cursor: default; }
.round-button.stop { color: var(--danger); }
.composer-status {
  min-width: 0; overflow: hidden; color: #aaa7b5; font-size: 11px; text-overflow: ellipsis; white-space: nowrap;
}
.composer-status::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 8px 1px 2px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb), .55);
}
.attachment-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 3px 4px 8px; }
.attachment-chip { display: flex; align-items: center; gap: 7px; max-width: 230px; padding: 6px 9px; border-radius: 9px; background: var(--surface-soft); color: #c7c4d2; font-size: 10px; }
.attachment-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-chip button { padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }

.drawer-backdrop { position: fixed; z-index: 20; inset: 0; background: rgba(0,0,0,.42); backdrop-filter: blur(3px); }
.drawer { position: fixed; z-index: 21; inset: 0 0 0 auto; width: min(520px, 100vw); display: grid; grid-template-rows: auto auto minmax(0,1fr); border-left: 1px solid var(--line); background: rgba(24,24,27,.97); box-shadow: var(--shadow); transform: translateX(105%); transition: transform .24s cubic-bezier(.22,.8,.25,1); }
.drawer.open { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 20px 20px 14px; }
.drawer-header h2 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.03em; }
.drawer-tabs { display: flex; gap: 4px; padding: 0 16px 12px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.nav-item { min-height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; white-space: nowrap; }
.nav-item.active { background: var(--surface-soft); color: var(--ink); }
.nav-item span { min-width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: rgba(var(--accent-rgb), .18); color: #c4bcff; font-size: 9px; }
.drawer-content { min-height: 0; overflow-y: auto; padding: 20px 20px 52px; }
.section-intro { margin-bottom: 20px; }
.section-intro h3 { margin: 0 0 7px; font-size: 26px; letter-spacing: -.035em; }
.section-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.panel { margin-bottom: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; font-size: 13px; }
.panel pre { max-height: 260px; margin: 0; overflow: auto; white-space: pre-wrap; color: #b8b5c3; font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.identity-form { display: grid; gap: 13px; }
.identity-form label { display: grid; gap: 7px; color: #d5d2df; font-size: 12px; }
.identity-form input,
.identity-form textarea {
  width: 100%; padding: 12px;
  border: 1px solid var(--line); border-radius: 11px; background: #0c0b11; color: #d7d4e0;
  font-size: 13px; line-height: 1.55;
}
.identity-form input { min-height: 42px; }
.identity-form textarea { min-height: 170px; resize: vertical; }
.identity-form input:focus,
.identity-form textarea:focus { border-color: rgba(var(--accent-rgb), .55); }
.identity-form > small { color: var(--muted-2); font-size: 10px; }
.identity-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.identity-actions .muted { min-height: 16px; font-size: 10px; }
.identity-actions .primary { flex: 0 0 auto; min-height: 34px; padding-inline: 12px; font-size: 10px; }
.list { display: grid; }
.list-row { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.list-row small { color: var(--muted); }
.card-grid { display: grid; gap: 10px; }
.source-upload-panel { display: grid; gap: 10px; }
.source-upload-panel .panel-heading { margin-bottom: 0; }
.source-upload-panel .panel-heading > span { color: var(--muted-2); font-size: 10px; }
.source-upload-panel .primary { justify-self: start; min-height: 36px; padding-inline: 12px; font-size: 10px; }
.source-upload-panel > .muted { margin: 0; font-size: 10px; }
.notebook-panel { display: grid; gap: 10px; }
.notebook-panel > .muted { margin: 0; font-size: 10px; line-height: 1.5; }
.notebook-content {
  max-height: 260px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  padding: 12px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(0,0,0,.2); color: #d8d5de; font-size: 12px; line-height: 1.6;
}
.memory-panel { display: grid; gap: 10px; }
.memory-panel > .muted { margin: 0; font-size: 10px; line-height: 1.5; }
.memory-list { display: grid; gap: 8px; }
.memory-card {
  display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line);
  border-radius: 12px; background: rgba(255,255,255,.02);
}
.memory-card p { margin: 0; color: #e2dfe7; font-size: 12px; line-height: 1.55; }
.memory-card small { color: var(--muted-2); font-size: 10px; }
.memory-meta, .memory-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.memory-meta time { color: var(--muted-2); font-size: 10px; }
.memory-actions { justify-content: flex-end; }
.memory-actions button { min-height: 30px; padding-inline: 9px; font-size: 9px; }
.connection-group-heading { display: grid; gap: 4px; margin: 10px 2px 0; }
.connection-group-heading h4 { margin: 0; color: #d7d3e0; font-size: 12px; }
.connection-group-heading p { margin: 0; color: var(--muted-2); font-size: 10px; }
.connector-setup-panel { display: grid; gap: 12px; margin-top: 10px; }
.connector-setup-panel .provider-form input {
  width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid var(--line);
  border-radius: 11px; background: #0f0f12; color: var(--ink); font-size: 13px; color-scheme: dark;
}
.skill-card, .connection-card { display: grid; gap: 9px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.skill-card h4, .connection-card h4 { margin: 0; font-size: 15px; }
.skill-card p, .connection-card p { margin: 0; color: var(--muted); font-size: 12px; }
.skill-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.skill-review { display: grid; gap: 8px; padding-top: 4px; }
.skill-review details { border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); }
.skill-review summary { cursor: pointer; padding: 9px 11px; color: #c3bfce; font-size: 10px; overflow-wrap: anywhere; }
.skill-review details > :not(summary) { margin: 0 11px 10px; }
.skill-review pre { max-height: 220px; padding: 10px; border-radius: 8px; background: #09090d; }
.skill-review small { display: block; color: var(--muted); }
.capability-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; }
.capability-list li { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 10px; }
.provider-form { display: grid; gap: 15px; }
.provider-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.provider-form label, .credential-field { display: grid; gap: 7px; color: #d5d2df; font-size: 12px; }
.provider-form select, .credential-field input {
  width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px;
  background: #0f0f12; color: var(--ink); font-size: 13px; color-scheme: dark;
}
.provider-form select:focus, .credential-field input:focus { border-color: rgba(var(--accent-rgb), .55); }
.credential-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.credential-field small, .provider-note { color: var(--muted-2); font-size: 10px; line-height: 1.55; }
.chatgpt-auth { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.018); }
.chatgpt-auth-status { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.chatgpt-device { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; padding: 11px; border-radius: 10px; background: #0c0b11; }
.chatgpt-device span { color: var(--muted-2); font-size: 10px; }
.chatgpt-device code { color: var(--ink); font-size: 14px; letter-spacing: .08em; user-select: all; }
.chatgpt-device a { grid-column: 1 / -1; color: rgb(var(--accent-rgb)); font-size: 10px; }
.chatgpt-actions { display: flex; align-items: center; gap: 12px; }
.chatgpt-button { min-height: 36px; padding: 0 13px; border: 1px solid rgba(var(--accent-rgb), .4); border-radius: 10px; background: rgba(var(--accent-rgb), .14); color: white; font-size: 10px; cursor: pointer; }
.chatgpt-button:disabled { opacity: .55; cursor: wait; }
.provider-note { margin: 0; }
.provider-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.provider-actions .muted { min-width: 0; font-size: 10px; }
.provider-actions .primary { flex: 0 0 auto; min-height: 38px; padding-inline: 14px; font-size: 10px; }
.settings-list { display: grid; gap: 22px; }
.settings-list fieldset { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0; border: 0; }
.settings-list legend { float: left; color: #d3d0da; font-size: 12px; }
.segmented { display: flex; padding: 3px; border-radius: 10px; background: var(--surface-soft); }
.segmented button { min-height: 28px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 9px; cursor: pointer; }
.segmented button.active { background: rgba(var(--accent-rgb), .2); color: white; }
.accent-list { display: flex; gap: 7px; }
.accent-list button { width: 25px; height: 25px; border: 2px solid transparent; border-radius: 50%; background: var(--swatch); cursor: pointer; }
.accent-list button.active { border-color: white; box-shadow: 0 0 0 2px var(--swatch); }
.danger-button { width: 100%; min-height: 42px; margin-top: 14px; border: 1px solid rgba(255,122,134,.2); border-radius: 11px; background: rgba(255,122,134,.07); color: #ff9ca5; cursor: pointer; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes blink { 50% { opacity: .15; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(255,122,134,.08); } }

@media (max-width: 760px) {
  .app-shell::after {
    background:
      radial-gradient(ellipse at 50% 38%, transparent 18%, rgba(18,18,20,.07) 62%, rgba(10,10,12,.42) 100%),
      linear-gradient(0deg, #111113 0%, rgba(17,17,19,.48) 48%, rgba(17,17,19,.06));
  }
  .product-header { height: 60px; grid-template-columns: 1fr auto; padding: max(9px, env(safe-area-inset-top)) 12px 7px; gap: 7px; }
  .brand-name { display: none; }
  .desktop-label, #work-pill { display: none !important; }
  .workbench { height: calc(100dvh - 60px); }
  .messages { padding: 16px 14px 24px; }
  .welcome-card { width: 100%; margin-top: clamp(24px, 8vh, 72px); text-align: center; }
  .welcome-card h1 { font-size: clamp(44px, 14vw, 62px); }
  .welcome-card > p:not(.eyebrow) { margin-inline: auto; font-size: 15px; }
  .starter-prompts { justify-content: center; margin-top: 22px; }
  .starter-prompt:nth-child(n+4) { display: none; }
  .message { margin-bottom: 22px; }
  .message.user { margin-bottom: 22px; }
  .bubble { font-size: 15.5px; line-height: 1.58; }
  .message.user .bubble { max-width: 84vw; padding: 8px 13px; border-radius: 17px; line-height: 1.45; }
  .tool-card, .artifact-card { margin-left: 0; }
  .composer {
    width: calc(100% - 16px); margin-bottom: max(8px, env(safe-area-inset-bottom));
    padding: 10px 10px 9px; border-radius: 22px;
  }
  .composer textarea { min-height: 44px; padding: 2px 7px 6px; font-size: 16px; }
  .composer-toolbar { gap: 8px; }
  .composer-actions { gap: 5px; }
  .composer-status { max-width: min(42vw, 180px); font-size: 10px; }
  .composer .round-button { flex-basis: 40px; width: 40px; height: 40px; }
  .send-button { flex-basis: 40px; width: 40px; height: 40px; }
  .drawer { width: 100%; border-left: 0; }
  .drawer-header { padding-top: max(18px, env(safe-area-inset-top)); }
  .drawer-content { padding-inline: 16px; }
  .provider-grid { grid-template-columns: 1fr; }
  .provider-actions { align-items: stretch; flex-direction: column; }
  .provider-actions .primary { width: 100%; }
  .task-form-actions { align-items: stretch; flex-direction: column; }
  .task-form-actions .primary { width: 100%; }
  .onboarding-grid { grid-template-columns: 1fr; }
  .onboarding-card { min-height: 112px; }
}

@media (max-width: 1099px) {
  .work-surface {
    position: fixed; z-index: 14; top: 64px; right: 0; bottom: 0; width: min(440px, 100vw);
    height: auto; border-left: 1px solid var(--line); opacity: 0; transform: translateX(102%);
    box-shadow: var(--shadow);
  }
  .workbench.space-open .work-surface { width: min(440px, 100vw); opacity: 1; transform: translateX(0); }
}

@media (max-width: 760px) {
  .work-surface { top: 60px; width: 100vw; border-left: 0; }
  .workbench.space-open .work-surface { width: 100vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
