:root{
  --canvas:#f3f6fa;
  --paper:#ffffff;
  --paper-soft:#f7f9fc;
  --ink:#0f2039;
  --ink-1:#0f2039;
  --ink-2:#31445f;
  --muted:#52657e;
  --muted-2:#64748b;
  --line:#dce3ec;
  --border:#dce3ec;
  --line-strong:#bdc9d8;
  --accent:#2b63e5;
  --brand:#2b63e5;
  --accent-hover:#1f55ce;
  --accent-soft:#edf3ff;
  --success:#07836d;
  --danger:#c13e4d;
  --warning:#a8660b;
  --surface:#ffffff;
  --rail:#0a1c36;
  --rail-2:#102746;
  --rail-text:#f6f9fd;
  --rail-muted:#aebdd0;
  --shadow:0 24px 64px rgba(15,32,57,.14);
  --shadow-soft:0 4px 8px rgba(15,32,57,.06);
  --radius:10px;
  --radius-sm:6px;
  --ease:cubic-bezier(.22,1,.36,1);
  --motion-instant:120ms;
  --motion-fast:160ms;
  --motion-standard:220ms;
  --z-sidebar:30;
  --z-modal-backdrop:70;
  --z-modal:80;
  --z-toast:90;
}

*{box-sizing:border-box}
html,body{width:100%;height:100%}
body{
  margin:0;
  overflow:hidden;
  background:var(--canvas);
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing:antialiased;
}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed}
input,textarea,button{outline:none}
[hidden]{display:none!important}
.ambient-grid,.ambient-glow{display:none}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible{
  outline:3px solid rgba(43,99,229,.22);
  outline-offset:2px;
}

.login-view{
  position:fixed;
  inset:0;
  display:grid;
  place-items:center;
  overflow:auto;
  padding:28px;
  background:var(--canvas);
}
.login-shell{
  width:min(980px,100%);
  min-height:590px;
  display:grid;
  grid-template-columns:1.08fr .92fr;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--paper);
  box-shadow:var(--shadow);
}
.login-intro{
  display:flex;
  flex-direction:column;
  padding:42px 48px;
  border-right:1px solid var(--line);
  background:var(--paper-soft);
}
.workbench-brand{display:flex;align-items:center;gap:12px}
.brand-mark{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:7px;
  background:var(--ink);
  color:#fff;
  font-size:18px;
  font-weight:760;
}
.workbench-brand>span:last-child{display:flex;flex-direction:column;min-width:0}
.workbench-brand b{font-size:14px;font-weight:740}
.workbench-brand small{margin-top:3px;color:var(--muted);font-size:11px}
.login-copy{margin:auto 0}
.login-copy p{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 16px;
  color:var(--accent);
  font-size:13px;
  font-weight:680;
}
.login-copy p i{width:6px;height:6px;border-radius:50%;background:var(--accent)}
.login-copy h1{
  margin:0;
  color:var(--ink);
  font-size:44px;
  font-weight:760;
  letter-spacing:-.035em;
  line-height:1.16;
}
.login-copy>span{
  display:block;
  max-width:470px;
  margin-top:20px;
  color:var(--muted);
  font-size:14px;
  line-height:1.75;
}
.dual-rail{display:flex;align-items:center}
.dual-rail-login{max-width:390px;margin-top:auto;padding-top:30px}
.rail-end{display:grid;grid-template-columns:12px auto;align-items:center;column-gap:8px;color:var(--ink-2)}
.rail-end>i{grid-row:1/3;width:10px;height:10px;border:2px solid var(--line-strong);border-radius:50%}
.rail-end.active>i{border-color:var(--accent);background:var(--accent)}
.rail-end b{font-size:12px;font-weight:680}
.rail-end small{margin-top:2px;color:var(--muted-2);font-size:10px}
.rail-line{flex:1;height:1px;margin:0 14px;background:var(--line)}

.workbench-login{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:50px 54px;
  background:var(--paper);
}
.workbench-login header{margin-bottom:30px}
.login-index{color:var(--accent);font-size:12px;font-weight:680}
.workbench-login h2{margin:9px 0 0;font-size:28px;font-weight:740;letter-spacing:-.02em}
.workbench-login header p{margin:10px 0 0;color:var(--muted);font-size:13px;line-height:1.65}
.field-label{margin:15px 0 8px;color:var(--ink-2);font-size:13px;font-weight:650}
.field-control{
  height:46px;
  display:flex;
  align-items:center;
  overflow:hidden;
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  background:#fff;
  transition:border-color 160ms ease,box-shadow 160ms ease;
}
.field-control:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(36,95,214,.11)}
.field-control>span{
  width:54px;
  flex:0 0 54px;
  border-right:1px solid var(--line);
  color:var(--muted);
  font-size:11px;
  text-align:center;
}
.field-control input{min-width:0;flex:1;height:100%;padding:0 13px;border:0;background:transparent;color:var(--ink);font-size:14px}
.field-control input::placeholder{color:var(--muted-2)}
.password-reveal{height:34px;margin-right:6px;padding:0 9px;border:0;border-radius:4px;background:transparent;color:var(--muted);font-size:12px}
.password-reveal:hover{background:var(--paper-soft);color:var(--ink)}
.login-submit{
  height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:24px;
  padding:0 16px;
  border:1px solid var(--accent);
  border-radius:var(--radius-sm);
  background:var(--accent);
  color:#fff;
  font-size:14px;
  font-weight:700;
  transition:background-color 160ms ease,transform 120ms ease;
}
.login-submit:hover{background:var(--accent-hover)}
.login-submit:active{transform:translateY(1px)}
.login-submit:disabled{opacity:.55}
.login-submit i{font-style:normal;font-size:17px}
.form-error{min-height:28px;padding-top:10px;color:var(--danger);font-size:12px;text-align:center}
.workbench-login footer{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:12px;color:var(--muted-2);font-size:11px}
.workbench-login footer i{width:5px;height:5px;border-radius:50%;background:var(--success)}

.workbench-app{
  position:fixed;
  inset:0;
  min-width:0;
  min-height:0;
  display:grid;
  grid-template-columns:288px minmax(0,1fr);
  overflow:hidden;
  background:var(--canvas);
}
.thread-sidebar{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  border-right:1px solid var(--line);
  background:var(--paper);
}
.sidebar-head{min-height:68px;display:flex;align-items:center;gap:12px;padding:12px 18px;border-bottom:1px solid var(--line)}
.sidebar-head .workbench-brand{flex:1}
.workbench-brand.compact .brand-mark{width:34px;height:34px;font-size:16px}
.workbench-brand.compact b{font-size:13px}
.workbench-brand.compact small{display:none}
.icon-button{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:#fff;
  color:var(--muted);
  font-size:15px;
}
.icon-button:hover{border-color:var(--line-strong);background:var(--paper-soft);color:var(--ink)}
.icon-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sidebar-close,.sidebar-open{display:none}
.employee-profile{min-height:82px;display:flex;align-items:center;gap:11px;padding:14px 18px;border-bottom:1px solid var(--line)}
.profile-avatar{
  width:44px;
  height:44px;
  flex:0 0 44px;
  overflow:hidden;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:50%;
  background:var(--accent-soft);
  color:var(--accent);
  font-size:15px;
  font-weight:750;
}
.profile-avatar img{width:100%;height:100%;object-fit:cover}
.profile-copy{min-width:0;flex:1;display:flex;flex-direction:column}
.profile-copy b{overflow:hidden;font-size:13px;font-weight:720;text-overflow:ellipsis;white-space:nowrap}
.profile-copy small{margin-top:4px;overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.profile-live{display:flex;align-items:center;gap:5px;color:var(--success);font-size:10px;font-weight:680}
.profile-live i{width:6px;height:6px;border-radius:50%;background:var(--success)}
.workspace-mode-switch{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  padding:12px 12px 4px;
}
.workspace-mode-switch button{
  min-width:0;
  min-height:44px;
  display:grid;
  grid-template-columns:22px minmax(0,1fr);
  align-items:center;
  gap:8px;
  padding:9px 10px;
  border:1px solid transparent;
  border-radius:var(--radius-sm);
  background:transparent;
  color:var(--muted);
  text-align:left;
}
.workspace-mode-switch button:hover{background:var(--paper-soft);color:var(--ink)}
.workspace-mode-switch button.active{border-color:#cfdbf4;background:var(--accent-soft);color:var(--accent)}
.workspace-mode-switch svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.workspace-mode-switch span{min-width:0;display:flex;flex-direction:column}
.workspace-mode-switch b{overflow:hidden;font-size:12px;font-weight:720;text-overflow:ellipsis;white-space:nowrap}
.workspace-mode-switch small{display:none;margin-top:2px;color:var(--muted);font-size:9px}
.sidebar-workspace-panel{min-height:0;flex:1;display:flex;flex-direction:column}
.thread-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px 7px 16px}
.thread-source-tabs{min-width:0;display:flex;align-items:center;gap:2px}
.thread-source-tabs button{
  width:auto;
  height:38px;
  padding:0 9px;
  border:0;
  border-bottom:2px solid transparent;
  border-radius:0;
  background:transparent;
  color:var(--muted);
  font-size:12px;
  font-weight:650;
  white-space:nowrap;
}
.thread-source-tabs button:hover{color:var(--ink)}
.thread-source-tabs button.active{border-bottom-color:var(--accent);color:var(--ink)}
.thread-section-head>button{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:var(--radius-sm);
  background:transparent;
  color:var(--muted);
}
.thread-section-head>button:hover{background:var(--paper-soft);color:var(--ink)}
.thread-section-head>button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.thread-list{flex:1;min-height:0;overflow:auto;padding:0 10px 14px}
.thread-item{
  position:relative;
  width:100%;
  display:grid;
  grid-template-columns:20px minmax(0,1fr);
  gap:8px;
  padding:12px 10px;
  border:0;
  border:1px solid transparent;
  border-radius:var(--radius-sm);
  background:transparent;
  color:var(--ink-2);
  text-align:left;
  transition:background-color 160ms ease,border-color 160ms ease;
}
.thread-item::before{content:"";width:6px;height:6px;margin:5px auto 0;border:1px solid var(--line-strong);border-radius:50%}
.thread-item:hover{background:var(--paper-soft)}
.thread-item.active{border-color:#cfdbf4;background:var(--accent-soft)}
.thread-item.active::before{border-color:var(--accent);background:var(--accent)}
.thread-item-copy{min-width:0;display:flex;flex-direction:column}
.thread-item-copy b{overflow:hidden;color:var(--ink);font-size:12px;font-weight:680;text-overflow:ellipsis;white-space:nowrap}
.thread-item-copy span{margin-top:5px;overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.thread-item-copy time{margin-top:5px;color:var(--muted-2);font-size:10px}
.thread-list-empty,.thread-list-error{padding:40px 16px;color:var(--muted);font-size:12px;line-height:1.7;text-align:center}
.thread-list-error button{min-height:36px;margin-top:10px;padding:0 11px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:#fff;color:var(--ink);font-size:11px}
.thread-list-loading{padding:10px}
.thread-list-loading i,.thread-list-loading span{display:block;border-radius:4px;background:#edf0f3;animation:loadingPulse 1.2s ease-in-out infinite}
.thread-list-loading i{height:52px}
.thread-list-loading span{height:44px;margin-top:8px}
.thread-list-loading span:last-child{width:78%}
.sidebar-foot{padding:9px 12px calc(9px + env(safe-area-inset-bottom));border-top:1px solid var(--line)}
.dual-rail.compact{margin-bottom:12px}
.dual-rail.compact .rail-end{grid-template-columns:10px auto}
.dual-rail.compact .rail-end>i{width:8px;height:8px;border-width:1px}
.dual-rail.compact .rail-line{margin-inline:9px}
.dual-rail.compact .rail-end b{font-size:10px}
.sidebar-foot>button{width:100%;height:36px;border:1px solid var(--line);border-radius:var(--radius-sm);background:#fff;color:var(--muted);font-size:11px}
.sidebar-foot>button:hover{border-color:#e0a8ae;background:#fff7f8;color:var(--danger)}

.collaboration-sidebar-panel{padding-bottom:10px}
.collaboration-filter-title{display:flex;align-items:center;justify-content:space-between;padding:12px 18px 7px;color:var(--muted);font-size:10px;font-weight:700}
.collaboration-filter-title button{border:0;background:transparent;color:var(--accent);font-size:10px}
.collaboration-side-filters{display:flex;flex-direction:column;padding:0 10px}
.collaboration-side-filters button{
  min-height:40px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 10px;
  border:1px solid transparent;
  border-radius:var(--radius-sm);
  background:transparent;
  color:var(--muted);
  font-size:12px;
  text-align:left;
}
.collaboration-side-filters button:hover{background:var(--paper-soft);color:var(--ink)}
.collaboration-side-filters button.active{border-color:#cfdbf4;background:var(--accent-soft);color:var(--ink)}
.collaboration-side-filters b{min-width:24px;padding:2px 6px;border-radius:10px;background:#eef1f5;color:var(--muted);font-size:9px;text-align:center}
.collaboration-side-filters button.active b{background:#dce8ff;color:var(--accent)}

.chat-cockpit{min-width:0;min-height:0;height:100%;display:flex;flex-direction:column;overflow:hidden;background:var(--canvas)}
.chat-head{min-height:68px;display:flex;align-items:center;gap:14px;padding:10px 24px;border-bottom:1px solid var(--line);background:var(--paper);flex-shrink:0}
.chat-heading{min-width:0;flex:1}
.chat-heading p{display:flex;align-items:center;gap:7px;margin:0;color:var(--muted);font-size:11px}
.chat-heading p i{width:6px;height:6px;border-radius:50%;background:var(--success)}
.chat-heading h1{margin:5px 0 0;overflow:hidden;color:var(--ink);font-size:17px;font-weight:720;letter-spacing:-.015em;text-overflow:ellipsis;white-space:nowrap}
.chat-head-meta{display:flex;align-items:center;gap:10px}
.chat-head-meta>span{max-width:210px;overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.chat-head-meta button{height:38px;padding:0 12px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:#fff;color:var(--ink-2);font-size:12px}
.chat-head-meta button:hover{background:var(--paper-soft);color:var(--ink)}
.chat-stream{position:relative;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:32px clamp(20px,5vw,70px)}
.message-list{width:min(900px,100%);margin:0 auto;display:flex;flex-direction:column;gap:22px;padding-bottom:20px}
.message{display:grid;grid-template-columns:34px minmax(0,1fr);gap:11px;align-items:start;animation:messageIn 220ms var(--ease) both}
.message.user{grid-template-columns:minmax(0,1fr) 34px;padding-left:clamp(28px,9vw,130px)}
.message-assistant{padding-right:clamp(28px,9vw,130px)}
.message-avatar{width:34px;height:34px;display:grid;place-items:center;padding:0;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--accent);font-size:10px;font-weight:750;cursor:pointer}
.message-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
.message-avatar:hover{border-color:var(--accent);background:var(--accent-soft)}
.message-avatar:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.message.user .message-avatar{grid-column:2;background:var(--accent);color:#fff;border-color:var(--accent)}
.message.user .message-avatar:hover{background:var(--accent-hover)}
.message.user .message-content{grid-column:1;grid-row:1}
.message-content{min-width:0}
.message-meta{display:flex;align-items:center;gap:8px;margin-bottom:7px;color:var(--muted-2);font-size:10px}
.message.user .message-meta{justify-content:flex-end}
.message-meta b{color:var(--muted);font-size:11px}
.message-body{
  padding:13px 15px;
  border:1px solid var(--line);
  border-radius:2px var(--radius) var(--radius) var(--radius);
  background:var(--paper);
  color:var(--ink-2);
  font-size:14px;
  line-height:1.75;
  white-space:pre-wrap;
  word-break:break-word;
}
.message-actions{display:flex;justify-content:flex-start;gap:6px;margin-top:7px}
.message.user .message-actions{justify-content:flex-end}
.message-save-button{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:30px;
  padding:0 9px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:#fff;
  color:var(--muted);
  font-size:10px;
  opacity:0;
  transition:opacity 140ms ease,border-color 140ms ease,background-color 140ms ease,color 140ms ease;
}
.message:hover .message-save-button,.message:focus-within .message-save-button{opacity:1}
.message-save-button:hover{border-color:#aec2e8;background:var(--accent-soft);color:var(--accent)}
.message-report-button{opacity:1;color:var(--accent);border-color:#c7d5ef;background:var(--accent-soft)}
.message-revise-button{opacity:1}
.message-result-state{padding:2px 6px;border-radius:999px;background:#f1f3f6;color:var(--muted);font-size:9px;font-weight:650}
.message.user .message-body{border-color:#cfdbf4;border-radius:var(--radius) 2px var(--radius) var(--radius);background:var(--accent-soft);color:var(--ink)}
.message.pending .message-body{display:flex;align-items:center;gap:7px;color:var(--muted)}
.message.pending.has-content .message-body{display:block;color:var(--ink-2)}
.message.streaming .message-body::after{
  content:"";
  display:inline-block;
  width:2px;
  height:1em;
  margin-left:4px;
  vertical-align:-.12em;
  background:currentColor;
  opacity:.65;
  animation:stream-caret .9s steps(1,end) infinite;
}
.message.message-update{animation:none}
@keyframes stream-caret{50%{opacity:0}}
.typing-dot{width:5px;height:5px;border-radius:50%;background:var(--accent);animation:typing 1.1s ease-in-out infinite}
.typing-dot:nth-child(2){animation-delay:.14s}
.typing-dot:nth-child(3){animation-delay:.28s}
.message-image{margin:10px 0 4px;overflow:hidden;border:1px solid var(--line);border-radius:var(--radius);background:#fff}
.message-image:first-child{margin-top:0}
.message-image:last-child{margin-bottom:0}
.message-image img{display:block;width:auto;max-width:100%;max-height:min(68vh,760px);margin:auto;object-fit:contain}
.chat-empty{min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--muted)}
.core-orbit{width:72px;height:72px;display:grid;place-items:center;margin-bottom:22px;border-radius:50%;background:var(--accent-soft)}
.core-orbit::before,.core-orbit>i,.core-orbit>span{display:none}
.core-orbit b{color:var(--accent);font-size:25px;font-weight:760}
.chat-empty>p{margin:0;color:var(--accent);font-size:11px;font-weight:680}
.chat-empty h2{margin:10px 0 0;color:var(--ink);font-size:22px;font-weight:720;letter-spacing:-.02em}
.chat-empty>span{max-width:460px;margin-top:10px;font-size:13px;line-height:1.7}
.chat-empty>button{height:40px;margin-top:20px;padding:0 14px;border:1px solid var(--accent);border-radius:var(--radius-sm);background:var(--accent);color:#fff;font-size:12px;font-weight:680}
.chat-empty>button:hover{background:var(--accent-hover)}
.chat-state{width:min(900px,100%);margin:0 auto 18px;padding:11px 13px;border:1px solid var(--line);border-radius:var(--radius-sm);background:#fff;color:var(--muted);font-size:12px}
.chat-state.error{border-color:#efc8cc;background:#fff7f8;color:var(--danger)}
.chat-state.loading{display:flex;align-items:center;gap:8px}
.chat-state.loading::before{content:"";width:14px;height:14px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}
.composer{flex-shrink:0;padding:12px clamp(18px,4vw,56px) calc(16px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--paper)}
.composer-track{display:none}
.composer-task-action{width:min(900px,100%);min-height:34px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 auto 8px;padding:6px 8px 6px 11px;border:1px solid #c7d5ef;border-radius:var(--radius-sm);background:var(--accent-soft);color:var(--ink-2)}
.composer-task-action[hidden]{display:none}
.composer-task-action span{display:flex;align-items:baseline;gap:8px;min-width:0}
.composer-task-action b{font-size:11px;color:var(--accent)}
.composer-task-action small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:var(--muted)}
.composer-task-action button{height:24px;padding:0 8px;border:0;border-radius:5px;background:transparent;color:var(--muted);font-size:10px}
.composer-task-action button:hover:not(:disabled){background:#dce7fa;color:var(--accent)}
.composer-attachments{width:min(900px,100%);display:flex;flex-wrap:wrap;gap:8px;margin:0 auto 8px}
.attachment-tray[hidden]{display:none}
.attachment-card{
  width:min(320px,100%);
  min-height:56px;
  display:grid;
  grid-template-columns:40px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:7px 7px 7px 8px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--paper);
  color:var(--ink-2);
}
.attachment-card-icon{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border-radius:6px;
  background:var(--paper-soft);
  color:var(--muted);
}
.attachment-card-icon.is-image{background:#eef8f3;color:var(--success)}
.attachment-card-icon.is-audio{background:#fff7e8;color:#a16207}
.attachment-card-icon.is-sheet{background:#edf8f1;color:#16814f}
.attachment-card-icon.is-slides{background:#fff2eb;color:#b54708}
.attachment-card-icon.is-document{background:var(--accent-soft);color:var(--accent)}
.attachment-card-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.attachment-card-copy{min-width:0;display:flex;flex-direction:column;gap:4px}
.attachment-card-name{overflow:hidden;color:var(--ink);font-size:12px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}
.attachment-card-copy small{display:flex;align-items:center;gap:5px;min-width:0;color:var(--muted);font-size:10px;line-height:1.2}
.attachment-card-copy small i{color:var(--muted-2);font-style:normal}
.attachment-card-status{display:inline-flex;align-items:center;gap:5px}
.attachment-card[data-status="uploading"] .attachment-card-status::before{
  content:"";
  width:10px;
  height:10px;
  box-sizing:border-box;
  border:1.5px solid var(--line-strong);
  border-top-color:var(--accent);
  border-radius:50%;
  animation:spin .8s linear infinite;
}
.attachment-card[data-status="failed"]{border-color:#efc8cc;background:#fff7f8}
.attachment-card[data-status="failed"] .attachment-card-status{color:var(--danger)}
.attachment-card-remove{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:6px;
  background:transparent;
  color:var(--muted);
}
.attachment-card-remove:hover:not(:disabled){background:var(--paper-soft);color:var(--ink)}
.attachment-card-remove svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.message-attachments{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 8px}
.message-attachments .attachment-card{width:min(300px,100%);grid-template-columns:36px minmax(0,1fr);min-height:52px;padding:7px 9px}
.message-attachments .attachment-card-icon{width:36px;height:36px}
.message.user .message-attachments{justify-content:flex-end}
.composer-attachment{min-width:0;max-width:100%;height:30px;display:flex;align-items:center;gap:7px;padding:0 5px 0 9px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper-soft);color:var(--ink-2);font-size:10px}
.composer-attachment>span{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.composer-attachment>small{color:var(--muted-2);font-size:9px}
.composer-attachment>button{width:22px;height:22px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--muted);font-size:14px;line-height:1}
.composer-attachment>button:hover:not(:disabled){background:#e8edf3;color:var(--ink)}
.composer-control{width:min(900px,100%);display:flex;align-items:flex-end;gap:9px;margin:0 auto;padding:7px 7px 7px 14px;border:1px solid var(--line-strong);border-radius:var(--radius);background:#fff;transition:border-color 160ms ease,box-shadow 160ms ease}
.composer-control:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(36,95,214,.1)}
.composer-control textarea{min-height:38px;max-height:150px;flex:1;padding:9px 0;border:0;resize:none;background:transparent;color:var(--ink);font-size:14px;line-height:1.5}
.composer-control textarea::placeholder{color:var(--muted-2)}
.composer-control textarea:disabled{opacity:.65}
.composer-control button{height:38px;display:flex;align-items:center;gap:8px;padding:0 12px;border:1px solid var(--accent);border-radius:var(--radius-sm);background:var(--accent);color:#fff;font-size:12px;font-weight:700}
.composer-control button:hover:not(:disabled){background:var(--accent-hover)}
.composer-control button:disabled{opacity:.4}
.composer-control button i{font-style:normal;font-size:15px}
.composer-control .attachment-button{width:38px;min-width:38px;height:38px;display:grid;place-items:center;padding:0;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--muted)}
.composer-control .attachment-button:hover:not(:disabled){background:var(--paper-soft);color:var(--accent)}
.composer-control .attachment-button:disabled{opacity:.35}
.composer-control .attachment-button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.composer-meta{width:min(900px,100%);display:flex;margin:7px auto 0;color:var(--muted-2);font-size:10px}
#composer-channel{display:none}

.collaboration-cockpit{
  min-width:0;
  min-height:0;
  display:grid;
  grid-template-rows:auto auto minmax(0,1fr);
  background:var(--canvas);
}
.collaboration-head{
  min-height:68px;
  display:flex;
  align-items:center;
  gap:18px;
  padding:10px 24px;
  border-bottom:1px solid var(--line);
  background:var(--paper);
}
.collaboration-heading{min-width:0;flex:1}
.collaboration-heading p{display:flex;align-items:center;gap:7px;margin:0;color:var(--accent);font-size:10px;font-weight:700}
.collaboration-heading p i{width:6px;height:6px;border-radius:50%;background:var(--success)}
.collaboration-heading h1{margin:0;font-size:20px;font-weight:750;letter-spacing:-.025em}
.collaboration-heading>span{display:block;margin-top:3px;color:var(--muted);font-size:11px}
.collaboration-primary,.collaboration-secondary{
  min-height:40px;
  padding:0 14px;
  border-radius:var(--radius-sm);
  font-size:12px;
  font-weight:700;
}
.collaboration-primary{border:1px solid var(--accent);background:var(--accent);color:#fff}
.collaboration-primary:hover{background:var(--accent-hover)}
.collaboration-primary:disabled,.collaboration-secondary:disabled{opacity:.48}
.collaboration-secondary{border:1px solid var(--line-strong);background:#fff;color:var(--ink-2)}
.collaboration-secondary:hover{background:var(--paper-soft)}
.collaboration-section-tabs{
  min-height:46px;
  display:flex;
  align-items:end;
  gap:24px;
  padding:0 26px;
  border-bottom:1px solid var(--line);
  background:var(--paper);
}
.collaboration-section-tabs button{
  align-self:stretch;
  padding:2px 0 0;
  border:0;
  border-bottom:2px solid transparent;
  background:transparent;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}
.collaboration-section-tabs button:hover{color:var(--ink)}
.collaboration-section-tabs button.active{border-bottom-color:var(--accent);color:var(--accent)}

.customer-cockpit,.items-cockpit{min-width:0;min-height:0}
.customer-cockpit{display:grid;grid-template-rows:auto minmax(0,1fr)}
.items-cockpit{display:grid;grid-template-rows:auto minmax(0,1fr)}
.customer-metrics{
  min-height:58px;
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  border-bottom:1px solid var(--line);
  background:var(--paper);
}
.customer-metrics>div{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-content:center;
  padding:12px 18px;
  border-right:1px solid var(--line);
}
.customer-metrics>div:last-child{border-right:0}
.customer-metrics>div[data-stage-jump]{cursor:pointer}
.customer-metrics>div[data-stage-jump]:hover{background:var(--paper-soft)}
.customer-metrics span{overflow:hidden;color:var(--muted);font-size:10px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}
.customer-metrics b{grid-row:1/3;grid-column:2;color:var(--ink);font-size:25px;font-weight:760;letter-spacing:-.04em}
.customer-metrics small{margin-top:5px;overflow:hidden;color:var(--muted-2);font-size:9px;text-overflow:ellipsis;white-space:nowrap}
.customer-workspace{
  min-width:0;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(340px,31%);
  gap:1px;
  background:var(--line);
}
.customer-browser,.customer-detail{min-width:0;min-height:0;background:var(--paper)}
.customer-browser{display:flex;flex-direction:column}
.customer-browser-head{
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 18px;
}
.customer-browser-head p,.customer-form-head p,.customer-action-focus>p{margin:0;color:var(--accent);font-size:9px;font-weight:700}
.customer-browser-head h2{margin:0;font-size:16px;font-weight:740}
.customer-browser-head>span{color:var(--muted);font-size:10px}
.customer-toolbar{display:flex;gap:8px;padding:0 16px 12px;border-bottom:1px solid var(--line)}
.customer-toolbar label{
  min-width:0;
  height:38px;
  display:flex;
  flex:1;
  align-items:center;
  gap:8px;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--paper-soft);
}
.customer-toolbar label:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(36,95,214,.08)}
.customer-toolbar svg{width:15px;height:15px;fill:none;stroke:var(--muted);stroke-width:1.8;stroke-linecap:round}
.customer-toolbar input{min-width:0;flex:1;border:0;background:transparent;color:var(--ink);font-size:11px}
.customer-toolbar button{padding:0 11px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:#fff;color:var(--accent);font-size:10px;font-weight:700}
.customer-pipeline{
  min-height:0;
  flex:1;
  display:grid;
  grid-auto-columns:minmax(220px,1fr);
  grid-auto-flow:column;
  overflow:auto;
  background:var(--line);
  gap:1px;
}
.customer-stage{min-width:0;display:flex;flex-direction:column;background:var(--paper)}
.customer-stage>header{
  min-height:62px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:11px 14px;
  border-top:3px solid #8aa1bd;
  border-bottom:1px solid var(--line);
}
.customer-stage-proposal>header{border-top-color:#c7931d}
.customer-stage-contact>header{border-top-color:#3281c6}
.customer-stage-diagnosis>header{border-top-color:#e47722}
.customer-stage-signing>header{border-top-color:#be3541}
.customer-stage-delivery>header{border-top-color:#12805c}
.customer-stage-maintenance>header{border-top-color:#168760}
.customer-stage>header span{display:block;color:var(--muted-2);font-size:8px;font-weight:700}
.customer-stage>header h3{margin:4px 0 0;font-size:12px;font-weight:740}
.customer-stage>header b{min-width:27px;height:27px;display:grid;place-items:center;border-radius:50%;background:var(--paper-soft);color:var(--ink-2);font-size:11px}
.customer-stage-list{min-height:0;overflow:auto}
.customer-row{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:13px 14px 14px;
  border:0;
  border-bottom:1px solid var(--line);
  background:#fff;
  color:var(--ink);
  text-align:left;
}
.customer-row:hover{background:var(--paper-soft)}
.customer-row.active{box-shadow:inset 0 0 0 1px #a9bfe9;background:var(--accent-soft)}
.customer-row-top,.customer-row-meta{display:flex;align-items:center;justify-content:space-between;gap:8px}
.customer-row-top strong{min-width:0;overflow:hidden;font-size:12px;font-weight:750;text-overflow:ellipsis;white-space:nowrap}
.customer-row-top small{flex:0 0 auto;color:var(--muted);font-size:9px}
.customer-row-meta{color:var(--muted-2);font-size:9px}
.customer-row-meta span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer-row-action{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:7px;color:var(--ink-2);font-size:10px;line-height:1.5}
.customer-row-action i{padding:1px 4px;border-radius:3px;background:var(--accent-soft);color:var(--accent);font-size:8px;font-style:normal;font-weight:700}
.customer-row-blocker{overflow:hidden;color:#a65b14;font-size:9px;line-height:1.45;text-overflow:ellipsis;white-space:nowrap}
.customer-stage-empty{margin:0;padding:28px 14px;color:var(--muted-2);font-size:10px;text-align:center}
.customer-loading{grid-column:1/-1;padding:18px;background:var(--paper)}
.customer-loading i{display:block;height:76px;margin-bottom:8px;background:#eef1f5;animation:loadingPulse 1.2s ease-in-out infinite}
.customer-pipeline-empty{grid-column:1/-1;min-width:360px;display:grid;place-items:center;padding:30px;color:var(--muted);font-size:11px;text-align:center;background:var(--paper)}
.customer-detail{position:relative;display:flex;flex-direction:column}
.customer-detail-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px;text-align:center}
.customer-detail-empty>span,.customer-detail-empty p{display:none}
.customer-detail-empty h2{margin:0;font-size:17px}
.customer-detail-empty small{max-width:340px;margin-top:9px;color:var(--muted);font-size:10px;line-height:1.7}
.customer-detail-empty button{display:none}
.customer-form{min-height:0;height:100%;display:flex;flex-direction:column}
.customer-form-head{
  min-height:72px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:11px 16px;
  border-bottom:1px solid var(--line);
}
.customer-form-head>div{min-width:0;flex:1}
.customer-form-head h2{margin:4px 0 0;overflow:hidden;font-size:15px;text-overflow:ellipsis;white-space:nowrap}
.customer-form-head>div>span{display:block;margin-top:4px;color:var(--muted);font-size:9px}
.customer-back{display:none;border:0;background:transparent;color:var(--accent);font-size:10px}
.customer-form-scroll{min-height:0;overflow:auto;padding:17px}
.customer-action-focus{padding:14px;border:1px solid #cbd9f3;background:var(--accent-soft)}
.customer-action-focus textarea{
  width:100%;
  margin-top:7px;
  padding:9px;
  border:1px solid #cbd9f3;
  border-radius:var(--radius-sm);
  background:#fff;
  color:var(--ink);
  font-size:12px;
  line-height:1.6;
  resize:vertical;
}
.customer-action-focus>div{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:9px}
.customer-action-focus label,.customer-grid label{min-width:0;display:flex;flex-direction:column;gap:6px}
.customer-action-focus label span,.customer-grid label>span{color:var(--ink-2);font-size:9px;font-weight:700}
.customer-action-focus select,.customer-action-focus input,.customer-grid input,.customer-grid select,.customer-grid textarea{
  width:100%;
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  background:#fff;
  color:var(--ink);
  font-size:11px;
}
.customer-action-focus select,.customer-action-focus input,.customer-grid input,.customer-grid select{height:37px;padding:0 9px}
.customer-grid textarea{padding:9px;line-height:1.6;resize:vertical}
.customer-action-focus select:focus,.customer-action-focus input:focus,.customer-action-focus textarea:focus,.customer-grid input:focus,.customer-grid select:focus,.customer-grid textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(36,95,214,.08)}
.customer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.customer-history{margin-top:20px}
.collaboration-metrics{
  min-height:58px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  border-bottom:1px solid var(--line);
  background:var(--paper);
}
.collaboration-metrics>div{
  display:grid;
  grid-template-columns:1fr auto;
  align-content:center;
  padding:10px 18px;
  border-right:1px solid var(--line);
}
.collaboration-metrics>div:last-child{border-right:0}
.collaboration-metrics span{color:var(--muted);font-size:10px;font-weight:680}
.collaboration-metrics b{grid-row:1/3;grid-column:2;font-size:25px;font-weight:760;letter-spacing:-.04em}
.collaboration-metrics small{margin-top:5px;color:var(--muted-2);font-size:9px}
.collaboration-workspace{
  min-height:0;
  display:grid;
  grid-template-columns:minmax(340px,42%) minmax(0,1fr);
  gap:1px;
  background:var(--line);
}
.collaboration-browser,.collaboration-detail{min-width:0;min-height:0;background:var(--paper)}
.collaboration-browser{display:flex;flex-direction:column}
.collaboration-browser>header{
  min-height:70px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 20px 10px;
}
.collaboration-browser>header p,.collaboration-form-head p,.collaboration-history p{margin:0;color:var(--accent);font-size:9px;font-weight:700}
.collaboration-browser>header h2{margin:5px 0 0;font-size:15px;font-weight:720}
.collaboration-browser>header>span{color:var(--muted);font-size:10px}
.collaboration-toolbar{display:flex;gap:7px;padding:0 16px 12px;border-bottom:1px solid var(--line)}
.collaboration-toolbar label{min-width:0;flex:1;height:38px;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper-soft)}
.collaboration-toolbar label:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(36,95,214,.08)}
.collaboration-toolbar svg{width:15px;height:15px;fill:none;stroke:var(--muted);stroke-width:1.8;stroke-linecap:round}
.collaboration-toolbar input{min-width:0;flex:1;border:0;background:transparent;color:var(--ink);font-size:11px}
.collaboration-toolbar select{height:38px;max-width:110px;padding:0 8px;border:1px solid var(--line);border-radius:var(--radius-sm);background:#fff;color:var(--ink-2);font-size:10px}
.collaboration-list{min-height:0;flex:1;overflow:auto}
.collaboration-list-loading{padding:16px}
.collaboration-list-loading i{display:block;height:72px;margin-bottom:8px;border-radius:var(--radius-sm);background:#eef1f5;animation:loadingPulse 1.2s ease-in-out infinite}
.collaboration-list-empty{display:flex;min-height:240px;align-items:center;justify-content:center;padding:24px;color:var(--muted);font-size:11px;line-height:1.7;text-align:center}
.collaboration-item{
  width:100%;
  display:grid;
  grid-template-columns:20px minmax(0,1fr);
  padding:0;
  border:0;
  border-bottom:1px solid var(--line);
  background:#fff;
  color:var(--ink);
  text-align:left;
}
.collaboration-item:hover{background:var(--paper-soft)}
.collaboration-item.active{background:var(--accent-soft)}
.collaboration-priority-line{width:7px;height:7px;align-self:start;justify-self:center;margin-top:18px;border-radius:50%;background:#a9b4c2}
.collaboration-item[data-priority="P0"] .collaboration-priority-line{background:#bd3444}
.collaboration-item[data-priority="P1"] .collaboration-priority-line{background:#d58224}
.collaboration-item[data-priority="P2"] .collaboration-priority-line{background:var(--accent)}
.collaboration-item-copy{min-width:0;padding:13px 16px 14px}
.collaboration-item-top{display:flex;align-items:center;gap:7px}
.collaboration-item-top>span{padding:2px 6px;border-radius:9px;background:#eef1f5;color:var(--muted);font-size:9px;font-weight:700}
.collaboration-item-top>span.status-blocked{background:#fff0f2;color:var(--danger)}
.collaboration-item-top>span.status-waiting_decision{background:#fff5e9;color:#a75b0a}
.collaboration-item-top>span.status-in_progress{background:var(--accent-soft);color:var(--accent)}
.collaboration-item-top>span.status-done{background:#eaf7f2;color:var(--success)}
.collaboration-item-top time{margin-left:auto;color:var(--muted-2);font-size:9px}
.collaboration-item h3{margin:8px 0 0;overflow:hidden;font-size:13px;font-weight:720;text-overflow:ellipsis;white-space:nowrap}
.collaboration-item p{margin:6px 0 0;overflow:hidden;color:var(--muted);font-size:10px;line-height:1.55;text-overflow:ellipsis;white-space:nowrap}
.collaboration-item-foot{display:flex;align-items:center;gap:8px;margin-top:9px;color:var(--muted-2);font-size:9px}
.collaboration-item-foot b{color:var(--ink-2);font-size:9px}
.collaboration-item-foot span:last-child{margin-left:auto}
.collaboration-detail{position:relative;display:flex;flex-direction:column}
.collaboration-detail-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;text-align:center}
.collaboration-detail-empty>span,.collaboration-detail-empty p{display:none}
.collaboration-detail-empty h2{margin:0;font-size:17px}
.collaboration-detail-empty small{max-width:430px;margin-top:10px;color:var(--muted);font-size:11px;line-height:1.7}
.collaboration-detail-empty button{display:none}
.collaboration-form{min-height:0;height:100%;display:flex;flex-direction:column}
.collaboration-form-head{
  min-height:76px;
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px 18px;
  border-bottom:1px solid var(--line);
}
.collaboration-form-head>div:nth-child(2){min-width:0;flex:1}
.collaboration-form-head h2{margin:4px 0 0;overflow:hidden;font-size:16px;text-overflow:ellipsis;white-space:nowrap}
.collaboration-form-head>div:nth-child(2)>span{display:block;margin-top:4px;color:var(--muted);font-size:9px}
.collaboration-form-actions{display:flex;gap:7px}
.collaboration-back{display:none;border:0;background:transparent;color:var(--accent);font-size:11px}
.collaboration-form-scroll{min-height:0;overflow:auto;padding:20px}
.collaboration-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.collaboration-grid label{min-width:0;display:flex;flex-direction:column;gap:7px}
.collaboration-grid label>span,.collaboration-people legend{color:var(--ink-2);font-size:10px;font-weight:700}
.collaboration-grid input,.collaboration-grid select,.collaboration-grid textarea{
  width:100%;
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  background:#fff;
  color:var(--ink);
  font-size:12px;
}
.collaboration-grid input,.collaboration-grid select{height:39px;padding:0 10px}
.collaboration-grid textarea{padding:10px;resize:vertical;line-height:1.65}
.collaboration-grid input:focus,.collaboration-grid select:focus,.collaboration-grid textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(36,95,214,.08)}
.span-2{grid-column:1/-1}
.collaboration-people{margin:0;padding:0;border:0}
.collaboration-people>div{display:flex;flex-wrap:wrap;gap:7px;margin-top:7px}
.collaboration-person{position:relative}
.collaboration-person input{position:absolute;opacity:0;pointer-events:none}
.collaboration-person span{display:inline-flex;align-items:center;min-height:32px;padding:0 9px;border:1px solid var(--line);border-radius:16px;background:#fff;color:var(--muted);font-size:10px}
.collaboration-person input:checked+span{border-color:#aec2e8;background:var(--accent-soft);color:var(--accent);font-weight:700}
.collaboration-history{margin-top:24px;padding-top:18px;border-top:1px solid var(--line)}
.collaboration-history>header{display:flex;align-items:end;justify-content:space-between}
.collaboration-history h3{margin:4px 0 0;font-size:13px}
.collaboration-history>header>span{color:var(--muted);font-size:9px}
.collaboration-history-list{margin-top:10px}
.collaboration-revision{display:grid;grid-template-columns:7px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:38px;border-bottom:1px solid var(--line);color:var(--muted);font-size:10px}
.collaboration-revision i{width:6px;height:6px;border-radius:50%;background:var(--line-strong)}
.collaboration-revision:first-child i{background:var(--accent)}
.collaboration-revision b{color:var(--ink-2);font-size:10px}
.collaboration-revision time{color:var(--muted-2);font-size:9px}
.collaboration-history-empty{padding:18px 0;color:var(--muted);font-size:10px}
.mobile-scrim{display:none}
.workbench-toast{position:fixed;right:20px;bottom:20px;z-index:200;max-width:min(360px,calc(100vw - 28px));padding:11px 14px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--ink);color:#fff;box-shadow:0 14px 34px rgba(21,32,51,.18);font-size:12px;opacity:0;pointer-events:none;transform:translateY(8px);transition:opacity 180ms ease,transform 180ms var(--ease)}
.workbench-toast.show{opacity:1;transform:translateY(0)}
.workbench-toast.error{background:var(--danger)}

@keyframes loadingPulse{0%,100%{opacity:.55}50%{opacity:1}}
@keyframes messageIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes typing{0%,100%{opacity:.3;transform:translateY(0)}50%{opacity:1;transform:translateY(-2px)}}
@keyframes spin{to{transform:rotate(360deg)}}

@media (max-width:900px){
  .login-shell{grid-template-columns:1fr minmax(340px,.82fr)}
  .login-intro{padding:36px}
  .login-copy h1{font-size:38px}
  .workbench-app{grid-template-columns:270px minmax(0,1fr)}
  .collaboration-workspace{grid-template-columns:minmax(310px,44%) minmax(0,1fr)}
  .collaboration-metrics>div{padding-inline:14px}
  .customer-workspace{grid-template-columns:minmax(0,1fr) minmax(320px,36%)}
  .customer-metrics>div{padding-inline:12px}
}

@media (max-width:940px){
  .login-view{display:block;padding:14px}
  .login-shell{min-height:auto;grid-template-columns:1fr}
  .login-intro{min-height:285px;padding:26px;border-right:0;border-bottom:1px solid var(--line)}
  .login-copy{margin:38px 0}
  .login-copy h1{font-size:34px}
  .login-copy>span{font-size:13px}
  .workbench-login{padding:34px 26px}
  .workbench-app{display:block}
  .thread-sidebar{position:fixed;inset:0 auto 0 0;z-index:110;width:min(304px,88vw);transform:translateX(-102%);transition:transform 220ms var(--ease);box-shadow:18px 0 42px rgba(21,32,51,.14)}
  .thread-sidebar.open{transform:translateX(0)}
  .sidebar-close,.sidebar-open{display:grid}
  .mobile-scrim{position:fixed;inset:0;z-index:100;display:block;background:rgba(23,32,51,.32);opacity:0;pointer-events:none;transition:opacity 180ms ease}
  .mobile-scrim.show{opacity:1;pointer-events:auto}
  .chat-cockpit{height:100%}
  .collaboration-cockpit{height:100%;grid-template-rows:auto auto minmax(0,1fr)}
  .chat-head{padding-inline:12px}
  .chat-head-meta>span,.chat-head-meta button{display:none}
  .chat-stream{padding:24px 14px}
  .message.user{padding-left:28px}
  .message-assistant{padding-right:28px}
  .composer{padding-inline:12px}
  .composer-control button span{display:none}
  .composer-control button{padding-inline:10px}
  .composer-attachment>span{max-width:180px}
  .collaboration-head{min-height:68px;padding:9px 12px}
  .collaboration-sidebar-open{display:grid}
  .collaboration-heading>span{display:none}
  .collaboration-head>.collaboration-primary{min-height:36px;padding-inline:10px}
  .collaboration-section-tabs{min-height:42px;gap:20px;padding:0 14px}
  .customer-cockpit{min-height:0;overflow:hidden}
  .customer-metrics{display:flex;min-height:64px;overflow-x:auto}
  .customer-metrics>div{min-width:128px;flex:1 0 128px;padding:8px 10px}
  .customer-metrics small{display:none}
  .customer-metrics b{font-size:19px}
  .customer-workspace{display:block;overflow:auto;background:var(--paper)}
  .customer-browser,.customer-detail{min-height:100%}
  .customer-workspace.detail-open .customer-browser{display:none}
  .customer-workspace:not(.detail-open) .customer-detail{display:none}
  .customer-pipeline{display:block;overflow:visible}
  .customer-stage{border-bottom:1px solid var(--line)}
  .customer-stage>header{position:sticky;top:0;z-index:2;background:var(--paper)}
  .customer-stage-list{overflow:visible}
  .customer-back{display:block}
  .customer-form-head{position:sticky;top:0;z-index:5;background:#fff}
  .customer-form-scroll{padding:14px 12px 28px}
  .customer-grid{grid-template-columns:1fr}
  .collaboration-metrics{min-height:66px}
  .collaboration-metrics>div{padding:9px 10px}
  .collaboration-metrics small{display:none}
  .collaboration-metrics b{font-size:20px}
  .collaboration-workspace{display:block;overflow:auto;background:var(--paper)}
  .collaboration-browser{min-height:100%}
  .collaboration-detail{min-height:100%}
  .collaboration-workspace.detail-open .collaboration-browser{display:none}
  .collaboration-workspace:not(.detail-open) .collaboration-detail{display:none}
  .collaboration-back{display:block}
  .collaboration-form-head{position:sticky;top:0;z-index:5;background:#fff}
  .collaboration-form-scroll{padding:16px 14px 30px}
  .collaboration-grid{grid-template-columns:1fr}
  .span-2{grid-column:auto}
}

@media (max-width:430px){
  .login-view{padding:0}
  .login-shell{min-height:100%;border:0;border-radius:0;box-shadow:none}
  .login-intro{min-height:255px}
  .login-copy{margin:30px 0}
  .login-copy h1{font-size:30px}
  .workbench-login{padding:30px 20px calc(30px + env(safe-area-inset-bottom))}
  .chat-heading h1{font-size:15px}
  .chat-stream{padding-top:20px}
  .message{grid-template-columns:30px minmax(0,1fr);gap:8px}
  .message.user{grid-template-columns:minmax(0,1fr) 30px;padding-left:10px}
  .message-assistant{padding-right:10px}
  .message-avatar{width:30px;height:30px}
  .message-body{padding:11px 12px;font-size:13px}
  .chat-empty h2{font-size:19px}
  .collaboration-heading h1{font-size:18px}
  .collaboration-heading p{font-size:9px}
  .collaboration-metrics span{font-size:9px}
  .collaboration-metrics b{font-size:18px}
  .collaboration-form-head{gap:8px;padding-inline:10px}
  .collaboration-form-head>div:nth-child(2){display:none}
  .collaboration-form-actions{margin-left:auto}
  .collaboration-secondary,.collaboration-primary{min-height:36px;padding-inline:10px}
  .customer-form-head{gap:8px;padding-inline:10px}
  .customer-form-head>div{display:none}
  .customer-form-head>.collaboration-primary{margin-left:auto}
  .customer-action-focus>div{grid-template-columns:1fr}
}

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

/* Client OS v2 · authoritative customer operating contract */
.customer-metrics{grid-template-columns:repeat(5,minmax(0,1fr))}
.customer-metrics>article{
  min-width:0;min-height:64px;display:grid;grid-template-columns:minmax(0,1fr) auto;
  align-content:center;padding:10px 18px;border-right:1px solid var(--line);background:#fff
}
.customer-metrics>article:last-child{border-right:0}
.customer-metrics>article span{overflow:hidden;color:var(--muted);font-size:11px;font-weight:680;text-overflow:ellipsis;white-space:nowrap}
.customer-metrics>article b{grid-row:1/3;grid-column:2;color:var(--ink);font-size:22px;font-weight:720;letter-spacing:-.025em}
.customer-metrics>article small{margin-top:4px;overflow:hidden;color:var(--muted-2);font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.customer-workspace{position:relative;display:block;min-height:0;background:#fff;overflow:hidden}
.customer-browser{height:100%;border-right:0}
.customer-detail{position:absolute;z-index:20;inset:0 0 0 auto;width:min(620px,52vw);border-left:1px solid var(--line);background:#fff;box-shadow:-12px 0 28px rgba(15,32,57,.12)}
.customer-detail-empty{display:none}
.customer-workspace:not(.detail-open) .customer-detail{pointer-events:none;visibility:hidden}
.customer-back{display:inline-flex;align-items:center;justify-content:center}
.customer-toolbar{grid-template-columns:minmax(220px,1fr) auto 118px 118px auto}
.customer-os-pool-actions{height:44px;display:flex;gap:6px}
.customer-os-pool-actions button{min-height:44px;display:flex;align-items:center;gap:7px;padding-inline:11px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:#fff;color:var(--ink-2)}
.customer-os-pool-actions button.active{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.customer-os-pool-actions b{min-width:18px;height:18px;display:grid;place-items:center;border-radius:9px;background:var(--paper-soft);font-size:10px}
.customer-toolbar-actions{white-space:nowrap}
.customer-os-mobile-stage{display:none!important}
.customer-pipeline{grid-auto-flow:initial;grid-template-columns:repeat(6,minmax(0,1fr));overflow:hidden}
.customer-stage{min-width:0}
.customer-stage>header{min-height:54px;padding:10px;border-top:1px solid var(--line)}
.customer-stage>header::before{width:7px;height:7px;flex-basis:7px;background:var(--accent)}
.customer-stage-contact>header::before{background:#4477b9}
.customer-stage-diagnosis>header::before{background:#5c78a4}
.customer-stage-proposal>header::before{background:#9e781c}
.customer-stage-signing>header::before{background:#b86331}
.customer-stage-delivery>header::before{background:#188166}
.customer-stage-maintenance>header::before{background:#4f756a}
.customer-stage>header h3{margin:0;font-size:12px}
.customer-stage-list{overflow:auto;overscroll-behavior:contain}
.customer-stage.drag-over{background:#f2f6fd}
.customer-row{min-height:0;gap:8px;padding:13px 11px}
.customer-row.dragging{opacity:.5}
.customer-row.is-risk{border-color:rgba(198,60,73,.24);background:rgba(198,60,73,.035)}
.customer-row.is-stale{border-color:rgba(196,138,33,.24);background:rgba(196,138,33,.035)}
.customer-row-top{align-items:flex-start}
.customer-row-top strong{font-size:13px;line-height:1.35;white-space:normal}
.customer-os-health{flex:0 0 auto;padding:2px 5px;border-radius:10px;background:#edf5f2;color:#25715e;font-size:9px;font-weight:700}
.customer-os-health.is-red{background:#fff0f2;color:#b72f3d}
.customer-row.is-stale .customer-os-health{background:#fff5df;color:#8e6413}
.customer-row-action{grid-template-columns:auto minmax(0,1fr) auto}
.customer-row-action small{color:var(--muted);font-size:9px}
.customer-row-blocker{padding:7px 8px;border-left:2px solid #c48a21;background:#fff8e9;color:#725014;white-space:normal}
.customer-os-follow{color:var(--muted);font-size:10px}
.customer-os-delivery-copy{padding-top:7px;border-top:1px solid var(--line);color:var(--success);font-size:10px;font-weight:680}
.customer-pipeline.is-pool{display:block;overflow:auto;background:#fff}
.customer-os-pool-view{padding:18px}
.customer-os-pool-view>header{display:flex;align-items:center;justify-content:space-between;padding-bottom:14px;border-bottom:1px solid var(--line)}
.customer-os-pool-view>header h3{margin:0;font-size:17px}
.customer-os-pool-view>header button,.customer-os-pool-list button{min-height:38px;padding-inline:12px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:#fff;color:var(--ink-2);font-size:11px;font-weight:680}
.customer-os-pool-list article{min-height:78px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px 0;border-bottom:1px solid var(--line)}
.customer-os-pool-list article>div:first-child{min-width:0;display:grid;grid-template-columns:minmax(160px,.7fr) minmax(220px,1.3fr) minmax(180px,1fr);align-items:center;gap:16px;flex:1}
.customer-os-pool-list strong{font-size:13px}.customer-os-pool-list span,.customer-os-pool-list small{color:var(--muted);font-size:11px}
.customer-os-pool-list article>div:last-child{display:flex;gap:6px}.customer-os-pool-list article>div:last-child button:last-child{border-color:var(--accent);background:var(--accent);color:#fff}
.customer-grid select:disabled{opacity:1;background:var(--paper-soft);color:var(--muted);cursor:not-allowed}
.customer-grid label small{color:var(--muted-2);font-size:9px;line-height:1.35}
.customer-os-node-section,.customer-os-delivery{margin-top:18px;padding:16px;border:1px solid var(--line);border-radius:10px;background:#fff}
.customer-os-node-section>header,.customer-os-delivery>header{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.customer-os-node-section>header p,.customer-os-delivery>header p{margin:0;color:var(--accent);font-size:10px;font-weight:700}
.customer-os-node-section>header h3,.customer-os-delivery>header h3{margin:4px 0 0;font-size:14px}
.customer-os-node-section>header>span,.customer-os-delivery>header>span{color:var(--muted);font-size:10px}
.customer-os-node-track{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));margin-top:16px}
.customer-os-node-track button{position:relative;min-width:0;padding:0 3px;border:0;background:transparent;color:var(--muted);font-size:9px}
.customer-os-node-track button::before{content:"";position:absolute;z-index:0;top:13px;left:-50%;width:100%;height:1px;background:var(--line)}
.customer-os-node-track button:first-child::before{display:none}
.customer-os-node-track button i{position:relative;z-index:1;width:27px;height:27px;display:grid;place-items:center;margin:auto;border:1px solid var(--line-strong);border-radius:50%;background:#fff;font-style:normal}
.customer-os-node-track button span{display:block;margin-top:7px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer-os-node-track button.is-complete i{border-color:var(--success);background:var(--success);color:#fff}
.customer-os-node-track button.is-current i{border:2px solid var(--accent);color:var(--accent)}
.customer-os-node-track button:not(:disabled):hover i{border-color:var(--accent);background:var(--accent-soft)}
.customer-os-flow-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;margin-top:16px;padding-top:12px;border-top:1px solid var(--line)}
.customer-os-flow-actions>span{margin-right:auto;color:var(--muted);font-size:10px}
.customer-os-flow-actions button,.customer-os-delivery footer button,.customer-os-links button,.customer-os-activity-more{min-height:38px;padding-inline:11px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:#fff;color:var(--ink-2);font-size:11px;font-weight:680}
.customer-os-delivery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.customer-os-delivery-grid label{min-width:0;display:flex;flex-direction:column;gap:6px}.customer-os-delivery-grid label>span{font-size:11px;font-weight:680}
.customer-os-delivery-grid .span-2{grid-column:1/-1}.customer-os-delivery-grid :is(input,select,textarea){width:100%;min-height:42px;padding:9px 10px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:#fff;color:var(--ink);font-size:12px}.customer-os-delivery-grid textarea{resize:vertical}
.customer-os-delivery footer{display:flex;align-items:center;justify-content:flex-end;gap:7px;margin-top:12px}.customer-os-delivery footer>span{margin-right:auto;color:var(--muted);font-size:10px}.customer-os-delivery footer button:last-child{border-color:var(--accent);background:var(--accent);color:#fff}
.customer-os-links{display:flex;align-items:center;gap:18px;margin-top:16px;padding:12px 14px;border:1px solid var(--line);border-radius:10px}.customer-os-links>div{min-width:0;display:flex;flex-direction:column;gap:3px;flex:1}.customer-os-links strong{font-size:12px}.customer-os-links span{color:var(--muted);font-size:10px}
.customer-os-delete{color:var(--danger)}
.customer-os-activity-more{margin-top:10px}
.customer-os-node-dialog{width:min(560px,calc(100vw - 32px))}.customer-os-node-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.customer-os-node-fields label{display:flex;flex-direction:column;gap:6px}.customer-os-node-fields label:first-child{grid-column:1/-1}.customer-os-node-fields label span{font-size:11px;font-weight:680}.customer-os-node-fields :is(input,textarea){padding:10px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);font-size:13px}.customer-os-node-dialog>footer{display:flex;justify-content:flex-end;gap:8px;padding:14px 18px;border-top:1px solid var(--line)}
.customer-os-pool-dialog{width:min(520px,calc(100vw - 32px))}.customer-os-pool-fields{display:grid;gap:13px}.customer-os-pool-fields label{display:flex;flex-direction:column;gap:6px}.customer-os-pool-fields label span{font-size:11px;font-weight:680}.customer-os-pool-fields :is(select,textarea){padding:10px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:#fff;color:var(--ink);font-size:13px}.customer-os-pool-dialog>footer{display:flex;justify-content:flex-end;gap:8px;padding:14px 18px;border-top:1px solid var(--line)}

@media (max-width:1180px){
  .customer-toolbar{grid-template-columns:minmax(200px,1fr) auto 108px auto}.customer-filter-control:nth-of-type(3){display:none!important}
  .customer-detail{width:min(620px,62vw)}
  .customer-pipeline{overflow-x:auto;grid-template-columns:repeat(6,minmax(178px,1fr))}
}
@media (max-width:940px){
  .customer-metrics{grid-template-columns:repeat(5,minmax(116px,1fr));overflow-x:auto}.customer-metrics>article{min-width:116px;padding-inline:10px}
  .customer-toolbar{grid-template-columns:1fr auto}.customer-search-control{grid-column:1}.customer-os-pool-actions{grid-column:2}.customer-filter-control:not(.customer-os-mobile-stage){display:none!important}.customer-os-mobile-stage{display:flex!important;grid-column:1}.customer-toolbar-actions{grid-column:1/-1}
  .customer-pipeline{display:block;overflow:visible}.customer-stage:not(.mobile-selected){display:none}.customer-stage.mobile-selected{display:flex}.customer-stage-list{overflow:visible}
  .customer-detail{position:fixed;z-index:160;inset:0;width:100vw;height:100dvh;border:0;box-shadow:none}.customer-form-head{position:sticky;z-index:3;top:0}
  .customer-workspace{overflow:auto}.customer-browser{height:auto;min-height:100%}
}
@media (max-width:600px){
  .customer-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}.customer-search-control,.customer-os-pool-actions,.customer-os-mobile-stage,.customer-toolbar-actions{grid-column:1}.customer-os-pool-actions button{flex:1}.customer-toolbar-actions{display:grid;grid-template-columns:1fr 1fr 1fr}.customer-toolbar-actions button{min-width:0;padding-inline:6px!important}
  .customer-metrics{grid-template-columns:repeat(5,112px)}.customer-metrics>article small{display:none}.customer-metrics>article b{font-size:19px}
  .customer-os-node-track{overflow-x:auto;grid-template-columns:repeat(7,78px);padding-bottom:5px}.customer-os-flow-actions{align-items:stretch;flex-wrap:wrap}.customer-os-flow-actions>span{flex-basis:100%}.customer-os-flow-actions button{flex:1}
  .customer-os-delivery-grid{grid-template-columns:1fr}.customer-os-delivery-grid .span-2{grid-column:auto}.customer-os-delivery footer{align-items:stretch;flex-wrap:wrap}.customer-os-delivery footer>span{flex-basis:100%}.customer-os-delivery footer button{flex:1}.customer-os-links{align-items:stretch;flex-direction:column}.customer-os-links button{width:100%}
  .customer-os-pool-list article{align-items:stretch;flex-direction:column}.customer-os-pool-list article>div:first-child{display:flex;align-items:flex-start;flex-direction:column;gap:5px}.customer-os-pool-list article>div:last-child button{flex:1}
  .customer-form-head{gap:6px;padding-inline:8px}.customer-form-head :is(.customer-head-action,.collaboration-primary){padding-inline:8px;font-size:10px}.customer-os-node-fields{grid-template-columns:1fr}.customer-os-node-fields label:first-child{grid-column:auto}
}

/* === Markdown rendering inside chat messages === */
.message-body{padding:14px 16px;font-size:13.5px;line-height:1.65;color:var(--ink-2);overflow-wrap:break-word;word-break:normal}
.message-body>p{margin:0 0 8px}
.message-body>p:last-child{margin-bottom:0}
.message-body>ul.message-list,.message-body>ol.message-list{margin:6px 0;padding-left:22px}
.message-body>ul.message-list li,.message-body>ol.message-list li{margin:3px 0;line-height:1.6}
.message-body>h1.message-heading,.message-body>h2.message-heading,.message-body>h3.message-heading,.message-body>h4.message-heading{margin:14px 0 6px;font-weight:600;color:var(--ink-1);line-height:1.35}
.message-body>h1.message-heading{font-size:18px}
.message-body>h2.message-heading{font-size:16px;border-bottom:1px solid var(--border);padding-bottom:4px}
.message-body>h3.message-heading{font-size:14.5px}
.message-body>h4.message-heading{font-size:14px}
.message-body>blockquote.message-quote{margin:8px 0;padding:8px 12px;border:1px solid var(--line);background:var(--paper-soft);color:var(--ink-2);border-radius:6px}
.message-body>hr.message-hr{border:none;border-top:1px solid var(--border);margin:12px 0}
.message-body>pre.message-code-block{background:#1e293b;color:#e2e8f0;padding:12px 14px;border-radius:8px;overflow:auto;font-size:12px;line-height:1.5;margin:8px 0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre}
.message-body>pre.message-code-block code{background:transparent;padding:0;color:inherit}
.message-body code.message-code{background:#f1f5f9;padding:1px 6px;border-radius:4px;font-size:12.5px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#be185d}
.message-body>table.message-table{border-collapse:collapse;width:100%;max-width:100%;margin:10px 0;font-size:13px;background:var(--surface);border:1px solid var(--border);border-radius:6px;overflow:hidden;table-layout:auto;display:table}
.message-body>table.message-table thead{background:#f8fafc}
.message-body>table.message-table th,.message-body>table.message-table td{padding:8px 12px;border-bottom:1px solid var(--border);border-right:1px solid var(--border);text-align:left;vertical-align:top;line-height:1.5;min-width:80px;word-break:break-word}
.message-body>table.message-table th:last-child,.message-body>table.message-table td:last-child{border-right:none}
.message-body>table.message-table tr:last-child th,.message-body>table.message-table tr:last-child td{border-bottom:none}
.message-body>table.message-table th{font-weight:600;color:var(--ink-1);background:#f8fafc}
.message-body>table.message-table tbody tr:nth-child(even){background:#fafbfc}
.message-body>table.message-table tbody tr:hover{background:#f1f5f9}
.message-body>img.message-inline-image{max-width:100%;height:auto;border-radius:6px;margin:4px 0}
.message-body strong{color:var(--ink-1);font-weight:600}
.message-body em{color:var(--ink-1);font-style:italic}
.message-body a{color:var(--brand);text-decoration:none;border-bottom:1px solid transparent}
.message-body a:hover{border-bottom-color:var(--brand)}

/* === PC execution hub: todo, personal schedule and organization process === */

.execution-sidebar-panel{padding:10px}
.execution-side-nav{display:flex;flex-direction:column;gap:4px}
.execution-side-nav button{min-height:42px;display:flex;align-items:center;justify-content:space-between;padding:0 11px;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--muted);font-size:12px;text-align:left}
.execution-side-nav button:hover{background:var(--paper-soft);color:var(--ink)}
.execution-side-nav button.active{background:var(--accent-soft);color:var(--accent);font-weight:680}
.execution-side-nav b{min-width:25px;padding:2px 7px;border-radius:12px;background:#eef1f5;color:var(--muted);font-size:10px;text-align:center}
.execution-side-nav button.active b{background:#dce8ff;color:var(--accent)}

.execution-cockpit{min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--canvas)}
.execution-head{min-height:68px;display:flex;align-items:center;gap:14px;padding:9px 24px;border-bottom:1px solid var(--line);background:var(--paper)}
.execution-heading{min-width:0;flex:1}
.execution-heading h1{margin:0;font-size:20px;font-weight:750;letter-spacing:-.025em}
.execution-heading>span{display:block;margin-top:5px;color:var(--muted);font-size:12px}
.execution-head-actions{display:flex;gap:8px}
.execution-head-actions button{min-height:36px;padding:0 13px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink-2);font-size:11px;font-weight:660}
.execution-head-actions button:first-child{border-color:var(--accent);background:var(--accent);color:#fff}
.execution-head-actions button:hover{border-color:var(--accent);color:var(--accent)}
.execution-head-actions button:first-child:hover{background:var(--accent-hover);color:#fff}
.execution-head-actions button:disabled{opacity:.55}
.execution-section-tabs{display:none;min-height:44px;align-items:flex-end;gap:24px;padding:0 14px;border-bottom:1px solid var(--line);background:var(--paper)}
.execution-section-tabs button{height:44px;padding:0;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted);font-size:12px;font-weight:670}
.execution-section-tabs button:hover{color:var(--ink)}
.execution-section-tabs button.active{border-bottom-color:var(--accent);color:var(--ink)}
.execution-status{margin:10px 24px 0;padding:9px 11px;border-radius:var(--radius-sm);background:#fff8e8;color:#795914;font-size:11px;line-height:1.5}
.execution-status.is-error{background:#fff0f2;color:var(--danger)}
.execution-status.is-ok{background:#edf8f4;color:var(--success)}
.execution-view{min-height:0;flex:1;overflow:auto;padding:18px 24px 28px}
.execution-kicker{color:var(--accent);font-size:11px;font-weight:720}

.execution-focus{display:block;overflow:hidden;border:1px solid var(--line);border-radius:var(--radius);background:var(--paper)}
.execution-focus-copy[hidden]{display:none}
.execution-focus-copy{min-height:144px;padding:19px 22px}
.execution-focus-label{display:flex;align-items:center;gap:9px}
.execution-why{padding:3px 7px;border-radius:12px;background:var(--accent-soft);color:var(--accent);font-size:10px}
.execution-focus-copy h2{max-width:700px;margin:10px 0 0;font-size:18px;font-weight:730;letter-spacing:-.015em;line-height:1.35}
.execution-focus-copy p{max-width:700px;margin:6px 0 0;color:var(--muted);font-size:11px;line-height:1.55}
.execution-focus-actions{display:flex;gap:7px;margin-top:13px}
.execution-focus-actions button{min-height:32px;padding:0 10px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink-2);font-size:10px;font-weight:660}
.execution-focus-actions .execution-primary{border-color:var(--accent);background:var(--accent);color:#fff}
.execution-focus-actions button:hover{border-color:var(--accent);color:var(--accent)}
.execution-focus-actions .execution-primary:hover{background:var(--accent-hover);color:#fff}
.execution-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:var(--paper);color:var(--ink)}
.execution-metrics>div{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:10px;min-height:58px;padding:10px 16px;border-right:1px solid var(--line)}
.execution-metrics>div:last-child{border-right:0}
.execution-metrics span{color:var(--muted);font-size:10px}
.execution-metrics b{font-size:21px;font-weight:730;line-height:1}
.execution-two-column{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,330px);gap:14px;margin-top:14px}
.execution-panel{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:var(--radius);background:var(--paper)}
.execution-panel>header{min-height:54px;display:flex;align-items:center;justify-content:space-between;padding:11px 15px;border-bottom:1px solid var(--line)}
.execution-panel>header h2{margin:0;font-size:14px;font-weight:710}
.execution-panel>header>b{min-width:28px;padding:4px 7px;border-radius:14px;background:var(--accent-soft);color:var(--accent);font-size:10px;text-align:center}
.execution-card-list,.execution-signal-list,.execution-schedule-list{display:flex;flex-direction:column;max-height:500px;overflow:auto}
.execution-card{padding:14px 15px;border-bottom:1px solid var(--line)}
.execution-card:last-child{border-bottom:0}
.execution-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.execution-card-top span{color:var(--accent);font-size:10px;font-weight:680}
.execution-card-top small{color:var(--muted);font-size:10px}
.execution-card h3{margin:7px 0 0;font-size:13px;font-weight:700;line-height:1.45}
.execution-card p{margin:5px 0 0;color:var(--muted);font-size:11px;line-height:1.55}
.execution-card.is-blocked{background:#fffaf0}
.execution-card-actions{display:flex;gap:7px;margin-top:10px}
.execution-card-actions button{min-height:30px;padding:0 9px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink-2);font-size:10px}
.execution-card-actions button:first-child{border-color:#bfd0ef;background:var(--accent-soft);color:var(--accent)}
.execution-card-actions button:hover{border-color:var(--accent);color:var(--accent)}
.execution-empty{padding:34px 18px;color:var(--muted);font-size:11px;line-height:1.6;text-align:center}
.execution-loading{padding:24px 15px;display:grid;gap:8px}
.execution-loading i{height:44px;border-radius:5px;background:#edf0f3;animation:loadingPulse 1.2s ease-in-out infinite}

.execution-signal-panel{background:var(--paper)}
.execution-signal{display:grid;grid-template-columns:7px minmax(0,1fr);gap:9px;padding:13px 15px;border-bottom:1px solid var(--line)}
.execution-signal:last-child{border-bottom:0}
.execution-signal>i{width:7px;height:7px;margin-top:4px;border-radius:50%;background:var(--accent)}
.execution-signal.is-high>i{background:var(--danger)}
.execution-signal.is-medium>i{background:#b7791f}
.execution-signal strong{display:block;color:var(--ink);font-size:11px;line-height:1.45}
.execution-signal small{display:block;margin-top:4px;color:var(--muted);font-size:10px;line-height:1.5}

.execution-schedule-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.execution-schedule-row{display:grid;grid-template-columns:76px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:72px;padding:11px 14px;border-bottom:1px solid var(--line)}
.execution-schedule-row:last-child{border-bottom:0}
.execution-schedule-row.is-done{background:#f4faf7}
.execution-schedule-time{display:flex;flex-direction:column}
.execution-schedule-time strong{font-size:12px;font-weight:710}
.execution-schedule-time small{margin-top:3px;color:var(--muted);font-size:10px}
.execution-schedule-copy{min-width:0}
.execution-schedule-copy h3{margin:0;overflow:hidden;font-size:12px;font-weight:690;text-overflow:ellipsis;white-space:nowrap}
.execution-schedule-copy p{margin:4px 0 0;color:var(--muted);font-size:10px;line-height:1.4}
.execution-occurrence{min-height:30px;padding:0 9px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink-2);font-size:10px;white-space:nowrap}
.execution-occurrence:hover{border-color:var(--accent);color:var(--accent)}
.execution-occurrence:disabled{opacity:.55}

.execution-progress-stats{display:flex;justify-content:flex-end;gap:18px;margin:0 2px 12px;color:var(--muted);font-size:11px}
.execution-progress-stats span{display:flex;align-items:baseline;gap:4px}
.execution-progress-stats b{color:var(--ink);font-size:16px}
.execution-project-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.execution-project{min-width:0;padding:17px;border:1px solid var(--line);border-radius:var(--radius);background:var(--paper)}
.execution-project-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.execution-project-code{color:var(--accent);font-size:10px;font-weight:720}
.execution-health{padding:3px 7px;border-radius:12px;background:#edf8f4;color:var(--success);font-size:10px}
.execution-project.is-attention .execution-health{background:#fff6e5;color:#8a611d}
.execution-project.is-risk .execution-health{background:#fff0f2;color:var(--danger)}
.execution-project h3{margin:10px 0 0;font-size:14px;font-weight:710;line-height:1.4}
.execution-project-customer{display:block;margin-top:4px;color:var(--muted);font-size:10px}
.execution-project>p{min-height:42px;margin:9px 0 0;color:var(--muted);font-size:11px;line-height:1.5}
.execution-project-step{margin-top:13px;padding:10px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.execution-project-step>div{display:flex;justify-content:space-between;gap:8px;color:var(--ink-2);font-size:10px}
.execution-project-step i{display:block;height:4px;margin-top:8px;overflow:hidden;border-radius:4px;background:#edf0f3}
.execution-project-step i b{display:block;height:100%;border-radius:inherit;background:var(--accent)}
.execution-project-meta{display:flex;justify-content:space-between;gap:8px;margin-top:9px;color:var(--muted);font-size:10px}
.execution-milestones{margin-top:11px}
.execution-milestones>span{display:block;margin-bottom:6px;color:var(--muted);font-size:10px;font-weight:650}
.execution-milestone{display:grid;grid-template-columns:7px minmax(0,1fr);gap:7px;margin-top:5px;color:var(--ink-2);font-size:10px;line-height:1.4}
.execution-milestone i{width:7px;height:7px;margin-top:3px;border:1px solid var(--line-strong);border-radius:50%}
.execution-milestone.is-completed{color:var(--muted);text-decoration:line-through}
.execution-milestone.is-completed i{border-color:var(--success);background:var(--success)}
.execution-milestone.is-blocked i{border-color:var(--danger);background:var(--danger)}

.execution-modal{position:fixed;inset:0;z-index:180;display:grid;place-items:center;padding:20px}
.execution-modal-scrim{position:absolute;inset:0;border:0;background:rgba(17,31,52,.46);cursor:default}
.execution-schedule-form{position:relative;z-index:1;width:min(540px,100%);padding:21px;border:0;border-radius:12px;background:var(--paper);box-shadow:0 18px 30px rgba(17,31,52,.2)}
.execution-schedule-form>header{display:flex;align-items:flex-start;justify-content:space-between}
.execution-schedule-form>header h2{margin:3px 0 0;font-size:18px}
.execution-schedule-form>header>button{width:34px;height:34px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper);color:var(--muted)}
.execution-form-note{margin:10px 0 15px;padding:8px 10px;border-radius:var(--radius-sm);background:var(--accent-soft);color:var(--ink-2);font-size:10px;line-height:1.5}
.execution-schedule-form label{display:flex;flex-direction:column;gap:6px;margin-top:11px;color:var(--ink-2);font-size:10px;font-weight:650}
.execution-schedule-form input,.execution-schedule-form select,.execution-schedule-form textarea{width:100%;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink);font-size:12px}
.execution-schedule-form input,.execution-schedule-form select{height:40px;padding:0 10px}
.execution-schedule-form textarea{padding:9px 10px;resize:vertical;line-height:1.5}
.execution-schedule-form :is(input,select,textarea):focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(36,95,214,.1)}
.execution-form-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:9px}
.execution-schedule-form footer{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;padding-top:15px;border-top:1px solid var(--line)}
.execution-schedule-form footer button{min-height:36px;padding:0 13px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink-2);font-size:11px}
.execution-schedule-form footer .execution-primary{border-color:var(--accent);background:var(--accent);color:#fff}
.execution-schedule-form footer>span{flex:1}
.execution-schedule-form footer .execution-danger{border-color:#f0c7cd;color:var(--danger)}
.execution-schedule-form footer .execution-danger.is-confirming{background:#fff0f2;border-color:var(--danger)}
.execution-schedule-form>header svg,.execution-dialog>header svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}

/* P1 execution closure: direct actions, milestone maintenance and audit. */
.execution-head-actions button,.execution-focus-actions button,.execution-card-actions button,.execution-occurrence,.execution-schedule-form footer button{min-height:44px;padding-inline:14px;font-size:13px}
.execution-focus-copy p,.execution-card p,.execution-schedule-copy p,.execution-empty{font-size:13px}
.execution-card-top span,.execution-card-top small,.execution-schedule-time small,.execution-project-customer,.execution-project-meta{font-size:12px}
.execution-card h3,.execution-schedule-copy h3{font-size:14px}
.execution-schedule-time strong{font-size:13px}
.execution-card-actions{flex-wrap:wrap;align-items:center}
.execution-card-actions .execution-manage{border-color:var(--accent);background:var(--accent-soft);color:var(--accent);font-weight:680}
.execution-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px}
.execution-row-actions button{min-width:44px}
.execution-row-actions .execution-edit{border-color:transparent;background:transparent;color:var(--accent)}
.execution-project-action{width:100%;min-height:44px;margin-top:14px;border:1px solid #bfd0ef;border-radius:var(--radius-sm);background:var(--accent-soft);color:var(--accent);font-size:13px;font-weight:680}
.execution-project-action:hover{border-color:var(--accent)}

.execution-dialog{position:relative;z-index:1;display:flex;flex-direction:column;width:min(720px,100%);max-height:min(840px,calc(100vh - 40px));overflow:hidden;border:1px solid rgba(255,255,255,.35);border-radius:14px;background:var(--paper);box-shadow:0 24px 64px rgba(17,31,52,.24)}
.execution-dialog>header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:22px 24px 18px;border-bottom:1px solid var(--line)}
.execution-dialog>header h2{margin:5px 0 0;font-size:21px;letter-spacing:-.02em}
.execution-dialog>header p{margin:6px 0 0;color:var(--muted);font-size:13px;line-height:1.5}
.execution-dialog>header>button{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper);color:var(--muted)}
.execution-dialog-scroll{min-height:0;overflow:auto;padding:0 24px 24px}
.execution-action-section{padding:20px 0;border-bottom:1px solid var(--line)}
.execution-action-section:last-child{border-bottom:0}
.execution-action-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.execution-action-heading h3,.execution-project-section-head h3{margin:0;font-size:15px}
.execution-action-heading p,.execution-project-section-head p{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.execution-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.execution-action-section label,.execution-milestone-form label{display:flex;flex-direction:column;gap:7px;color:var(--ink-2);font-size:12px;font-weight:650}
.execution-action-section input,.execution-action-section select,.execution-action-section textarea,.execution-milestone-form input,.execution-milestone-form select,.execution-milestone-form textarea{width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink);font-size:13px;line-height:1.5}
.execution-action-section textarea,.execution-milestone-form textarea{resize:vertical}
.execution-action-section>button,.execution-review-actions button,.execution-confirmation button,.execution-project-section-head>button,.execution-milestone-form footer button{min-height:44px;margin-top:12px;padding:0 15px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink-2);font-size:13px;font-weight:650}
.execution-primary{border-color:var(--accent)!important;background:var(--accent)!important;color:#fff!important}
.execution-review-actions>div,.execution-confirmation>div{display:flex;justify-content:flex-end;gap:8px}
.execution-confirmation{margin-top:14px;padding:14px;border:1px solid #bfd0ef;border-radius:var(--radius-sm);background:var(--accent-soft)}
.execution-confirmation p{margin:0;color:var(--ink-2);font-size:13px;line-height:1.6}

.execution-project-dialog{width:min(1040px,100%)}
.execution-project-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.8fr);min-height:0;overflow:hidden}
.execution-project-milestone-panel,.execution-project-audit-panel{min-width:0;min-height:0;overflow:auto;padding:22px 24px}
.execution-project-audit-panel{border-left:1px solid var(--line);background:var(--paper-soft)}
.execution-project-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:15px}
.execution-project-section-head>button{margin-top:0;border-color:#bfd0ef;background:var(--accent-soft);color:var(--accent)}
.execution-milestone-row{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:12px;align-items:start;padding:15px 0;border-bottom:1px solid var(--line)}
.execution-milestone-row>i{width:9px;height:9px;margin-top:6px;border:2px solid var(--line-strong);border-radius:50%}
.execution-milestone-row.is-completed>i{border-color:var(--success);background:var(--success)}
.execution-milestone-row.is-blocked>i{border-color:var(--danger);background:var(--danger)}
.execution-milestone-row h4{margin:0;font-size:14px;line-height:1.45}
.execution-milestone-row p{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.55}
.execution-milestone-row button{min-width:44px;min-height:44px;padding:0 12px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper);color:var(--accent);font-size:12px}
.execution-milestone-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px;padding:18px;border:1px solid #bfd0ef;border-radius:var(--radius);background:#f8faff}
.execution-milestone-form .span-2{grid-column:1/-1}
.execution-milestone-form footer{display:flex;justify-content:flex-end;gap:8px;padding-top:4px}
.execution-audit-list{position:relative;padding-left:19px}
.execution-audit-list::before{content:"";position:absolute;top:5px;bottom:5px;left:4px;width:1px;background:var(--line-strong)}
.execution-audit-row{position:relative;padding:0 0 19px 10px}
.execution-audit-row::before{content:"";position:absolute;top:5px;left:-19px;width:9px;height:9px;border:2px solid var(--paper-soft);border-radius:50%;background:var(--accent);box-shadow:0 0 0 1px #a9bde4}
.execution-audit-row strong{display:block;font-size:13px;line-height:1.45}
.execution-audit-row p{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.execution-audit-row time{display:block;margin-top:5px;color:var(--muted);font-size:11px}
.execution-modal :is(button,input,select,textarea):focus-visible,.execution-view button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

@media (max-width:1180px){
  .execution-two-column{grid-template-columns:minmax(0,1fr) minmax(270px,300px)}
  .execution-project-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:940px){
  .execution-sidebar-open{display:grid}
  .execution-head{min-height:68px;padding:9px 12px}
  .execution-heading h1{font-size:18px}
  .execution-heading>span{font-size:10px}
  .execution-head-actions button{min-height:34px;padding-inline:9px}
  .execution-section-tabs{display:flex}
  .execution-status{margin:8px 12px 0}
  .execution-view{padding:12px 12px 22px}
  .execution-metrics>div{min-height:58px;padding:10px 11px}
  .execution-metrics>div:last-child{border-right:0}
  .execution-metrics b{font-size:19px}
  .execution-two-column,.execution-schedule-grid{grid-template-columns:1fr}
  .execution-card-list,.execution-signal-list,.execution-schedule-list{max-height:none}
  .execution-progress-stats{justify-content:flex-start;overflow-x:auto}
  .execution-project-list{grid-template-columns:1fr}
  .execution-project>p{min-height:0}
  .execution-form-grid{grid-template-columns:1fr 1fr}
  .execution-form-grid label:last-child{grid-column:1/-1}
  .execution-project-layout{grid-template-columns:1fr;overflow:auto}
  .execution-project-milestone-panel,.execution-project-audit-panel{overflow:visible}
  .execution-project-audit-panel{border-top:1px solid var(--line);border-left:0}
}

@media (max-width:430px){
  .workspace-mode-switch button{display:flex;justify-content:center;padding-inline:4px}
  .workspace-mode-switch button svg{display:none}
  .execution-heading>span{display:none}
  .execution-head-actions .execution-refresh{display:none}
  .execution-section-tabs{justify-content:space-between;gap:8px}
  .execution-metrics>div{min-height:54px;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;padding:8px}
  .execution-metrics span{font-size:9px}
  .execution-metrics b{font-size:18px}
  .execution-schedule-row{grid-template-columns:66px minmax(0,1fr)}
  .execution-row-actions{grid-column:1/-1;justify-self:stretch}
  .execution-row-actions button{flex:1}
  .execution-progress-stats{gap:12px}
  .execution-form-grid{grid-template-columns:1fr}
  .execution-form-grid label:last-child{grid-column:auto}
  .execution-schedule-form{padding:18px}
  .execution-action-grid,.execution-milestone-form{grid-template-columns:1fr}
  .execution-milestone-form .span-2{grid-column:auto}
  .execution-dialog>header,.execution-dialog-scroll,.execution-project-milestone-panel,.execution-project-audit-panel{padding-inline:16px}
  .execution-modal{padding:8px}
  .execution-dialog{max-height:calc(100vh - 16px);border-radius:12px}
}

/* agent-memory · integrated personal memory workspace */
.memory-sidebar-panel{padding:12px 10px 14px}
.memory-side-search{height:44px;display:flex;align-items:center;gap:9px;padding:0 11px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper)}
.memory-side-search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(36,95,214,.1)}
.memory-side-search svg{width:16px;height:16px;flex:0 0 16px;fill:none;stroke:var(--muted);stroke-width:1.8;stroke-linecap:round}
.memory-side-search input{min-width:0;flex:1;border:0;background:transparent;color:var(--ink);font-size:12px}
.memory-side-nav{display:flex;flex-direction:column;gap:3px;margin-top:12px}
.memory-side-nav button{min-height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 11px;border:1px solid transparent;border-radius:var(--radius-sm);background:transparent;color:var(--ink-2);font-size:12px;text-align:left}
.memory-side-nav button:hover{background:var(--paper-soft)}
.memory-side-nav button.active{border-color:#cfdbf4;background:var(--accent-soft);color:var(--accent);font-weight:680}
.memory-side-nav b{min-width:26px;padding:3px 7px;border-radius:12px;background:var(--paper);color:var(--muted);font-size:10px;text-align:center}
.memory-side-nav button.active b{color:var(--accent)}
.memory-side-note{display:flex;align-items:flex-start;gap:9px;margin-top:auto;padding:13px 11px;border-top:1px solid var(--line);color:var(--ink-2)}
.memory-private-dot{width:8px;height:8px;flex:0 0 8px;margin-top:4px;border-radius:50%;background:var(--success);box-shadow:0 0 0 3px rgba(18,128,92,.1)}
.memory-side-note div{display:flex;flex-direction:column;gap:3px}
.memory-side-note b{font-size:11px}
.memory-side-note small{color:var(--muted);font-size:10px;line-height:1.45}

.memory-cockpit{min-width:0;min-height:0;height:100%;display:flex;flex-direction:column;overflow:hidden;background:var(--canvas)}
.memory-head{min-height:68px;display:flex;align-items:center;gap:14px;padding:9px 22px;border-bottom:1px solid var(--line);background:var(--paper)}
.memory-heading{min-width:0;flex:1}
.memory-head h1{margin:0;font-size:20px;font-weight:750;letter-spacing:-.025em}
.memory-head p{margin:3px 0 0;color:var(--muted);font-size:11px}
.memory-head-state{flex:0 0 auto;display:flex;align-items:center;gap:7px;color:var(--ink-2);font-size:11px;font-weight:650}
.memory-head-state i{width:7px;height:7px;border-radius:50%;background:var(--success)}
.memory-head-state.is-offline{color:var(--danger)}
.memory-head-state.is-offline i{background:var(--danger)}
.memory-head>.memory-head-action{min-height:44px;display:flex;align-items:center;gap:7px;padding:0 13px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink-2);font-size:12px;font-weight:650}
.memory-head>.memory-head-action:hover{border-color:var(--accent);color:var(--accent)}
.memory-head>.memory-head-action:disabled{cursor:wait;opacity:.58}
.memory-head>.memory-head-action svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.memory-sidebar-open{display:none}

.memory-summary{display:grid;grid-template-columns:160px 160px 160px minmax(260px,1fr);min-height:72px;border-bottom:1px solid var(--line);background:var(--paper)}
.memory-summary[hidden]{display:none}
.memory-summary>div{display:flex;align-items:center;gap:10px;padding:13px 20px;border-right:1px solid var(--line)}
.memory-summary>div>span{color:var(--muted);font-size:11px}
.memory-summary>div>b{margin-left:auto;font-size:22px;font-weight:740}
.memory-status{margin:12px 20px 0;padding:10px 12px;border:1px solid #f0c7cd;border-radius:var(--radius-sm);background:#fff6f7;color:var(--danger);font-size:12px}

.memory-layout{min-height:0;display:grid;grid-template-columns:minmax(340px,.9fr) minmax(440px,1.25fr);gap:14px;flex:1;padding:16px 20px 20px;overflow:hidden}
.memory-list-panel,.memory-detail{min-width:0;min-height:0;overflow:hidden;border:1px solid var(--line);border-radius:var(--radius);background:var(--paper)}
.memory-list-panel{display:flex;flex-direction:column}
.memory-list-panel>header{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 15px;border-bottom:1px solid var(--line)}
.memory-list-panel>header>div{display:flex;align-items:baseline;gap:8px}
.memory-list-panel h2{margin:0;font-size:15px}
.memory-list-panel>header span{color:var(--muted);font-size:11px}
.memory-list-panel select{height:40px;padding:0 30px 0 10px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink-2);font-size:12px}
.memory-list{min-height:0;flex:1;overflow:auto}
.memory-row{width:100%;min-height:94px;display:grid;grid-template-columns:8px minmax(0,1fr) auto;gap:11px;align-items:start;padding:15px;border:0;border-bottom:1px solid var(--line);background:var(--paper);color:var(--ink);text-align:left}
.memory-row:last-child{border-bottom:0}
.memory-row:hover{background:var(--paper-soft)}
.memory-row.active{background:#f7f9ff;box-shadow:inset 0 0 0 1px #a9bfe9}
.memory-row>i{width:8px;height:8px;margin-top:5px;border:1.5px solid var(--line-strong);border-radius:50%;background:var(--paper)}
.memory-row.is-confirmed>i{border-color:var(--success);background:var(--success)}
.memory-row.is-candidate>i{border-color:#b7791f;background:#fff6e5}
.memory-row-copy{min-width:0}
.memory-row-copy>span{display:flex;align-items:center;gap:7px;color:var(--accent);font-size:10px;font-weight:700}
.memory-row-copy h3{margin:6px 0 0;display:-webkit-box;overflow:hidden;font-size:13px;font-weight:680;line-height:1.5;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.memory-row-copy p{margin:6px 0 0;overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.memory-row>time{color:var(--muted-2);font-size:10px;white-space:nowrap}
.memory-list-empty{display:grid;place-items:center;min-height:260px;padding:32px;color:var(--muted);font-size:12px;line-height:1.6;text-align:center}
.memory-list-loading{display:grid;gap:9px;padding:16px}
.memory-list-loading i{height:74px;border-radius:var(--radius-sm);background:#edf0f3;animation:loadingPulse 1.2s ease-in-out infinite}

.memory-detail{display:flex;flex-direction:column}
.memory-detail-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;color:var(--muted);text-align:center}
.memory-detail-empty>span{display:none}
.memory-detail-empty h2{margin:0;color:var(--ink);font-size:16px}
.memory-detail-empty p{margin:7px 0 0;font-size:12px}
.memory-detail form{min-height:0;height:100%;display:flex;flex-direction:column}
.memory-detail form>header{min-height:64px;display:flex;align-items:center;gap:12px;padding:10px 16px;border-bottom:1px solid var(--line)}
.memory-detail form>header>div{min-width:0;display:flex;align-items:center;gap:8px;flex:1}
.memory-detail form>header>div>span{color:var(--accent);font-size:11px;font-weight:700}
.memory-detail form>header>div>b{padding:4px 8px;border-radius:12px;background:#edf8f4;color:var(--success);font-size:10px}
.memory-detail form>header>div>b.is-candidate{background:#fff6e5;color:#8a611d}
.memory-back,.memory-pin{width:44px;height:44px;display:grid;place-items:center;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper);color:var(--muted)}
.memory-back{display:none}
.memory-pin svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.memory-pin.active{border-color:#bfd0ef;background:var(--accent-soft);color:var(--accent)}
.memory-detail-body{min-height:0;flex:1;overflow:auto;padding:18px 20px}
.memory-detail-body>label{display:flex;flex-direction:column;gap:7px;margin-bottom:14px;color:var(--ink-2);font-size:11px;font-weight:650}
.memory-detail-body :is(input,select,textarea){width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink);font-size:13px;line-height:1.55}
.memory-detail-body textarea{resize:vertical}
.memory-detail-body :is(input,select,textarea):focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(36,95,214,.1)}
.memory-field-note{color:var(--muted);font-size:11px;font-weight:400;line-height:1.5}
.memory-validity-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:16px}
.memory-validity-grid label{display:flex;min-width:0;flex-direction:column;gap:7px;color:var(--ink-2);font-size:11px;font-weight:650}
.memory-conflict-section{margin:4px 0 18px;padding:14px;border:1px solid rgba(240,68,56,.28);border-radius:var(--radius);background:rgba(240,68,56,.055)}
.memory-conflict-section>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}
.memory-conflict-section h3{margin:0;color:var(--danger);font-size:13px}
.memory-conflict-section>div:first-child span{color:var(--danger);font-size:11px;font-weight:700}
.memory-conflict-section>p{margin:7px 0 12px;color:var(--ink-2);font-size:12px;line-height:1.55}
.memory-conflict-row{padding-top:12px;border-top:1px solid rgba(240,68,56,.18)}
.memory-conflict-row>div:first-child{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.memory-conflict-row>div:first-child>div{padding:10px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper)}
.memory-conflict-row span{color:var(--muted);font-size:10px;font-weight:650}
.memory-conflict-row p{margin:5px 0 0;color:var(--ink);font-size:12px;line-height:1.55}
.memory-conflict-row>div:last-child{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
.memory-conflict-row button{min-height:40px;padding:0 12px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink-2);font-size:12px;font-weight:650}
.memory-conflict-row button:last-child{border-color:var(--accent);color:var(--accent)}
.memory-evidence-section,.memory-history-section{margin-top:20px;padding-top:17px;border-top:1px solid var(--line)}
.memory-evidence-section>div:first-child,.memory-history-section>div:first-child{display:flex;align-items:center;justify-content:space-between}
.memory-evidence-section h3,.memory-history-section h3{margin:0;font-size:13px}
.memory-evidence-section>div:first-child span,.memory-history-section>div:first-child span{color:var(--muted);font-size:10px}
.memory-evidence-row{margin-top:11px;padding:11px 12px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper-soft)}
.memory-evidence-row p{margin:0;color:var(--ink-2);font-size:12px;line-height:1.6}
.memory-evidence-row small{display:block;margin-top:6px;color:var(--muted);font-size:10px}
.memory-revision-row{display:grid;grid-template-columns:8px minmax(0,1fr) auto;gap:9px;margin-top:12px;color:var(--ink-2);font-size:11px}
.memory-revision-row>i{width:7px;height:7px;margin-top:4px;border-radius:50%;background:var(--accent)}
.memory-revision-row time{color:var(--muted);font-size:10px}
.memory-detail form>footer{display:flex;align-items:center;gap:8px;padding:12px 16px;border-top:1px solid var(--line);background:var(--paper)}
.memory-detail form>footer>span{flex:1}
.memory-detail form>footer button,.memory-share-confirm button{min-height:44px;padding:0 14px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink-2);font-size:12px;font-weight:650}
.memory-detail form>footer .memory-primary,#memory-confirm,#memory-share-confirm-button{border-color:var(--accent);background:var(--accent);color:#fff}
.memory-detail form>footer .memory-danger{border-color:#f0c7cd;color:var(--danger)}
.memory-detail form>footer .memory-danger.is-confirming{background:#fff0f2;border-color:var(--danger)}
.memory-share-confirm{display:flex;align-items:center;gap:10px;padding:12px 16px;border-top:1px solid #bfd0ef;background:var(--accent-soft)}
.memory-share-confirm>div{min-width:0;flex:1}
.memory-share-confirm span{color:var(--accent);font-size:11px;font-weight:700}
.memory-share-confirm p{margin:4px 0 0;overflow:hidden;color:var(--ink-2);font-size:11px;text-overflow:ellipsis;white-space:nowrap}

@media (max-width:1100px){
  .memory-summary{grid-template-columns:130px 130px 130px minmax(220px,1fr)}
  .memory-layout{grid-template-columns:minmax(300px,.85fr) minmax(390px,1.15fr)}
}

@media (max-width:940px){
  .memory-sidebar-open{display:grid}
  .memory-head{min-height:68px;padding:9px 12px}
  .memory-head h1{font-size:18px}
  .memory-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
  .memory-summary>div{padding:11px 14px}
  .memory-layout{padding:12px}
}

@media (max-width:760px){
  .memory-head p,.memory-head>.memory-head-action span{display:none}
  .memory-head>.memory-head-action{width:44px;padding:0;justify-content:center}
  .memory-summary{min-height:62px}
  .memory-summary>div{flex-direction:column;align-items:flex-start;gap:4px;padding:9px 12px}
  .memory-summary>div>b{margin-left:0;font-size:18px}
  .memory-layout{display:block;overflow:auto}
  .memory-layout.has-detail .memory-list-panel{display:none}
  .memory-layout:not(.has-detail) .memory-detail{display:none}
  .memory-list-panel,.memory-detail{min-height:calc(100vh - 170px)}
  .memory-back{display:grid}
  .memory-detail form>footer{flex-wrap:wrap}
  .memory-detail form>footer>span{display:none}
  .memory-detail form>footer button{flex:1}
  .memory-share-confirm{flex-wrap:wrap}
  .memory-share-confirm>div{flex-basis:100%}
}

@media (max-width:430px){
  .memory-summary>div{padding-inline:9px}
  .memory-layout{padding:8px}
  .memory-list-panel>header{padding-inline:12px}
  .memory-list-panel select{max-width:130px}
  .memory-row{padding:13px 12px}
  .memory-row>time{display:none}
  .memory-detail-body{padding:16px}
  .memory-validity-grid,.memory-conflict-row>div:first-child{grid-template-columns:1fr}
  .memory-conflict-row>div:last-child{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .memory-detail form>header,.memory-detail form>footer,.memory-share-confirm{padding-inline:12px}
}

/* Customer operating cockpit · integrated execution workspace */
.customer-cockpit{overflow:hidden;background:var(--paper)}
.customer-metrics{
  min-height:58px;
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.customer-metrics .customer-metric-secondary{display:none}
.customer-metrics>button{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-content:center;
  padding:8px 16px;
  border:0;
  border-right:1px solid var(--line);
  background:var(--paper);
  color:var(--ink);
  text-align:left;
}
.customer-metrics>button:last-child{border-right:0}
.customer-metrics>button:hover{background:var(--paper-soft)}
.customer-metrics>button:active{background:var(--accent-soft)}
.customer-metrics>button span{overflow:hidden;color:var(--muted);font-size:11px;font-weight:680;text-overflow:ellipsis;white-space:nowrap}
.customer-metrics>button b{grid-row:1/3;grid-column:2;font-size:21px;font-weight:750;letter-spacing:-.04em}
.customer-metrics>button small{margin-top:4px;overflow:hidden;color:var(--muted-2);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.customer-workspace{grid-template-columns:minmax(0,57%) minmax(420px,43%)}
.customer-browser-head{min-height:58px;padding:10px 18px}
.customer-browser-head p,.customer-form-head p,.customer-action-focus p,.customer-activity>header p{font-size:11px;letter-spacing:.02em}
.customer-browser-head h2{margin:0;font-size:16px}
.customer-browser-head>span{font-size:12px}
.customer-toolbar{display:grid;grid-template-columns:minmax(160px,1fr) 122px 122px auto;gap:8px;padding:0 14px 12px}
.customer-toolbar :is(input,select,button){font-size:12px}
.customer-search-control{width:100%!important;height:44px!important;flex:none!important;background:#fff!important}
.customer-filter-control{
  width:auto!important;
  height:44px!important;
  width:100%!important;
  flex:none!important;
  gap:4px!important;
  padding:0 8px!important;
  background:#fff!important;
}
.customer-filter-control>span{color:var(--muted-2);font-size:10px;white-space:nowrap}
.customer-filter-control select{min-width:0;flex:1;border:0;background:#fff;color:var(--ink-2)}
.customer-toolbar>button,.customer-toolbar-actions button{min-height:44px;padding:0 12px!important;font-size:12px!important}
.customer-toolbar-actions{display:flex;gap:6px;margin-left:0}
.customer-toolbar>#customer-clear-stage{grid-column:1/-1;justify-self:start}
.customer-pipeline{grid-auto-columns:minmax(240px,1fr)}
.customer-stage>header{min-height:60px;padding:11px 14px;border-top-width:2px}
.customer-stage-channel>header{border-top-color:#6f57b5}
.customer-stage>header span{font-size:10px}
.customer-stage>header h3{font-size:13px}
.customer-stage>header b{min-width:28px;height:28px;font-size:12px}
.customer-row{gap:8px;min-height:134px;padding:14px}
.customer-row:hover{background:#f7f9fc}
.customer-row.active{box-shadow:inset 0 0 0 1px #a9bfe9;background:var(--accent-soft)}
.customer-row.execution-synced .customer-row-top:after{content:"";width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:var(--success)}
.customer-row-top strong{font-size:13px}
.customer-row-top small,.customer-row-meta,.customer-row-blocker{font-size:11px}
.customer-row-action{font-size:12px;line-height:1.5}
.customer-row-action i{padding:2px 5px;font-size:10px}
.customer-stage-empty,.customer-pipeline-empty{font-size:12px}
.customer-detail-empty p{font-size:11px}
.customer-detail-empty h2{font-size:18px}
.customer-detail-empty small{font-size:12px}
.customer-detail-empty button{min-height:44px;font-size:12px}
.customer-form-head{min-height:72px;padding:10px 14px}
.customer-form-head h2{font-size:16px}
.customer-form-head>div>span{font-size:11px}
.customer-form-head .collaboration-primary,.customer-head-action{min-height:44px}
.customer-head-action{padding:0 11px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:#fff;color:var(--muted);font-size:12px;font-weight:650}
.customer-head-action:hover{border-color:#e1a9b1;color:var(--danger)}
.customer-back{min-height:44px;font-size:12px}
.customer-form-scroll{padding:16px 18px 32px}
.customer-action-focus{padding:14px;border:1px solid #cbd9f3;border-left:1px solid #cbd9f3;border-radius:var(--radius);background:#f5f8ff}
.customer-action-focus>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.customer-action-focus>header h3{margin:4px 0 0;font-size:14px}
.customer-execution-state{flex:0 0 auto;padding:5px 8px;border-radius:12px;background:#edf0f4;color:var(--muted);font-size:10px;font-weight:700}
.customer-execution-state[data-tone="synced"],.customer-execution-state[data-tone="done"]{background:#e9f6f1;color:var(--success)}
.customer-execution-state[data-tone="partial"]{background:#fff5dd;color:#8a611d}
.customer-execution-state[data-tone="error"]{background:#fff0f2;color:var(--danger)}
.customer-action-focus textarea{min-height:74px;margin-top:11px;padding:11px 12px;font-size:13px}
.customer-action-focus>div{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.customer-action-focus label span,.customer-grid label>span{font-size:11px}
.customer-action-focus :is(select,input),.customer-grid :is(input,select){height:44px;padding:0 11px;font-size:13px}
.customer-grid textarea{min-height:78px;padding:11px;font-size:13px}
.customer-action-focus>footer{display:flex;align-items:center;gap:8px;margin-top:12px}
.customer-action-focus>footer>span{min-width:0;flex:1;color:var(--muted);font-size:11px;line-height:1.45}
.customer-action-focus>footer button{min-height:40px;padding:0 11px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:#fff;color:var(--ink-2);font-size:11px;font-weight:700}
.customer-action-focus>footer #customer-sync-action{border-color:var(--accent);background:var(--accent);color:#fff}
.customer-action-focus>footer button:disabled{opacity:.5}
.customer-grid{gap:13px;margin-top:18px}
.customer-activity-grid{display:grid;grid-template-columns:1fr;gap:0;margin-top:22px;border-top:1px solid var(--line)}
.customer-activity{padding:18px 0;border-bottom:1px solid var(--line)}
.customer-activity>header{display:flex;align-items:end;justify-content:space-between;gap:12px}
.customer-activity>header h3{margin:4px 0 0;font-size:14px}
.customer-activity>header>span{color:var(--muted);font-size:11px}
.customer-inline-form{display:grid;grid-template-columns:112px 94px minmax(150px,1fr) auto auto;gap:7px;margin-top:12px}
.customer-artifact-form{grid-template-columns:minmax(140px,1fr) 92px;}
.customer-artifact-form :is(#customer-artifact-url,#customer-artifact-note){grid-column:1/-1}
.customer-inline-form :is(input,select,button){min-width:0;min-height:42px;padding:0 9px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:#fff;color:var(--ink);font-size:12px}
.customer-inline-form button{border-color:var(--accent);background:var(--accent);color:#fff;font-weight:700}
.customer-inline-form button:last-child:not(:first-child){border-color:var(--line-strong);background:#fff;color:var(--muted)}
.customer-artifact-form button{grid-column:2;justify-self:end;min-width:72px}
.customer-activity-list{margin-top:12px;border-top:1px solid var(--line)}
.customer-resource-row{min-height:58px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;border-bottom:1px solid var(--line)}
.customer-resource-badge{min-width:38px;padding:4px 6px;border-radius:3px;background:var(--paper-soft);color:var(--muted);font-size:10px;font-weight:700;text-align:center}
.customer-resource-row>div:nth-child(2){min-width:0;display:flex;flex-direction:column;gap:4px}
.customer-resource-row :is(strong,a){overflow:hidden;color:var(--ink-2);font-size:12px;font-weight:680;text-overflow:ellipsis;white-space:nowrap}
.customer-resource-row a{color:var(--accent);text-decoration:none}
.customer-resource-row small{overflow:hidden;color:var(--muted);font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.customer-resource-actions{display:flex;gap:3px}
.customer-resource-actions button{min-height:34px;padding:0 7px;border:0;border-radius:4px;background:transparent;color:var(--muted);font-size:10px}
.customer-resource-actions button:hover{background:var(--paper-soft);color:var(--danger)}
.customer-resource-empty{margin:0;padding:18px 0;color:var(--muted);font-size:12px}
.customer-history{margin-top:20px}
.collaboration-revision{min-height:44px;font-size:11px}
.collaboration-revision b,.collaboration-revision time{font-size:10px}

@media (max-width:1200px){
  .customer-workspace{grid-template-columns:minmax(0,55%) minmax(390px,45%)}
  .customer-metrics>button{padding-inline:12px}
  .customer-metrics>button small{display:none}
}

@media (max-width:940px){
  .customer-cockpit{overflow:hidden}
  .customer-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));min-height:58px;overflow:visible}
  .customer-metrics>button{min-width:0;padding:8px 10px}
  .customer-workspace{height:100%;display:block;overflow:auto}
  .customer-workspace .customer-browser,.customer-workspace .customer-detail{height:auto;min-height:100%}
  .customer-workspace .customer-form{height:auto;min-height:100%}
  .customer-workspace .customer-form-scroll{overflow:visible}
  .customer-toolbar{position:sticky;top:0;z-index:3;padding-top:10px;background:var(--paper)}
  .customer-pipeline{display:block;overflow:visible}
  .customer-row{min-height:auto}
  .customer-form-head{top:0}
  .customer-action-focus>div{grid-template-columns:repeat(2,minmax(0,1fr))}
  .customer-action-focus>div label:first-child{grid-column:1/-1}
}

@media (hover:none){
  .message-save-button{opacity:1}
}

@media (max-width:600px){
  .customer-browser-head{min-height:58px;padding-inline:14px}
  .customer-toolbar{display:grid;grid-template-columns:1fr 1fr}
  .customer-search-control{grid-column:1/-1}
  .customer-toolbar-actions{grid-column:1/-1;width:100%;margin:0}
  .customer-toolbar-actions button{flex:1}
  .customer-toolbar>button{grid-column:1/-1}
  .customer-form-head>div{display:none}
  .customer-head-action{margin-left:auto}
  .customer-form-scroll{padding:12px 12px 28px}
  .customer-action-focus>div{grid-template-columns:1fr}
  .customer-action-focus>div label:first-child{grid-column:auto}
  .customer-action-focus>footer{align-items:stretch;flex-wrap:wrap}
  .customer-action-focus>footer>span{flex-basis:100%}
  .customer-action-focus>footer button{flex:1}
  .customer-grid{grid-template-columns:1fr}
  .customer-grid .span-2{grid-column:auto}
  .customer-inline-form,.customer-artifact-form{grid-template-columns:1fr 1fr}
  .customer-inline-form #customer-event-title,.customer-artifact-form :is(#customer-artifact-name,#customer-artifact-url,#customer-artifact-note){grid-column:1/-1}
  .customer-inline-form button{min-height:44px}
  .customer-artifact-form button{grid-column:2}
  .customer-resource-row{grid-template-columns:auto minmax(0,1fr)}
  .customer-resource-actions{grid-column:2;justify-self:end}
}

/* === Mingde flagship workspace · 2026-08-13 === */

body{background:var(--canvas);color:var(--ink);font-size:14px}
button{transition:color var(--motion-fast) var(--ease),background-color var(--motion-fast) var(--ease),border-color var(--motion-fast) var(--ease),transform var(--motion-instant) var(--ease)}
button:active:not(:disabled){transform:translateY(1px)}
input::placeholder,textarea::placeholder{color:var(--muted-2);opacity:1}

/* Login · strong identity, restrained product entry */
.login-view{padding:36px;background:#eaf0f7}
.login-shell{
  width:min(1120px,100%);
  min-height:640px;
  grid-template-columns:minmax(0,1.08fr) minmax(420px,.92fr);
  border:0;
  border-radius:14px;
  box-shadow:var(--shadow);
}
.login-intro{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  padding:46px 54px;
  border-right:0;
  background:var(--rail);
  color:var(--rail-text);
}
.login-intro::after{
  content:"明";
  position:absolute;
  right:-34px;
  bottom:-86px;
  z-index:-1;
  color:#fff;
  font-size:286px;
  font-weight:800;
  line-height:1;
  opacity:.035;
  pointer-events:none;
}
.login-intro .brand-mark{background:var(--accent);color:#fff}
.login-intro .workbench-brand b{color:#fff;font-size:15px}
.login-intro .workbench-brand small{color:var(--rail-muted);font-size:12px}
.login-copy{margin:58px 0 34px}
.login-copy p{margin-bottom:18px;color:#86a9ff;font-size:13px}
.login-copy p i{background:#5d8cff;box-shadow:0 0 0 4px rgba(93,140,255,.12)}
.login-copy h1{max-width:470px;color:#fff;font-size:46px;font-weight:740;letter-spacing:-.035em;line-height:1.15;text-wrap:balance}
.login-copy>span{max-width:480px;margin-top:22px;color:#c5d0df;font-size:14px;line-height:1.8;text-wrap:pretty}
.login-capabilities{display:flex;flex-direction:column;margin-top:auto;border-top:1px solid rgba(255,255,255,.13)}
.login-capabilities>span{min-height:52px;display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:10px;border-bottom:1px solid rgba(255,255,255,.09)}
.login-capabilities svg{width:17px;height:17px;fill:none;stroke:#7ea2ff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.login-capabilities b{color:#f6f9fd;font-size:12px;font-weight:680}
.login-capabilities small{color:#98aac0;font-size:11px}
.dual-rail-login{max-width:410px;margin-top:26px;padding-top:0}
.login-intro .rail-end{color:#d9e3ef}
.login-intro .rail-end>i{border-color:#6e8199;background:var(--rail)}
.login-intro .rail-end.active>i{border-color:#6f98ff;background:#6f98ff}
.login-intro .rail-end small{color:#91a4ba}
.login-intro .rail-line{background:rgba(255,255,255,.18)}
.workbench-login{padding:62px 68px;background:#fff}
.workbench-login header{margin-bottom:32px}
.login-index{display:flex;align-items:center;gap:8px;color:var(--accent);font-size:12px;font-weight:700}
.login-index i{width:7px;height:7px;border-radius:50%;background:var(--success);box-shadow:0 0 0 4px rgba(7,131,109,.1)}
.workbench-login h2{margin-top:12px;font-size:30px;font-weight:740;letter-spacing:-.025em}
.workbench-login header p{max-width:34ch;margin-top:9px;color:var(--muted);font-size:14px}
.field-label{margin:17px 0 8px;font-size:13px}
.field-control{height:50px;border-color:var(--line-strong);border-radius:var(--radius-sm);background:#fff}
.field-control:hover{border-color:#8da0b8}
.field-control:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(43,99,229,.13)}
.field-control>span.field-icon{width:48px;flex-basis:48px;display:grid;place-items:center;border-right:1px solid var(--line);color:var(--muted)}
.field-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.field-control input{padding-inline:14px;font-size:14px}
.password-reveal{height:38px;margin-right:5px;color:var(--muted);font-size:12px}
.login-submit{height:50px;margin-top:26px;padding-inline:17px;border:0;border-radius:var(--radius-sm);background:var(--accent);font-size:14px;box-shadow:0 4px 8px rgba(43,99,229,.2)}
.login-submit:hover{background:var(--accent-hover)}
.login-submit svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.form-error{min-height:32px;padding-top:11px;font-size:12px}
.workbench-login footer{margin-top:11px;color:var(--muted);font-size:11px}

/* Global shell · a stable system rail and one continuous workbench */
.workbench-app{grid-template-columns:264px minmax(0,1fr);background:var(--canvas)}
.thread-sidebar{z-index:var(--z-sidebar);border-right:0;background:var(--rail);color:var(--rail-text)}
.sidebar-head{min-height:72px;padding:14px 16px;border-bottom:1px solid rgba(255,255,255,.1)}
.sidebar-head .brand-mark{width:36px;height:36px;border-radius:7px;background:var(--accent);color:#fff}
.sidebar-head .workbench-brand b{color:#fff;font-size:13px}
.sidebar-head .icon-button{border-color:rgba(255,255,255,.13);background:transparent;color:var(--rail-muted)}
.sidebar-head .icon-button:hover{border-color:rgba(255,255,255,.24);background:rgba(255,255,255,.07);color:#fff}
.employee-profile{min-height:78px;padding:13px 16px;border-bottom:1px solid rgba(255,255,255,.1)}
.profile-avatar{width:42px;height:42px;flex-basis:42px;border:1px solid rgba(255,255,255,.14);background:var(--rail-2);color:#8db0ff}
.profile-copy b{color:#fff;font-size:13px}
.profile-copy small{color:var(--rail-muted);font-size:11px}
.profile-live{color:#72d6bc;font-size:10px}
.profile-live i{background:#35c79f;box-shadow:0 0 0 3px rgba(53,199,159,.12)}
.workspace-mode-switch{grid-template-columns:1fr;gap:4px;padding:12px}
.workspace-mode-switch button{min-height:48px;display:grid;grid-template-columns:24px minmax(0,1fr);gap:10px;padding:0 12px;border:1px solid transparent;border-radius:var(--radius-sm);color:var(--rail-muted)}
.workspace-mode-switch button:hover{background:rgba(255,255,255,.06);color:#fff}
.workspace-mode-switch button.active{border-color:rgba(104,146,255,.28);background:rgba(64,113,229,.2);color:#fff}
.workspace-mode-switch svg{width:18px;height:18px;stroke-width:1.8}
.workspace-mode-switch b{font-size:13px;font-weight:680}
.sidebar-workspace-panel{border-top:1px solid rgba(255,255,255,.1)}
.thread-section-head{padding:7px 10px 7px 13px}
.thread-source-tabs button{color:#91a4ba;font-size:12px}
.thread-source-tabs button:hover{color:#fff}
.thread-source-tabs button.active{border-bottom-color:#73a0ff;color:#fff}
.thread-section-head>button{color:#91a4ba}
.thread-section-head>button:hover{background:rgba(255,255,255,.07);color:#fff}
.thread-list{padding:0 8px 14px}
.thread-item{min-height:68px;padding:11px 10px;border-color:transparent;color:#d8e1ed}
.thread-item::before{border-color:#6f829a}
.thread-item:hover{background:rgba(255,255,255,.055)}
.thread-item.active{border-color:rgba(115,160,255,.3);background:rgba(64,113,229,.18)}
.thread-item.active::before{border-color:#78a2ff;background:#78a2ff}
.thread-item-copy b{color:#f7f9fc;font-size:12px}
.thread-item-copy span{color:#aebdd0;font-size:11px}
.thread-item-copy time{color:#8498b0;font-size:10px}
.thread-list-empty,.thread-list-error{color:#9eb0c5}
.thread-list-error button{border-color:rgba(255,255,255,.16);background:transparent;color:#fff}
.thread-list-loading i,.thread-list-loading span{background:rgba(255,255,255,.07)}
.sidebar-foot{border-top:1px solid rgba(255,255,255,.1)}
.sidebar-foot>button{height:40px;border-color:rgba(255,255,255,.13);background:transparent;color:#9fb0c4}
.sidebar-foot>button:hover{border-color:rgba(255,128,145,.35);background:rgba(193,62,77,.12);color:#ffb2bc}

/* Secondary navigation in the dark system rail */
.collaboration-filter-title{padding:13px 16px 8px;color:#8296ae;font-size:11px}
.collaboration-filter-title button{color:#8eb0ff;font-size:11px}
.collaboration-side-filters,.execution-sidebar-panel{padding-inline:9px}
.collaboration-side-filters button,.execution-side-nav button,.memory-side-nav button{min-height:42px;border-color:transparent;background:transparent;color:#9fb0c4;font-size:12px}
.collaboration-side-filters button:hover,.execution-side-nav button:hover,.memory-side-nav button:hover{background:rgba(255,255,255,.055);color:#fff}
.collaboration-side-filters button.active,.execution-side-nav button.active,.memory-side-nav button.active{border-color:rgba(115,160,255,.24);background:rgba(64,113,229,.17);color:#fff}
.collaboration-side-filters b,.execution-side-nav b,.memory-side-nav b{background:rgba(255,255,255,.08);color:#aebdd0;font-size:10px}
.collaboration-side-filters button.active b,.execution-side-nav button.active b,.memory-side-nav button.active b{background:rgba(115,160,255,.2);color:#dfe8ff}
.memory-sidebar-panel{padding:12px 9px 14px}
.memory-side-search{border-color:rgba(255,255,255,.13);background:rgba(255,255,255,.055)}
.memory-side-search:focus-within{border-color:#7198f4;box-shadow:0 0 0 3px rgba(86,132,242,.16)}
.memory-side-search svg{stroke:#91a4ba}
.memory-side-search input{color:#fff;font-size:12px}
.memory-side-search input::placeholder{color:#91a4ba}
.memory-side-note{border-top-color:rgba(255,255,255,.1);color:#dbe4ef}
.memory-side-note small{color:#91a4ba}

/* Shared product bars */
.chat-head,.collaboration-head,.execution-head,.memory-head{min-height:72px;padding:10px 28px;border-bottom:1px solid var(--line);background:#fff}
.collaboration-heading h1,.execution-heading h1,.memory-head h1{font-size:21px;font-weight:730;letter-spacing:-.02em}
.collaboration-heading>span,.execution-heading>span,.memory-head p{margin-top:4px;color:var(--muted);font-size:12px}
.chat-heading p{font-size:11px}
.chat-heading h1{margin-top:4px;font-size:18px;font-weight:720}
.chat-head-meta>span{font-size:11px}
.chat-head-meta button,.execution-head-actions button,.memory-head>.memory-head-action{min-height:42px;padding-inline:14px;border-color:var(--line-strong);background:#fff;color:var(--ink-2);font-size:12px}
.collaboration-primary,.collaboration-secondary{min-height:44px;padding-inline:15px;font-size:13px}
.collaboration-primary{border-color:var(--accent);background:var(--accent);box-shadow:0 3px 6px rgba(43,99,229,.16)}
.collaboration-section-tabs,.execution-section-tabs{min-height:46px;padding-inline:28px;background:#fff}
.collaboration-section-tabs button,.execution-section-tabs button{height:46px;font-size:13px}

/* Conversation workspace */
.chat-cockpit{background:#f4f7fb}
.chat-stream{padding:34px clamp(24px,5vw,76px)}
.message-list{width:min(940px,100%);gap:24px}
.message{grid-template-columns:36px minmax(0,1fr);gap:12px}
.message.user{grid-template-columns:minmax(0,1fr) 36px}
.message-avatar{width:36px;height:36px;border-color:#d6dfeb;background:#fff;color:var(--accent);font-size:10px}
.message.user .message-avatar{border-color:var(--accent);background:var(--accent)}
.message-meta{margin-bottom:8px;color:var(--muted-2);font-size:11px}
.message-meta b{color:var(--muted);font-size:12px}
.message-body{padding:14px 16px;border-color:#d6dfeb;border-radius:3px 10px 10px 10px;background:#fff;color:var(--ink-2);font-size:14px;line-height:1.72;box-shadow:0 2px 4px rgba(15,32,57,.025)}
.message.user .message-body{border-color:var(--accent);border-radius:10px 3px 10px 10px;background:var(--accent);color:#fff;box-shadow:0 3px 6px rgba(43,99,229,.14)}
.message.user .message-body :is(strong,em,a,code){color:inherit}
.message-actions{margin-top:8px}
.message-save-button{min-height:32px;padding-inline:10px;border-color:var(--line);background:#fff;color:var(--muted);font-size:11px}
.message-result-state{padding:3px 7px;background:#e9eef5;color:var(--muted);font-size:10px}
.chat-empty{color:var(--muted)}
.chat-empty-icon,.empty-state-icon{width:52px;height:52px;display:grid;place-items:center;margin-bottom:18px;border:1px solid #cbd8e8;border-radius:12px;background:#fff;color:var(--accent);box-shadow:var(--shadow-soft)}
.chat-empty-icon svg,.empty-state-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.chat-empty h2{margin:0;font-size:23px;font-weight:720}
.chat-empty>span{margin-top:9px;color:var(--muted);font-size:14px}
.chat-empty>button{height:44px;margin-top:22px;padding-inline:16px;font-size:13px}
.composer{padding:14px clamp(22px,4vw,60px) calc(17px + env(safe-area-inset-bottom));background:rgba(255,255,255,.98)}
.composer-control{width:min(940px,100%);min-height:54px;gap:8px;padding:7px 7px 7px 12px;border-color:#aebdce;border-radius:10px;background:#fff;box-shadow:0 4px 8px rgba(15,32,57,.05)}
.composer-control:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(43,99,229,.12)}
.composer-control textarea{min-height:40px;padding:9px 2px;font-size:14px}
.composer-control button{height:40px;padding-inline:14px;font-size:12px}
.composer-control .attachment-button{width:40px;min-width:40px;height:40px}
.composer-meta,.composer-attachments,.composer-task-action{width:min(940px,100%)}
.composer-meta{color:var(--muted);font-size:11px}

/* Continuous business workspaces */
.collaboration-cockpit,.execution-cockpit,.memory-cockpit{background:var(--canvas)}
.customer-metrics,.collaboration-metrics,.execution-metrics{border-bottom:1px solid var(--line);background:#fff}
.customer-metrics>button,.collaboration-metrics>div,.execution-metrics>div{min-height:64px;padding-inline:18px;background:#fff}
.customer-metrics>button span,.collaboration-metrics span,.execution-metrics span{color:var(--muted);font-size:11px}
.customer-metrics>button b,.collaboration-metrics b,.execution-metrics b{font-size:22px;font-weight:720;letter-spacing:-.025em}
.customer-workspace,.collaboration-workspace{background:#fff}
.customer-browser,.collaboration-browser{border-right-color:var(--line)}
.customer-browser-head,.collaboration-browser>header{min-height:62px;padding-inline:18px}
.customer-browser-head h2,.collaboration-browser>header h2{font-size:17px}
.customer-browser-head>span,.collaboration-browser>header>span{font-size:11px}
.customer-toolbar,.collaboration-toolbar{padding:0 16px 14px}
.customer-toolbar label,.collaboration-toolbar label,.collaboration-toolbar select{border-color:var(--line-strong);background:#fff}
.customer-toolbar input,.collaboration-toolbar input{font-size:12px}
.customer-stage>header{position:relative;min-height:62px;padding:12px 14px;border-top:1px solid var(--line)}
.customer-stage>header::before{content:"";width:8px;height:8px;flex:0 0 8px;margin-right:8px;border-radius:50%;background:#718198}
.customer-stage-proposal>header::before{background:#b77b13}
.customer-stage-contact>header::before{background:#347fc4}
.customer-stage-diagnosis>header::before{background:#d06e24}
.customer-stage-signing>header::before{background:#bd3f4d}
.customer-stage-delivery>header::before,.customer-stage-maintenance>header::before{background:var(--success)}
.customer-stage-channel>header::before{background:#715ab9}
.customer-stage>header span{font-size:10px}
.customer-stage>header h3{font-size:13px}
.customer-row{min-height:132px;padding:15px;background:#fff}
.customer-row:hover{background:#f7f9fd}
.customer-row.active{box-shadow:inset 0 0 0 1px #9bb5ed;background:#f0f5ff}
.customer-row-top strong{font-size:14px}
.customer-row-top small,.customer-row-meta,.customer-row-blocker{font-size:11px}
.customer-row-action{font-size:12px}
.customer-detail-empty>span,.collaboration-detail-empty>span,.memory-detail-empty>span{display:grid}
.customer-detail-empty,.collaboration-detail-empty,.memory-detail-empty{color:var(--muted)}
.customer-detail-empty h2,.collaboration-detail-empty h2,.memory-detail-empty h2{font-size:18px;font-weight:710}
.customer-detail-empty small,.collaboration-detail-empty small,.memory-detail-empty p{font-size:13px}
.customer-form-head,.collaboration-form-head,.memory-detail form>header{min-height:70px;background:#fff}
.customer-form-scroll,.collaboration-form-scroll,.memory-detail-body{padding:20px 22px 32px}
.customer-action-focus{border-color:#b9cbed;border-radius:10px;background:#f3f7ff}
.customer-action-focus>header h3{font-size:15px}
.customer-action-focus label span,.customer-grid label>span,.collaboration-grid label>span,.collaboration-people legend,.memory-detail-body>label{font-size:12px}
.customer-action-focus :is(select,input),.customer-grid :is(input,select),.customer-grid textarea,.collaboration-grid :is(input,select,textarea),.memory-detail-body :is(input,select,textarea){border-color:var(--line-strong);font-size:13px}
.customer-action-focus :is(select,input),.customer-grid :is(input,select),.collaboration-grid :is(input,select){height:44px}
.customer-activity>header h3,.collaboration-history h3,.memory-evidence-section h3,.memory-history-section h3{font-size:14px}
.collaboration-item{min-height:96px}
.collaboration-item h3{font-size:14px}
.collaboration-item p{font-size:12px}
.collaboration-item-foot{font-size:11px}

/* Execution · denser, clearer and less dashboard-like */
.execution-view{padding:20px 26px 32px}
.execution-focus{border-color:var(--line);border-radius:10px}
.execution-metrics>div{min-height:64px}
.execution-metrics span{font-size:12px}
.execution-two-column{gap:16px;margin-top:16px}
.execution-panel{border-color:var(--line);border-radius:10px}
.execution-panel>header{min-height:58px;padding-inline:16px}
.execution-panel>header h2{font-size:15px}
.execution-card{padding:16px}
.execution-card h3{font-size:14px}
.execution-card p{font-size:12px}
.execution-card-top span,.execution-card-top small{font-size:11px}
.execution-card-actions button{font-size:12px}
.execution-signal{padding:15px 16px}
.execution-signal strong{font-size:12px}
.execution-signal small{font-size:11px}
.execution-schedule-grid{gap:16px}
.execution-schedule-row{min-height:78px;padding:13px 15px}
.execution-project-list{gap:16px}
.execution-project{padding:18px;border-color:var(--line);border-radius:10px}
.execution-project h3{font-size:15px}
.execution-project>p{font-size:12px}

/* Personal memory · one connected governance surface */
.memory-layout{grid-template-columns:minmax(360px,.82fr) minmax(480px,1.3fr);gap:0;padding:18px 22px 24px}
.memory-list-panel,.memory-detail{border-color:var(--line);border-radius:0;background:#fff}
.memory-list-panel{border-radius:10px 0 0 10px}
.memory-detail{margin-left:-1px;border-radius:0 10px 10px 0}
.memory-list-panel>header{min-height:62px;padding-inline:16px}
.memory-list-panel h2{font-size:16px}
.memory-row{min-height:102px;padding:16px}
.memory-row:hover{background:#f7f9fd}
.memory-row.active{background:#eff4ff;box-shadow:inset 0 0 0 1px #a6bcec}
.memory-row-copy>span{font-size:11px}
.memory-row-copy h3{font-size:14px}
.memory-row-copy p{font-size:12px}
.memory-row>time{color:var(--muted);font-size:11px}
.memory-detail-body>label{color:var(--ink-2)}
.memory-evidence-row{padding:13px;background:#f7f9fc}
.memory-evidence-row p{font-size:13px}
.memory-evidence-row small{font-size:11px}
.memory-revision-row{font-size:12px}
.memory-revision-row time{font-size:11px}

/* Consistent modal depth without decorative ghost cards */
.execution-modal{z-index:var(--z-modal-backdrop)}
.execution-schedule-form,.execution-dialog{border:0;border-radius:12px;box-shadow:0 24px 56px rgba(10,28,54,.24)}

@media (max-width:1100px){
  .workbench-app{grid-template-columns:248px minmax(0,1fr)}
  .chat-head,.collaboration-head,.execution-head,.memory-head{padding-inline:22px}
  .login-shell{grid-template-columns:1fr 430px}
  .login-intro{padding-inline:42px}
}

@media (max-width:940px){
  .login-view{padding:20px}
  .login-shell{width:min(700px,100%);grid-template-columns:1fr}
  .login-intro{padding:30px 34px}
  .login-intro::after{right:-20px;bottom:-74px;font-size:220px}
  .login-copy{margin:38px 0 28px}
  .login-copy h1{font-size:38px}
  .login-capabilities{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-bottom:1px solid rgba(255,255,255,.09)}
  .login-capabilities>span{min-height:74px;grid-template-columns:20px minmax(0,1fr);align-content:center;padding:8px 10px 8px 0;border-bottom:0;border-right:1px solid rgba(255,255,255,.09)}
  .login-capabilities>span:last-child{border-right:0;padding-left:10px}
  .login-capabilities small{grid-column:2;margin-top:-4px}
  .dual-rail-login{display:none}
  .workbench-login{padding:42px 44px}

  .thread-sidebar{box-shadow:12px 0 30px rgba(6,20,39,.2)}
  .workspace-mode-switch{grid-template-columns:repeat(4,minmax(0,1fr));padding:10px 8px}
  .workspace-mode-switch button{display:flex;min-height:50px;justify-content:center;padding-inline:4px;text-align:center}
  .workspace-mode-switch button svg{display:none}
  .chat-head,.collaboration-head,.execution-head,.memory-head{min-height:68px;padding-inline:14px}
  .chat-stream{padding:24px 16px}
  .message-assistant{padding-right:20px}
  .message.user{padding-left:20px}
  .composer{padding-inline:14px}
  .collaboration-section-tabs,.execution-section-tabs{padding-inline:14px}
  .execution-view{padding:14px 14px 24px}
  .memory-layout{display:block;padding:12px}
  .memory-list-panel,.memory-detail{margin-left:0;border-radius:10px}
}

@media (max-width:600px){
  .login-view{padding:0;background:#fff}
  .login-shell{min-height:100vh;border-radius:0;box-shadow:none}
  .login-intro{padding:26px 24px 28px}
  .login-copy{margin:34px 0 0}
  .login-copy h1{font-size:33px;letter-spacing:-.03em}
  .login-copy>span{margin-top:16px;font-size:13px;line-height:1.7}
  .login-capabilities{display:none}
  .workbench-login{padding:36px 24px 40px}
  .workbench-login h2{font-size:27px}
  .workbench-login footer{align-items:flex-start;line-height:1.5;text-align:left}

  .chat-head-meta>span{display:none}
  .chat-heading h1{font-size:17px}
  .chat-stream{padding:20px 10px}
  .message{grid-template-columns:30px minmax(0,1fr);gap:8px}
  .message.user{grid-template-columns:minmax(0,1fr) 30px;padding-left:14px}
  .message-assistant{padding-right:14px}
  .message-avatar{width:30px;height:30px}
  .message-body{padding:12px 13px;font-size:14px}
  .composer{padding:10px 9px calc(12px + env(safe-area-inset-bottom))}
  .composer-control{border-radius:8px}
  .composer-control button span{display:none}
  .composer-control button{width:40px;padding:0;justify-content:center}
  .empty-state-icon,.chat-empty-icon{width:48px;height:48px}
  .chat-empty h2{font-size:21px}
  .customer-metrics>button,.execution-metrics>div{padding-inline:10px}
  .customer-metrics>button span,.execution-metrics span{font-size:10px}
  .customer-metrics>button b,.execution-metrics b{font-size:19px}
  .customer-form-scroll,.collaboration-form-scroll,.memory-detail-body{padding-inline:14px}
}

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

/* Client OS v2 authority · keep the package's five metrics and six-stage board
   intact after the shared flagship shell overrides above. */
.customer-metrics{grid-template-columns:repeat(5,minmax(0,1fr))}
.customer-metrics>article{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-content:center;
  padding:9px 18px;
  border-right:1px solid var(--line);
  background:#fff;
}
.customer-metrics>article:last-child{border-right:0}
.customer-metrics>article span{overflow:hidden;color:var(--muted);font-size:11px;font-weight:680;text-overflow:ellipsis;white-space:nowrap}
.customer-metrics>article b{grid-row:1/3;grid-column:2;color:var(--ink);font-size:22px;font-weight:720;letter-spacing:-.025em}
.customer-metrics>article small{margin-top:4px;overflow:hidden;color:var(--muted-2);font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.customer-toolbar{grid-template-columns:minmax(260px,1fr) auto 118px 118px auto}
.customer-os-pool-actions button{white-space:nowrap}
.customer-detail{overflow:hidden}

@media (max-width:1180px){
  .customer-toolbar{grid-template-columns:minmax(200px,1fr) auto 108px auto}
  .customer-filter-control:not(.customer-os-mobile-stage){display:none!important}
  .customer-os-mobile-stage{display:flex!important}
  .customer-toolbar-actions{grid-column:1/-1}
  .customer-metrics>article{padding-inline:10px}
  .customer-metrics>article small{display:none}
  .customer-workspace{position:relative;display:block;height:100%;overflow:hidden}
  .customer-workspace .customer-browser{height:100%;min-height:0}
  .customer-workspace .customer-detail{position:absolute;height:100%;min-height:0}
  .customer-workspace .customer-form{height:100%;min-height:0}
  .customer-workspace .customer-form-scroll{overflow:auto}
  .customer-pipeline{display:grid;grid-template-columns:repeat(6,minmax(178px,1fr));overflow-x:auto}
}

@media (max-width:760px){
  .customer-metrics{grid-template-columns:repeat(5,112px);overflow-x:auto}
  .customer-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
  .customer-search-control,.customer-os-pool-actions,.customer-os-mobile-stage,.customer-toolbar-actions{grid-column:1}
  .customer-os-pool-actions button{flex:1}
  .customer-toolbar-actions{display:grid;grid-template-columns:1fr 1fr 1fr;width:100%}
  .customer-detail{inset:0;width:100%;border-left:0;box-shadow:none}
  .customer-pipeline{display:block;overflow:hidden}
  .customer-stage{display:none}
  .customer-stage.mobile-selected{display:flex}
  .customer-os-pool-view{padding:12px}
}

/* Customer OS v3 · office-first hierarchy, grouped lifecycle and task-based detail. */
.customer-os-v3{
  --customer-canvas:#f4f7fb;
  --customer-surface:#fff;
  --customer-soft:#f7f9fc;
  --customer-line:#d9e2ed;
  --customer-line-strong:#b9c7d8;
  --customer-navy:#10243e;
  --customer-navy-2:#183452;
  --customer-blue:#2b63e5;
  --customer-blue-soft:#edf3ff;
  --customer-amber:#a86c0f;
  --customer-amber-soft:#fff7e7;
  --customer-red:#b93646;
  --customer-red-soft:#fff2f3;
  --customer-green:#11745b;
}

.customer-os-v3 .customer-metrics{
  min-height:56px;
  grid-template-columns:1.16fr 1.08fr 1.16fr repeat(2,minmax(0,1fr));
  border-bottom:1px solid var(--customer-line);
  background:var(--customer-surface);
}
.customer-os-v3 .customer-metrics>article{
  min-height:56px;
  padding:8px 16px;
  border-right:1px solid var(--customer-line);
  background:var(--customer-surface);
}
.customer-os-v3 .customer-metrics>article:first-child{background:var(--customer-amber-soft)}
.customer-os-v3 .customer-metrics>article:nth-child(2){background:var(--customer-red-soft)}
.customer-os-v3 .customer-metrics>article:nth-child(3){background:var(--customer-blue-soft)}
.customer-os-v3 .customer-metrics>article span{color:#52677e;font-size:11px;letter-spacing:.01em}
.customer-os-v3 .customer-metrics>article b{color:var(--customer-navy);font-size:24px;font-weight:760}
.customer-os-v3 .customer-metrics>article:first-child b{color:var(--customer-amber);font-size:26px}
.customer-os-v3 .customer-metrics>article:nth-child(2) b{color:var(--customer-red);font-size:26px}
.customer-os-v3 .customer-metrics>article:nth-child(3) b{color:var(--customer-blue)}
.customer-os-v3 .customer-metrics>article small{color:#8292a5;font-size:10px}

.customer-os-v3 .customer-workspace{
  position:relative;
  display:block;
  min-height:0;
  overflow:hidden;
  isolation:isolate;
  background:var(--customer-canvas);
}
.customer-os-v3 .customer-browser{height:100%;overflow:hidden;background:var(--customer-canvas)}
.customer-os-v3 .customer-toolbar{
  position:relative;
  z-index:auto;
  min-height:56px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:8px 16px;
  border-top:0;
  border-bottom:1px solid var(--customer-line);
  background:var(--customer-surface);
}
.customer-os-v3 .customer-toolbar-summary{flex:0 0 auto;display:flex;align-items:baseline;gap:8px;padding-right:12px;border-right:1px solid var(--customer-line)}
.customer-os-v3 .customer-toolbar-summary strong{color:var(--customer-navy);font-size:13px;white-space:nowrap}
.customer-os-v3 .customer-toolbar-summary span{color:#7a8ca1;font-size:10px;white-space:nowrap}
.customer-os-v3 .customer-toolbar-primary,
.customer-os-v3 .customer-toolbar-secondary{min-width:0;align-items:center;gap:8px}
.customer-os-v3 .customer-toolbar-primary{display:grid;grid-template-columns:minmax(220px,1fr) 128px 128px}
.customer-os-v3 .customer-toolbar-secondary{display:flex}
.customer-os-v3 .customer-toolbar label{
  height:44px;
  padding:0 12px;
  border-color:var(--customer-line-strong);
  border-radius:6px;
  background:#fff;
}
.customer-os-v3 .customer-search-control{min-width:0}
.customer-os-v3 .customer-toolbar-primary .customer-filter-control{display:flex!important;flex:0 0 128px}
.customer-os-v3 .customer-toolbar-primary .customer-os-mobile-stage{display:none!important}
.customer-os-v3 .customer-filter-control>span{color:#73859a;font-size:10px;white-space:nowrap}
.customer-os-v3 .customer-toolbar :is(input,select){font-size:12px}
.customer-os-v3 .customer-toolbar :is(button,label){transition:border-color 180ms ease,background-color 180ms ease,color 180ms ease}
.customer-os-v3 .customer-os-pool-actions{height:44px;gap:4px}
.customer-os-v3 .customer-os-pool-actions button,
.customer-os-v3 .customer-toolbar-actions button,
.customer-os-v3 #customer-clear-stage{
  min-height:44px;
  padding:0 12px!important;
  border:1px solid var(--customer-line-strong);
  border-radius:6px;
  background:#fff;
  color:#38516c;
  font-size:11px!important;
  font-weight:700;
}
.customer-os-v3 .customer-os-pool-actions button:hover,
.customer-os-v3 .customer-toolbar-actions button:hover,
.customer-os-v3 #customer-clear-stage:hover{border-color:#8da5c1;background:var(--customer-soft);color:var(--customer-navy)}
.customer-os-v3 .customer-os-pool-actions button.active{border-color:var(--customer-blue);background:var(--customer-blue-soft);color:var(--customer-blue)}
.customer-os-v3 .customer-os-pool-actions b{border-radius:4px;background:#edf1f6}
.customer-os-v3 .customer-toolbar-actions{display:flex;gap:4px;margin:0;white-space:nowrap}
.customer-os-v3 #customer-agent-entry{border-color:#a9bce3;background:var(--customer-blue-soft);color:var(--customer-blue)}

.customer-os-v3 .customer-pipeline{
  min-height:0;
  flex:1;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-auto-flow:initial;
  gap:1px;
  overflow:hidden;
  background:#ccd7e4;
}
.customer-os-v3 .customer-phase{
  min-width:0;
  min-height:0;
  display:grid;
  grid-template-rows:36px minmax(0,1fr);
  background:var(--customer-soft);
}
.customer-os-v3 .customer-phase-head{
  min-height:36px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:4px 12px;
  border-right:1px solid rgba(255,255,255,.1);
  background:var(--customer-navy);
  color:#fff;
}
.customer-os-v3 .customer-phase-head>span{color:#76a1ff;font-size:10px;font-weight:760;letter-spacing:.08em}
.customer-os-v3 .customer-phase-head>div{min-width:0;display:flex;align-items:baseline;gap:8px}
.customer-os-v3 .customer-phase-head strong{font-size:12px;font-weight:720;white-space:nowrap}
.customer-os-v3 .customer-phase-head small{overflow:hidden;color:#aabbd0;font-size:9px;text-overflow:ellipsis;white-space:nowrap}
.customer-os-v3 .customer-phase-lanes{
  min-width:0;
  min-height:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1px;
  background:#d7e0ea;
}
.customer-os-v3 .customer-stage{min-width:0;min-height:0;background:var(--customer-soft)}
.customer-os-v3 .customer-stage>header{
  min-height:48px;
  padding:8px 12px;
  border-top:0;
  border-bottom:1px solid var(--customer-line);
  background:#fff;
}
.customer-os-v3 .customer-stage>header::before{display:none}
.customer-os-v3 .customer-stage>header>div{min-width:0;display:flex;align-items:baseline;gap:8px}
.customer-os-v3 .customer-stage>header .customer-stage-order{color:#8a9aae;font-size:9px;font-weight:740;letter-spacing:.04em}
.customer-os-v3 .customer-stage>header h3{margin:0;color:var(--customer-navy);font-size:12px;font-weight:740}
.customer-os-v3 .customer-stage>header b{
  min-width:24px;
  height:24px;
  border-radius:4px;
  background:#eef2f7;
  color:#4d6076;
  font-size:10px;
}
.customer-os-v3 .customer-stage-list{min-height:0;overflow:auto;overscroll-behavior:contain;background:var(--customer-soft)}
.customer-os-v3 .customer-stage.drag-over{background:var(--customer-blue-soft)}
.customer-os-v3 .customer-row{
  min-height:118px;
  gap:8px;
  padding:12px;
  border:0;
  border-bottom:1px solid var(--customer-line);
  background:#fff;
  box-shadow:none;
}
.customer-os-v3 .customer-row:hover{background:#f5f8fd}
.customer-os-v3 .customer-row:focus-visible{position:relative;outline:2px solid var(--customer-blue);outline-offset:-2px}
.customer-os-v3 .customer-row.active{background:var(--customer-blue-soft);box-shadow:inset 0 0 0 1px #9eb7ec}
.customer-os-v3 .customer-row.is-risk{background:var(--customer-red-soft);box-shadow:none}
.customer-os-v3 .customer-row.is-stale{background:var(--customer-amber-soft);box-shadow:none}
.customer-os-v3 .customer-row-top{align-items:flex-start}
.customer-os-v3 .customer-row-top strong{color:var(--customer-navy);font-size:13px;font-weight:750;line-height:1.4}
.customer-os-v3 .customer-os-health{padding:2px 4px;border-radius:4px;font-size:9px}
.customer-os-v3 .customer-row-action{grid-template-columns:auto minmax(0,1fr);gap:4px;color:#30475f;font-size:11px;line-height:1.5}
.customer-os-v3 .customer-row-action i{padding:0;background:transparent;color:var(--customer-blue);font-size:9px;line-height:1.7}
.customer-os-v3 .customer-row-action small{grid-column:2;color:#73859a;font-size:9px}
.customer-os-v3 .customer-row-blocker{padding:4px 8px;border:0;border-radius:4px;background:#ffedc9;color:#78500f;font-size:10px}
.customer-os-v3 .customer-os-follow{margin-top:auto;color:#6f8196;font-size:10px}
.customer-os-v3 .customer-os-delivery-copy{padding-top:4px;border-top:1px solid #d8e8e2;color:var(--customer-green);font-size:10px}
.customer-os-v3 .customer-stage-empty{padding:28px 12px;color:#8b9bae;font-size:11px}

.customer-os-v3 .customer-workspace.detail-open::before{
  content:"";
  position:absolute;
  z-index:var(--z-modal-backdrop);
  inset:0;
  pointer-events:none;
  background:rgba(11,29,52,.2);
}
.customer-os-v3 .customer-detail{
  z-index:var(--z-modal);
  width:min(720px,62vw);
  overflow:hidden;
  border-left:1px solid var(--customer-line);
  background:#fff;
  box-shadow:-22px 0 44px rgba(12,31,56,.18);
}
.customer-os-v3 .customer-form-head{min-height:76px;padding:12px 16px;background:#fff}
.customer-os-v3 .customer-form-head h2{font-size:17px}
.customer-os-v3 .customer-form-head>div>span{font-size:10px}
.customer-os-v3 .customer-form-head :is(.customer-back,.customer-head-action,.collaboration-primary){min-height:44px;border-radius:6px}
.customer-os-v3 .customer-detail-tabs{
  min-height:48px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  padding:0 16px;
  border-bottom:1px solid var(--customer-line);
  background:#fff;
}
.customer-os-v3 .customer-detail-tabs button{
  min-width:0;
  border:0;
  border-bottom:2px solid transparent;
  background:transparent;
  color:#718399;
  font-size:12px;
  font-weight:700;
}
.customer-os-v3 .customer-detail-tabs button:hover{color:var(--customer-navy)}
.customer-os-v3 .customer-detail-tabs button.active{border-bottom-color:var(--customer-blue);color:var(--customer-blue)}
.customer-os-v3 .customer-form-scroll{padding:22px;background:var(--customer-canvas)}
.customer-os-v3 .customer-detail-panel{
  overflow:hidden;
  border:1px solid var(--customer-line);
  border-radius:6px;
  background:#fff;
}
.customer-os-v3 .customer-detail-panel[hidden]{display:none!important}
.customer-os-v3 .customer-action-focus{
  margin:0;
  padding:22px;
  border:0;
  border-bottom:1px solid var(--customer-line);
  border-radius:0;
  background:var(--customer-blue-soft);
}
.customer-os-v3 .customer-action-focus>header h3{color:var(--customer-navy);font-size:15px}
.customer-os-v3 .customer-action-focus textarea{min-height:76px;margin-top:12px}
.customer-os-v3 .customer-action-focus>div{gap:12px;margin-top:12px}
.customer-os-v3 .customer-action-focus>footer{gap:8px;margin-top:12px}
.customer-os-v3 .customer-os-node-section,
.customer-os-v3 .customer-os-delivery{
  margin:0;
  padding:22px;
  border:0;
  border-radius:0;
  background:#fff;
}
.customer-os-v3 .customer-profile-section{padding:22px;border-bottom:1px solid var(--customer-line)}
.customer-os-v3 .customer-profile-section:last-child{border-bottom:0}
.customer-os-v3 .customer-profile-section>header p{margin:0;color:var(--customer-blue);font-size:10px;font-weight:740;letter-spacing:.05em}
.customer-os-v3 .customer-profile-section>header h3{margin:4px 0 0;color:var(--customer-navy);font-size:15px}
.customer-os-v3 .customer-profile-section .customer-grid{gap:16px;margin-top:16px}
.customer-os-v3 .customer-os-delivery-grid{gap:16px;margin-top:16px}
.customer-os-v3 .customer-os-links{margin:0;padding:16px 22px;border:0;border-top:1px solid var(--customer-line);border-radius:0;background:var(--customer-soft)}
.customer-os-v3 .customer-activity-grid{gap:0;margin:0;border-top:0}
.customer-os-v3 .customer-activity{padding:22px;border-bottom:1px solid var(--customer-line)}
.customer-os-v3 .customer-history{margin:0;padding:22px}
.customer-os-v3 .customer-inline-form{margin-top:12px}

@media (max-width:1180px){
  .customer-os-v3 .customer-metrics{grid-template-columns:1.2fr repeat(4,minmax(112px,1fr));overflow-x:auto}
  .customer-os-v3 .customer-metrics>article{min-width:112px;padding:8px 12px}
  .customer-os-v3 .customer-metrics>article small{display:none}
  .customer-os-v3 .customer-toolbar{grid-template-columns:1fr;align-items:stretch;gap:8px}
  .customer-os-v3 .customer-toolbar-summary{justify-content:space-between;padding:0 0 8px;border-right:0;border-bottom:1px solid var(--customer-line)}
  .customer-os-v3 .customer-toolbar-primary,
  .customer-os-v3 .customer-toolbar-secondary{width:100%}
  .customer-os-v3 .customer-toolbar-secondary{justify-content:space-between}
  .customer-os-v3 .customer-pipeline{grid-template-columns:repeat(3,minmax(380px,1fr));overflow-x:auto}
  .customer-os-v3 .customer-detail{height:100%;width:min(720px,76vw)}
}

@media (max-width:760px){
  .customer-os-v3 .customer-metrics{grid-template-columns:repeat(5,112px)}
  .customer-os-v3 .customer-toolbar{gap:12px;padding:12px}
  .customer-os-v3 .customer-toolbar-primary{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .customer-os-v3 .customer-search-control{min-width:0;grid-column:1/-1}
  .customer-os-v3 .customer-filter-control{min-width:0;flex:auto}
  .customer-os-v3 .customer-toolbar-primary .customer-os-mobile-stage{grid-column:1/-1!important;display:flex!important}
  .customer-os-v3 .customer-toolbar-secondary{display:grid;grid-template-columns:1fr auto;gap:8px}
  .customer-os-v3 .customer-os-pool-actions{min-width:0}
  .customer-os-v3 .customer-os-pool-actions button{flex:1}
  .customer-os-v3 .customer-toolbar-actions{grid-column:1/-1;display:grid;grid-template-columns:1.3fr 1fr 1fr;width:100%}
  .customer-os-v3 .customer-pipeline{display:block;overflow:hidden}
  .customer-os-v3 .customer-phase,
  .customer-os-v3 .customer-phase-lanes{display:contents}
  .customer-os-v3 .customer-phase-head{display:none}
  .customer-os-v3 .customer-stage{display:none}
  .customer-os-v3 .customer-stage.mobile-selected{display:flex}
  .customer-os-v3 .customer-detail{position:fixed;inset:0;width:100%;height:100dvh;border:0;box-shadow:none}
  .customer-os-v3 .customer-form-head{min-height:96px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:4px 8px;padding:8px}
  .customer-os-v3 .customer-form-head>div{display:block;grid-column:2;grid-row:1;align-self:center}
  .customer-os-v3 .customer-form-head>div>p{display:none}
  .customer-os-v3 .customer-form-head h2{margin:0;font-size:14px}
  .customer-os-v3 .customer-form-head>div>span{margin-top:2px;font-size:9px}
  .customer-os-v3 .customer-back{grid-column:1;grid-row:1}
  .customer-os-v3 #customer-save{grid-column:3;grid-row:1}
  .customer-os-v3 #customer-delete{grid-column:2;grid-row:2;justify-self:end}
  .customer-os-v3 #customer-archive{grid-column:3;grid-row:2}
  .customer-os-v3 .customer-form-head :is(.customer-back,.customer-head-action,.collaboration-primary){min-height:44px;padding-inline:8px;font-size:10px}
  .customer-os-v3 .customer-detail-tabs{padding:0 8px}
  .customer-os-v3 .customer-detail-tabs button{font-size:11px}
  .customer-os-v3 .customer-form-scroll{padding:12px}
  .customer-os-v3 .customer-action-focus,
  .customer-os-v3 .customer-os-node-section,
  .customer-os-v3 .customer-os-delivery,
  .customer-os-v3 .customer-profile-section,
  .customer-os-v3 .customer-activity,
  .customer-os-v3 .customer-history{padding:16px}
  .customer-os-v3 .customer-action-focus>div{grid-template-columns:1fr}
  .customer-os-v3 .customer-profile-section .customer-grid,
  .customer-os-v3 .customer-os-delivery-grid{grid-template-columns:1fr;gap:12px}
  .customer-os-v3 .customer-profile-section .span-2,
  .customer-os-v3 .customer-os-delivery-grid .span-2{grid-column:auto}
  .customer-os-v3 .customer-os-links{align-items:stretch;flex-direction:column;padding:16px}
}

/* Workbench UI v4 · concise entry, compact navigation and full-page customer detail. */
:root{
  --workbench-sidebar:224px;
  --z-sticky:10;
}

/* Login is an employee entry, not a product brochure. */
.login-view{
  display:grid;
  place-items:center;
  padding:24px;
  background:#edf2f7;
}
.login-shell{
  width:min(820px,100%);
  min-height:520px;
  grid-template-columns:300px minmax(0,1fr);
  border:1px solid #d7e0ea;
  border-radius:10px;
  box-shadow:0 20px 56px rgba(10,28,54,.14);
}
.login-intro{
  min-height:0;
  padding:32px;
  border:0;
  background:var(--rail);
}
.login-intro::after{display:none}
.login-intro .workbench-brand{gap:10px}
.login-intro .brand-mark{width:34px;height:34px;border-radius:6px;font-size:16px}
.login-intro .workbench-brand b{font-size:13px}
.login-intro .workbench-brand small{margin-top:2px;font-size:10px}
.login-copy{margin:auto 0}
.login-copy p{margin:0 0 12px;color:#82a7ff;font-size:11px;letter-spacing:.04em}
.login-copy p i{box-shadow:none}
.login-copy h1{max-width:260px;color:#fff;font-size:32px;font-weight:720;line-height:1.2;letter-spacing:-.03em}
.login-copy>span{max-width:250px;margin-top:16px;color:#b9c8da;font-size:12px;line-height:1.7}
.login-capabilities,.dual-rail-login{display:none!important}
.workbench-login{padding:48px;background:#fff}
.workbench-login header{margin-bottom:28px}
.login-index{font-size:11px;letter-spacing:.03em}
.workbench-login h2{margin-top:10px;font-size:26px}
.workbench-login header p{margin-top:8px;font-size:13px}
.field-label{margin:16px 0 8px;font-size:12px}
.field-control{height:48px}
.login-submit{height:48px;margin-top:24px;box-shadow:none}
.form-error{min-height:28px}
.workbench-login footer{margin-top:8px}

/* A narrower navigation rail leaves the work surface in charge. */
.workbench-app{grid-template-columns:var(--workbench-sidebar) minmax(0,1fr)}
.sidebar-head{min-height:64px;gap:8px;padding:10px 12px}
.sidebar-head .workbench-brand{gap:8px}
.sidebar-head .brand-mark{width:32px;height:32px;border-radius:6px;font-size:15px}
.sidebar-head .workbench-brand b{font-size:12px;white-space:nowrap}
.sidebar-head .workbench-brand small{display:none}
.sidebar-head .icon-button{width:44px;height:44px}
.employee-profile{min-height:64px;gap:8px;padding:10px 12px}
.profile-avatar{width:36px;height:36px;flex-basis:36px;font-size:13px}
.profile-copy b{font-size:12px}
.profile-copy small{margin-top:2px;font-size:10px}
.profile-live{font-size:0}
.profile-live i{width:7px;height:7px}
.workspace-mode-switch{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding:8px;
}
.workspace-mode-switch button{
  min-width:0;
  min-height:52px;
  display:grid;
  grid-template-columns:17px minmax(0,1fr);
  align-items:center;
  justify-content:initial;
  gap:8px;
  padding:0 8px;
  text-align:left;
}
.workspace-mode-switch button svg{display:block;width:17px;height:17px}
.workspace-mode-switch b{font-size:12px}
.thread-section-head{padding:4px 8px}
.thread-source-tabs button{padding-inline:7px;font-size:11px}
.thread-list{padding:0 8px 12px}
.thread-item{min-height:60px;padding:8px}
.collaboration-filter-title{padding:10px 12px 6px}
.collaboration-side-filters,.execution-sidebar-panel{padding-inline:8px}
.collaboration-side-filters button,.execution-side-nav button,.memory-side-nav button{min-height:44px;padding-inline:10px}
.collaboration-side-filters button.active,.execution-side-nav button.active,.memory-side-nav button.active{
  border-color:transparent;
  background:rgba(64,113,229,.13);
  box-shadow:inset 2px 0 0 #73a0ff;
}
.memory-sidebar-panel{padding:8px 8px 12px}
.sidebar-foot{padding:10px 8px}
.sidebar-foot>button{height:44px}
.thread-sidebar{z-index:var(--z-sidebar)}
.mobile-scrim{z-index:calc(var(--z-sidebar) - 1)}
.workbench-toast{z-index:var(--z-toast)}

/* One stable rhythm across chat, collaboration, execution and memory. */
.chat-head,.collaboration-head,.execution-head,.memory-head{
  min-height:64px;
  padding:8px 24px;
}
.collaboration-heading h1,.execution-heading h1,.memory-head h1{font-size:20px}
.collaboration-heading>span,.execution-heading>span,.memory-head p{margin-top:2px;font-size:11px}
.collaboration-section-tabs,.execution-section-tabs{min-height:44px;padding-inline:24px}
.collaboration-section-tabs button,.execution-section-tabs button{height:44px;font-size:12px}
.execution-view{padding:16px 22px 24px}
.execution-two-column{align-items:start}
.execution-two-column,.execution-schedule-grid,.execution-project-list{gap:12px}
.execution-focus,.execution-panel,.execution-project{border-radius:6px}
.execution-panel>header{min-height:52px}
.execution-card{padding:14px 16px}
.memory-layout{gap:0;padding:16px 20px 20px}
.memory-list-panel{border-radius:6px 0 0 6px}
.memory-detail{border-radius:0 6px 6px 0}
.memory-list-panel>header{min-height:56px}
.memory-row{min-height:94px;padding:14px 16px}
.chat-head-meta button,
.composer-control button,
.memory-list-panel select,
.customer-os-flow-actions button,
.customer-os-delivery footer button,
.customer-os-links button,
.customer-os-activity-more{min-height:44px}
.chat-head-meta #head-new-thread{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-width:112px;
  min-height:44px;
  padding:0 14px;
  border-color:var(--accent);
  background:var(--accent);
  color:#fff;
  font-weight:700;
  transition:background-color var(--motion-fast) ease,border-color var(--motion-fast) ease;
}
.chat-head-meta #head-new-thread:hover{border-color:var(--accent-hover);background:var(--accent-hover);color:#fff}
.chat-head-meta #head-new-thread:disabled{opacity:.58}
.chat-head-meta #head-new-thread svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
}
.customer-inline-form :is(input,select,button){min-height:44px}

/* Customer detail is a real destination. The board is removed until Back. */
.customer-os-v4.detail-open{grid-template-rows:minmax(0,1fr)}
.customer-os-v4.detail-open>.customer-metrics{display:none}
.customer-os-v4 .customer-workspace.detail-open::before{display:none}
.customer-os-v4 .customer-workspace.detail-open .customer-browser{display:none}
.customer-os-v4 .customer-workspace:not(.detail-open) .customer-detail{display:none}
.customer-os-v4 .customer-detail{
  position:relative;
  inset:auto;
  width:100%;
  height:100%;
  min-height:0;
  z-index:auto;
  border:0;
  box-shadow:none;
  background:var(--customer-canvas);
}
.customer-os-v4 .customer-form{height:100%;min-height:0}
.customer-os-v4 .customer-form-head{
  position:relative;
  top:auto;
  z-index:var(--z-sticky);
  min-height:72px;
  gap:12px;
  padding:12px max(24px,calc((100% - 1180px)/2));
  border-bottom:1px solid var(--customer-line);
  background:#fff;
}
.customer-os-v4 .customer-back{
  flex:0 0 auto;
  padding:0 12px;
  border:1px solid var(--customer-line-strong);
  background:#fff;
  color:#36516e;
  font-size:12px;
  font-weight:700;
}
.customer-os-v4 .customer-back:hover{border-color:#8ca4c0;background:var(--customer-soft);color:var(--customer-navy)}
.customer-os-v4 .customer-form-head h2{font-size:18px}
.customer-os-v4 .customer-detail-tabs{
  min-height:48px;
  display:flex;
  gap:4px;
  padding:0 max(24px,calc((100% - 1180px)/2));
  border-bottom:1px solid var(--customer-line);
}
.customer-os-v4 .customer-detail-tabs button{min-width:128px;padding:0 16px}
.customer-os-v4 .customer-form-scroll{min-height:0;overflow:auto;padding:24px;background:var(--customer-canvas)}
.customer-os-v4 .customer-detail-panel{width:min(1180px,100%);margin:0 auto}
.customer-os-v4 .customer-action-focus,
.customer-os-v4 .customer-os-node-section,
.customer-os-v4 .customer-profile-section,
.customer-os-v4 .customer-os-delivery,
.customer-os-v4 .customer-activity,
.customer-os-v4 .customer-history{padding:24px}
.customer-os-v4 .customer-action-focus>div{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.customer-os-v4 .customer-profile-section .customer-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.customer-os-v4 .customer-os-delivery-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.customer-os-v4 .customer-activity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.customer-os-v4 .customer-events-panel{border-right:1px solid var(--customer-line)}
.customer-os-v4 .customer-history{border-top:1px solid var(--customer-line)}

@media (max-width:1180px){
  .customer-os-v4 .customer-detail{width:100%;height:100%}
  .customer-os-v4 .customer-form-head,
  .customer-os-v4 .customer-detail-tabs{padding-inline:20px}
  .customer-os-v4 .customer-form-scroll{padding:20px}
  .customer-os-v4 .customer-profile-section .customer-grid,
  .customer-os-v4 .customer-os-delivery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:940px){
  .login-view{display:grid;padding:20px}
  .login-shell{width:min(460px,100%);min-height:0;grid-template-columns:1fr}
  .login-intro{min-height:0;padding:24px;border:0}
  .login-copy{margin:32px 0 0}
  .login-copy h1{font-size:26px}
  .login-copy>span{margin-top:10px}
  .workbench-login{padding:28px 24px 32px}
  .thread-sidebar{width:min(260px,86vw);z-index:var(--z-sidebar)}
  .mobile-scrim{z-index:calc(var(--z-sidebar) - 1)}
  .chat-head,.collaboration-head,.execution-head,.memory-head{padding-inline:14px}
  .collaboration-section-tabs,.execution-section-tabs{padding-inline:14px}
  .execution-view{padding:14px}
  .memory-layout{padding:12px}
  .customer-os-v4 .customer-activity-grid{grid-template-columns:1fr}
  .customer-os-v4 .customer-events-panel{border-right:0}
}

@media (max-width:760px){
  .customer-os-v4 .customer-detail{position:fixed;inset:0;width:100%;height:100dvh}
  .customer-os-v4 .customer-form-head{min-height:96px;padding:8px}
  .customer-os-v4 .customer-detail-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:0 8px}
  .customer-os-v4 .customer-detail-tabs button{min-width:0;padding:0 4px}
  .customer-os-v4 .customer-form-scroll{padding:12px}
  .customer-os-v4 .customer-profile-section .customer-grid,
  .customer-os-v4 .customer-os-delivery-grid,
  .customer-os-v4 .customer-action-focus>div{grid-template-columns:1fr}
  .customer-os-v4 .customer-profile-section .span-2,
  .customer-os-v4 .customer-os-delivery-grid .span-2{grid-column:auto}
  .customer-os-v4 .customer-os-node-track{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    overflow:visible;
    padding:0;
  }
  .customer-os-v4 .customer-os-node-track button{
    min-height:44px;
    display:grid;
    grid-template-columns:28px minmax(0,1fr);
    align-items:center;
    gap:8px;
    padding:8px;
    border:1px solid var(--customer-line);
    border-radius:6px;
    background:#fff;
    text-align:left;
  }
  .customer-os-v4 .customer-os-node-track button::before{display:none}
  .customer-os-v4 .customer-os-node-track button i{margin:0}
  .customer-os-v4 .customer-os-node-track button span{margin:0;white-space:normal}
}

@media (max-width:430px){
  .login-view{padding:0;background:#fff}
  .login-shell{width:100%;min-height:100%;border:0;border-radius:0;box-shadow:none}
  .login-intro{padding:22px}
  .login-copy{margin:28px 0 0}
  .login-copy h1{font-size:24px}
  .workbench-login{justify-content:flex-start;padding:28px 22px calc(28px + env(safe-area-inset-bottom))}
  .chat-head-meta #head-new-thread{width:44px;min-width:44px;padding:0}
  .chat-head-meta #head-new-thread span{display:none}
}

/* Workbench UI v5 · Mingde blue glass system.
   This final layer is authoritative for appearance only. Business layout and IDs stay intact. */
:root{
  --mingde-blue-deep:#0B3FA8;
  --mingde-blue:#1E5FD9;
  --mingde-blue-bright:#2B7FFF;
  --mingde-blue-pale:#6BB6FF;
  --mingde-blue-08:rgba(30,95,217,.08);
  --mingde-blue-16:rgba(30,95,217,.16);
  --mingde-pale-16:rgba(107,182,255,.16);
  --mingde-gradient:linear-gradient(135deg,#0B3FA8 0%,#1E5FD9 52%,#2B7FFF 100%);

  --text-92:rgba(10,26,54,.92);
  --text-62:rgba(10,26,54,.62);
  --text-42:rgba(10,26,54,.42);
  --text-26:rgba(10,26,54,.26);

  --semantic-success:#087653;
  --semantic-success-soft:rgba(8,118,83,.12);
  --semantic-warning:#855900;
  --semantic-warning-soft:rgba(133,89,0,.12);
  --semantic-danger:#A72C36;
  --semantic-danger-soft:rgba(167,44,54,.12);
  --semantic-gold:#725000;
  --semantic-gold-soft:rgba(114,80,0,.12);

  --glass-filter-5:blur(40px) saturate(180%);
  --glass-filter-4:blur(28px) saturate(160%);
  --glass-filter-3:blur(18px) saturate(150%);
  --glass-filter-2:blur(10px) saturate(140%);
  --glass-filter-1:blur(4px) saturate(125%);
  --glass-white-5:rgba(255,255,255,.82);
  --glass-white-4:rgba(255,255,255,.72);
  --glass-white-3:rgba(255,255,255,.64);
  --glass-white-2:rgba(255,255,255,.52);
  --glass-white-1:rgba(255,255,255,.38);

  --canvas:#eaf1ff;
  --paper:var(--glass-white-5);
  --paper-soft:var(--glass-white-3);
  --surface:var(--glass-white-5);
  --ink:var(--text-92);
  --ink-1:var(--text-92);
  --ink-2:var(--text-62);
  --muted:var(--text-62);
  --muted-2:var(--text-62);
  --line:rgba(11,63,168,.12);
  --border:rgba(11,63,168,.12);
  --line-strong:rgba(11,63,168,.22);
  --accent:var(--mingde-blue);
  --brand:var(--mingde-blue);
  --accent-hover:var(--mingde-blue-bright);
  --accent-soft:var(--mingde-blue-08);
  --success:var(--semantic-success);
  --danger:var(--semantic-danger);
  --warning:var(--semantic-warning);
  --rail:#071a3b;
  --rail-2:#0b2859;
  --rail-text:rgba(255,255,255,.94);
  --rail-muted:rgba(255,255,255,.64);
  --shadow:0 28px 72px rgba(11,63,168,.14);
  --shadow-soft:0 8px 24px rgba(11,63,168,.08);
  --customer-canvas:rgba(239,245,255,.68);
  --customer-surface:var(--glass-white-5);
  --customer-soft:var(--glass-white-3);
  --customer-line:rgba(11,63,168,.12);
  --customer-line-strong:rgba(11,63,168,.22);
  --customer-navy:var(--text-92);
  --customer-navy-2:var(--text-62);
  --customer-blue:var(--mingde-blue);
  --customer-blue-soft:var(--mingde-blue-08);
  --customer-amber:var(--semantic-warning);
  --customer-amber-soft:var(--semantic-warning-soft);
  --customer-red:var(--semantic-danger);
  --customer-red-soft:var(--semantic-danger-soft);
  --customer-green:var(--semantic-success);
}

:root[data-theme="dark"]{
  --dark-text-94:rgba(248,251,255,.94);
  --dark-text-70:rgba(235,243,255,.70);
  --dark-text-48:rgba(221,233,255,.48);
  --dark-text-28:rgba(214,229,255,.28);
  --canvas:#06152f;
  --paper:rgba(13,36,78,.78);
  --paper-soft:rgba(16,44,92,.58);
  --surface:rgba(13,36,78,.82);
  --ink:var(--dark-text-94);
  --ink-1:var(--dark-text-94);
  --ink-2:var(--dark-text-70);
  --muted:var(--dark-text-70);
  --muted-2:var(--dark-text-70);
  --line:rgba(255,255,255,.12);
  --border:rgba(255,255,255,.12);
  --line-strong:rgba(255,255,255,.20);
  --accent:var(--mingde-blue-bright);
  --brand:var(--mingde-blue-bright);
  --accent-hover:var(--mingde-blue-pale);
  --accent-soft:rgba(43,127,255,.16);
  --semantic-success:#55D6A8;
  --semantic-success-soft:rgba(85,214,168,.12);
  --semantic-warning:#FFD166;
  --semantic-warning-soft:rgba(255,209,102,.12);
  --semantic-danger:#FF7B7B;
  --semantic-danger-soft:rgba(255,123,123,.12);
  --semantic-gold:#F4CA64;
  --semantic-gold-soft:rgba(244,202,100,.12);
  --rail:#03142f;
  --rail-2:#092756;
  --rail-text:var(--dark-text-94);
  --rail-muted:var(--dark-text-70);
  --shadow:0 28px 72px rgba(0,0,0,.20);
  --shadow-soft:0 6px 18px rgba(0,0,0,.12);
  --glass-white-5:rgba(13,36,78,.82);
  --glass-white-4:rgba(13,36,78,.72);
  --glass-white-3:rgba(16,44,92,.62);
  --glass-white-2:rgba(18,48,100,.52);
  --glass-white-1:rgba(21,55,112,.38);
  --customer-canvas:rgba(7,24,52,.70);
  --customer-surface:rgba(13,36,78,.82);
  --customer-soft:rgba(16,44,92,.62);
  --customer-line:rgba(255,255,255,.12);
  --customer-line-strong:rgba(255,255,255,.20);
  --customer-navy:var(--dark-text-94);
  --customer-navy-2:var(--dark-text-70);
  --customer-blue:var(--mingde-blue-bright);
  --customer-blue-soft:rgba(43,127,255,.16);
}

body{
  background:var(--canvas);
  color:var(--ink);
  font-family:"SF Pro Text","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
}
.ambient-glow{
  position:fixed;
  inset:0;
  z-index:0;
  display:block;
  pointer-events:none;
  background:
    radial-gradient(circle at 12% 16%,rgba(107,182,255,.38) 0,rgba(107,182,255,0) 31%),
    radial-gradient(circle at 86% 9%,rgba(43,127,255,.20) 0,rgba(43,127,255,0) 27%),
    radial-gradient(circle at 72% 92%,rgba(11,63,168,.16) 0,rgba(11,63,168,0) 34%),
    linear-gradient(145deg,#f7faff 0%,#eaf1ff 52%,#f4f8ff 100%);
}
:root[data-theme="dark"] .ambient-glow{
  background:
    radial-gradient(circle at 14% 14%,rgba(43,127,255,.24) 0,rgba(43,127,255,0) 34%),
    radial-gradient(circle at 87% 18%,rgba(107,182,255,.10) 0,rgba(107,182,255,0) 26%),
    radial-gradient(circle at 64% 100%,rgba(11,63,168,.22) 0,rgba(11,63,168,0) 36%),
    linear-gradient(145deg,#041126 0%,#071a3a 56%,#06162f 100%);
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible{outline-color:rgba(43,127,255,.36)}

/* Login: one protected doorway, one brand gesture, no marketing split panel. */
.login-view{
  z-index:2;
  padding:28px;
  background:transparent;
}
.login-shell{
  width:min(460px,100%);
  min-height:0;
  grid-template-columns:1fr;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.70);
  border-radius:16px;
  background:var(--glass-white-5);
  box-shadow:0 32px 90px rgba(11,63,168,.20),inset 0 1px 0 rgba(255,255,255,.72);
  -webkit-backdrop-filter:var(--glass-filter-5);
  backdrop-filter:var(--glass-filter-5);
}
:root[data-theme="dark"] .login-shell{
  border-color:rgba(255,255,255,.16);
  box-shadow:0 32px 90px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.08);
}
.login-intro{
  min-height:104px;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:24px 28px;
  border:0;
  background:var(--mingde-gradient);
}
.login-intro .workbench-brand{gap:12px;color:#fff}
.login-intro .brand-mark{
  width:40px;
  height:40px;
  border:1px solid rgba(255,255,255,.36);
  border-radius:10px;
  background:rgba(255,255,255,.16);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.24);
  color:#fff;
  -webkit-backdrop-filter:var(--glass-filter-2);
  backdrop-filter:var(--glass-filter-2);
}
.login-intro .workbench-brand b{font-size:15px;font-weight:700}
.login-intro .workbench-brand small{color:rgba(255,255,255,.70);font-size:11px}
.login-theme-toggle,
.sidebar-theme-toggle{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-width:44px;
  min-height:44px;
}
.login-theme-toggle{
  flex:0 0 44px;
  padding:0;
  border:1px solid rgba(255,255,255,.28);
  border-radius:10px;
  background:rgba(255,255,255,.12);
  color:#fff;
  -webkit-backdrop-filter:var(--glass-filter-2);
  backdrop-filter:var(--glass-filter-2);
}
.login-theme-toggle:hover{background:rgba(255,255,255,.22)}
.login-theme-toggle svg,.sidebar-theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.workbench-login{
  padding:30px 32px 28px;
  background:transparent;
}
.workbench-login header{margin-bottom:24px}
.workbench-login h2{margin:0;color:var(--ink);font-size:24px;font-weight:680;letter-spacing:-.025em}
.workbench-login header p{margin-top:7px;color:var(--text-62);font-size:13px}
:root[data-theme="dark"] .workbench-login header p{color:var(--dark-text-70)}
.field-label{margin:16px 0 8px;color:var(--ink-2);font-size:12px;font-weight:600}
.field-control{
  height:48px;
  border-color:var(--line-strong);
  border-radius:8px;
  background:var(--glass-white-3);
  -webkit-backdrop-filter:var(--glass-filter-3);
  backdrop-filter:var(--glass-filter-3);
}
.field-control:focus-within{border-color:var(--mingde-blue-bright);box-shadow:0 0 0 4px var(--mingde-blue-08)}
.field-control>span{border-right-color:var(--line);color:var(--muted)}
.field-control input{color:var(--ink)}
.password-reveal{color:var(--accent)}
.login-submit{
  height:48px;
  margin-top:24px;
  border:0;
  border-radius:8px;
  background:var(--mingde-gradient);
  box-shadow:0 10px 24px rgba(30,95,217,.20);
  color:#fff;
  transition:filter var(--motion-fast) ease,transform var(--motion-fast) ease,box-shadow var(--motion-fast) ease;
}
.login-submit:hover:not(:disabled){filter:brightness(1.07);transform:translateY(-1px);box-shadow:0 14px 30px rgba(30,95,217,.24)}
.login-submit:active:not(:disabled){transform:translateY(0)}
.workbench-login footer{color:var(--muted)}
.workbench-login footer i{background:var(--semantic-success)}
.form-error{color:var(--semantic-danger)}

/* Shell: dark authority rail over a luminous, quiet operating surface. */
.workbench-app{
  z-index:1;
  grid-template-columns:var(--workbench-sidebar) minmax(0,1fr);
  background:transparent;
}
.thread-sidebar{
  border-right:1px solid rgba(255,255,255,.10);
  background:
    linear-gradient(180deg,rgba(11,63,168,.18),rgba(11,63,168,0) 34%),
    rgba(3,20,47,.88);
  box-shadow:10px 0 32px rgba(3,20,47,.10);
  color:var(--rail-text);
  -webkit-backdrop-filter:var(--glass-filter-4);
  backdrop-filter:var(--glass-filter-4);
}
.sidebar-head{
  border-bottom:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.025);
}
.sidebar-head .brand-mark{
  border:1px solid rgba(255,255,255,.22);
  background:var(--mingde-gradient);
  box-shadow:0 8px 22px rgba(43,127,255,.18);
}
.sidebar-head .workbench-brand b{color:rgba(255,255,255,.94)}
.sidebar-head .icon-button{border-color:transparent;background:transparent;color:rgba(255,255,255,.68)}
.sidebar-head .icon-button:hover{border-color:rgba(255,255,255,.14);background:rgba(255,255,255,.08);color:#fff}
.employee-profile{
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.025);
}
.profile-avatar{border-color:rgba(255,255,255,.16);background:rgba(255,255,255,.10);color:#fff}
.profile-copy b{color:rgba(255,255,255,.92)}
.profile-copy small,.profile-live{color:rgba(255,255,255,.58)}
.profile-live i{background:var(--semantic-success);box-shadow:0 0 0 3px rgba(15,152,103,.18)}
.workspace-mode-switch button{
  border:1px solid transparent;
  border-radius:10px;
  background:transparent;
  color:rgba(255,255,255,.66);
}
.workspace-mode-switch button:hover{border-color:rgba(255,255,255,.08);background:rgba(255,255,255,.06);color:#fff}
.workspace-mode-switch button.active{
  border-color:rgba(107,182,255,.22);
  background:linear-gradient(135deg,rgba(43,127,255,.24),rgba(107,182,255,.10));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
  color:#fff;
}
.workspace-mode-switch button.active svg{color:var(--mingde-blue-pale)}
.thread-section-head,.collaboration-filter-title{border-color:rgba(255,255,255,.08);color:rgba(255,255,255,.60)}
.thread-source-tabs{border-color:rgba(255,255,255,.10);background:rgba(255,255,255,.04)}
.thread-source-tabs button{color:rgba(255,255,255,.56)}
.thread-source-tabs button.active{background:rgba(255,255,255,.12);color:#fff}
#refresh-threads,.collaboration-filter-title button{color:rgba(255,255,255,.58)}
#refresh-threads:hover,.collaboration-filter-title button:hover{background:rgba(255,255,255,.08);color:#fff}
.thread-item{border-color:transparent;background:transparent;color:rgba(255,255,255,.82)}
.thread-item:hover{border-color:rgba(255,255,255,.08);background:rgba(255,255,255,.055)}
.thread-item.active{border-color:rgba(107,182,255,.20);background:rgba(43,127,255,.17);box-shadow:inset 2px 0 0 var(--mingde-blue-pale)}
.thread-item p,.thread-item small{color:rgba(255,255,255,.50)}
.collaboration-side-filters button,.execution-side-nav button,.memory-side-nav button{
  border-color:transparent;
  background:transparent;
  color:rgba(255,255,255,.65);
}
.collaboration-side-filters button:hover,.execution-side-nav button:hover,.memory-side-nav button:hover{background:rgba(255,255,255,.06);color:#fff}
.collaboration-side-filters button.active,.execution-side-nav button.active,.memory-side-nav button.active{
  border-color:rgba(107,182,255,.18);
  background:rgba(43,127,255,.17);
  box-shadow:inset 2px 0 0 var(--mingde-blue-pale);
  color:#fff;
}
.collaboration-side-filters b,.execution-side-nav b,.memory-side-nav b{background:rgba(255,255,255,.10);color:rgba(255,255,255,.72)}
.memory-side-search{border-color:rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:rgba(255,255,255,.58)}
.memory-side-search input{color:#fff}
.memory-side-search input::placeholder{color:rgba(255,255,255,.42)}
.memory-side-note{border-color:rgba(255,255,255,.08);background:rgba(255,255,255,.035);color:rgba(255,255,255,.58)}
.sidebar-foot{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  border-top:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.08);
}
.sidebar-foot>button{
  width:100%;
  height:44px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:8px;
  background:rgba(255,255,255,.045);
  color:rgba(255,255,255,.66);
}
.sidebar-foot>button:hover{border-color:rgba(107,182,255,.24);background:rgba(43,127,255,.12);color:#fff}
.sidebar-foot #logout-button:hover{border-color:rgba(214,69,69,.24);background:rgba(214,69,69,.12);color:#fff}

/* Shared work surfaces. Gradient is a brand signature, not a wallpaper. */
.chat-cockpit,.collaboration-cockpit,.execution-cockpit,.memory-cockpit{background:transparent}
.chat-head,.collaboration-head,.execution-head,.memory-head{
  position:relative;
  border-bottom:1px solid var(--line);
  background:var(--glass-white-4);
  box-shadow:0 1px 0 rgba(255,255,255,.34);
  -webkit-backdrop-filter:var(--glass-filter-4);
  backdrop-filter:var(--glass-filter-4);
}
.chat-head::after,.collaboration-head::after,.execution-head::after,.memory-head::after{
  content:"";
  position:absolute;
  left:24px;
  bottom:-1px;
  width:68px;
  height:2px;
  border-radius:2px;
  background:var(--mingde-gradient);
}
.chat-heading p,.collaboration-heading p{color:var(--accent)}
.chat-heading h1,.collaboration-heading h1,.execution-heading h1,.memory-head h1{color:var(--ink);font-weight:680}
.chat-head-meta>span{color:var(--muted)}
.chat-head-meta #head-new-thread,
.collaboration-primary,
.execution-primary,
.execution-head-actions button:first-child,
.composer-control #send-button,
.chat-empty button{
  border-color:transparent;
  background:var(--mingde-gradient);
  box-shadow:0 8px 20px rgba(30,95,217,.18);
  color:#fff;
}
.chat-head-meta #head-new-thread:hover,
.collaboration-primary:hover,
.execution-primary:hover,
.execution-head-actions button:first-child:hover,
.composer-control #send-button:hover:not(:disabled),
.chat-empty button:hover{border-color:transparent;background:var(--mingde-gradient);filter:brightness(1.07);color:#fff}
.collaboration-secondary,.execution-head-actions button,.memory-head>.memory-head-action{
  border-color:var(--line-strong);
  background:var(--glass-white-3);
  color:var(--ink-2);
  -webkit-backdrop-filter:var(--glass-filter-3);
  backdrop-filter:var(--glass-filter-3);
}
.collaboration-section-tabs,.execution-section-tabs{border-color:var(--line);background:var(--glass-white-3);-webkit-backdrop-filter:var(--glass-filter-3);backdrop-filter:var(--glass-filter-3)}
.collaboration-section-tabs button,.execution-section-tabs button{color:var(--muted)}
.collaboration-section-tabs button.active,.execution-section-tabs button.active{border-bottom-color:var(--accent);color:var(--accent)}

/* Conversation keeps document readability while its structural layers are glass. */
.chat-stream{
  background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,.04));
}
.chat-empty-icon{border-color:var(--line);background:var(--mingde-blue-08);color:var(--accent)}
.message.assistant .message-body{
  border-color:rgba(11,63,168,.12);
  background:var(--glass-white-4);
  box-shadow:0 8px 24px rgba(11,63,168,.055);
  -webkit-backdrop-filter:var(--glass-filter-3);
  backdrop-filter:var(--glass-filter-3);
}
.message.user .message-body{
  border-color:transparent;
  background:var(--mingde-gradient);
  box-shadow:0 10px 28px rgba(30,95,217,.16);
  color:#fff;
}
.message.user .message-body :is(strong,a,code){color:#fff}
.message-body>blockquote.message-quote{background:var(--mingde-blue-08)}
.message-body code.message-code{background:var(--mingde-blue-08);color:var(--accent)}
.message-body>table.message-table,.message-body>table.message-table th{background:var(--glass-white-4)}
.message-body>table.message-table tbody tr:nth-child(even){background:var(--mingde-blue-08)}
.message-body>table.message-table tbody tr:hover{background:var(--mingde-blue-16)}
.composer{
  border-top-color:var(--line);
  background:var(--glass-white-4);
  -webkit-backdrop-filter:var(--glass-filter-5);
  backdrop-filter:var(--glass-filter-5);
}
.composer-control{
  border-color:var(--line-strong);
  background:var(--glass-white-5);
  box-shadow:0 8px 24px rgba(11,63,168,.07),inset 0 1px 0 rgba(255,255,255,.52);
  -webkit-backdrop-filter:var(--glass-filter-3);
  backdrop-filter:var(--glass-filter-3);
}
.composer-control:focus-within{border-color:var(--accent);box-shadow:0 0 0 4px var(--mingde-blue-08),0 10px 26px rgba(11,63,168,.08)}
.composer-control textarea{color:var(--ink)}
.composer-control .attachment-button{color:var(--muted)}
.composer-control .attachment-button:hover:not(:disabled){background:var(--mingde-blue-08);color:var(--accent)}
.composer-task-action,.composer-attachment{border-color:var(--line);background:var(--glass-white-3);-webkit-backdrop-filter:var(--glass-filter-3);backdrop-filter:var(--glass-filter-3)}

/* Collaboration, execution and memory share a calm glass hierarchy. */
.collaboration-workspace,.execution-view,.memory-layout{background:transparent}
.collaboration-browser,.collaboration-detail,
.execution-focus,.execution-panel,.execution-project,
.memory-list-panel,.memory-detail{
  border-color:var(--line);
  background:var(--glass-white-4);
  box-shadow:0 10px 28px rgba(11,63,168,.055);
  -webkit-backdrop-filter:var(--glass-filter-3);
  backdrop-filter:var(--glass-filter-3);
}
.collaboration-row,.execution-card,.memory-row{border-color:var(--line);background:rgba(255,255,255,.34)}
.collaboration-row:hover,.execution-card:hover,.memory-row:hover{background:var(--mingde-blue-08)}
.collaboration-row.active,.memory-row.active{background:var(--mingde-blue-16);box-shadow:inset 2px 0 0 var(--accent)}
.execution-metrics{
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--glass-white-4);
  -webkit-backdrop-filter:var(--glass-filter-3);
  backdrop-filter:var(--glass-filter-3);
}
.execution-metrics>div{border-color:var(--line)}
.execution-metrics>div,.collaboration-metrics>div,.customer-metrics>button{background:transparent}
.execution-panel>header,.memory-list-panel>header{border-color:var(--line);background:rgba(255,255,255,.18)}
.execution-panel>header>b{background:var(--mingde-blue-08);color:var(--accent)}
.execution-project-step i{background:var(--mingde-blue-08)}
.execution-project-step i b{background:var(--mingde-gradient)}
.execution-health{background:var(--semantic-success-soft);color:var(--semantic-success)}
.execution-project.is-attention .execution-health{background:var(--semantic-warning-soft);color:var(--semantic-warning)}
.execution-project.is-risk .execution-health{background:var(--semantic-danger-soft);color:var(--semantic-danger)}
.memory-row.is-confirmed>i{border-color:var(--semantic-success);background:var(--semantic-success)}
.memory-row.is-candidate>i{border-color:var(--semantic-warning);background:var(--semantic-warning-soft)}
.memory-detail-source,.memory-evidence,.memory-history{border-color:var(--line);background:var(--glass-white-3)}

/* Customer operating console keeps density but loses the disconnected CRM look. */
.customer-os-v3{
  --customer-canvas:rgba(239,245,255,.62);
  --customer-surface:var(--glass-white-5);
  --customer-soft:var(--glass-white-3);
}
.customer-os-v3 .customer-metrics{
  gap:1px;
  border-bottom-color:var(--customer-line);
  background:var(--customer-line);
}
.customer-os-v3 .customer-metrics>article{
  border:0;
  background:var(--glass-white-4);
  -webkit-backdrop-filter:var(--glass-filter-3);
  backdrop-filter:var(--glass-filter-3);
}
.customer-os-v3 .customer-metrics>article:first-child{background:linear-gradient(135deg,var(--semantic-warning-soft),var(--glass-white-4))}
.customer-os-v3 .customer-metrics>article:nth-child(2){background:linear-gradient(135deg,var(--semantic-danger-soft),var(--glass-white-4))}
.customer-os-v3 .customer-metrics>article:nth-child(3){background:linear-gradient(135deg,var(--mingde-blue-16),var(--glass-white-4))}
.customer-os-v3 .customer-metrics>article span{color:var(--muted)}
.customer-os-v3 .customer-metrics>article small{color:var(--muted-2)}
.customer-os-v3 .customer-toolbar{
  border-color:var(--customer-line);
  background:var(--glass-white-4);
  -webkit-backdrop-filter:var(--glass-filter-4);
  backdrop-filter:var(--glass-filter-4);
}
.customer-os-v3 .customer-toolbar :is(label,button){border-color:var(--customer-line-strong);background:var(--glass-white-3);color:var(--customer-navy-2)}
.customer-os-v3 .customer-toolbar :is(label,button):hover{border-color:var(--customer-blue);background:var(--customer-blue-soft);color:var(--customer-blue)}
.customer-os-v3 #customer-agent-entry{border-color:transparent;background:var(--mingde-gradient);color:#fff}
.customer-os-v3 .customer-pipeline{gap:8px;padding:8px;background:transparent}
.customer-os-v3 .customer-phase{
  overflow:hidden;
  border:1px solid var(--customer-line);
  border-radius:10px;
  background:var(--glass-white-3);
  box-shadow:0 8px 24px rgba(11,63,168,.05);
  -webkit-backdrop-filter:var(--glass-filter-3);
  backdrop-filter:var(--glass-filter-3);
}
.customer-os-v3 .customer-phase-head{border:0;background:var(--mingde-gradient)}
.customer-os-v3 .customer-phase-head>span{color:rgba(255,255,255,.72)}
.customer-os-v3 .customer-phase-head small{color:rgba(255,255,255,.62)}
.customer-os-v3 .customer-phase-lanes{gap:1px;background:var(--customer-line)}
.customer-os-v3 .customer-stage>header{border-color:var(--customer-line);background:var(--glass-white-4)}
.customer-os-v3 .customer-stage>header b{background:var(--mingde-blue-08);color:var(--customer-blue)}
.customer-os-v3 .customer-stage-list{background:rgba(255,255,255,.16)}
.customer-os-v3 .customer-row{border-color:var(--customer-line);background:rgba(255,255,255,.52)}
.customer-os-v3 .customer-row:hover{background:rgba(255,255,255,.78)}
.customer-os-v3 .customer-row.active{background:var(--customer-blue-soft);box-shadow:inset 2px 0 0 var(--customer-blue)}
.customer-os-v3 .customer-row.is-risk{background:var(--semantic-danger-soft)}
.customer-os-v3 .customer-row.is-stale{background:var(--semantic-warning-soft)}
.customer-os-v3 .customer-row-action{color:var(--customer-navy-2)}
.customer-os-v3 .customer-row-action small,.customer-os-v3 .customer-os-follow{color:var(--muted)}
.customer-os-v3 .customer-row-blocker{background:var(--semantic-warning-soft);color:var(--semantic-warning)}
.customer-os-v4 .customer-detail{background:transparent}
.customer-os-v4 .customer-form-head,.customer-os-v4 .customer-detail-tabs{
  border-color:var(--customer-line);
  background:var(--glass-white-4);
  -webkit-backdrop-filter:var(--glass-filter-4);
  backdrop-filter:var(--glass-filter-4);
}
.customer-os-v4 .customer-form-scroll{background:transparent}
.customer-os-v4 .customer-action-focus,
.customer-os-v4 .customer-os-node-section,
.customer-os-v4 .customer-profile-section,
.customer-os-v4 .customer-os-delivery,
.customer-os-v4 .customer-activity,
.customer-os-v4 .customer-history{
  border-color:var(--customer-line);
  background:var(--glass-white-4);
  -webkit-backdrop-filter:var(--glass-filter-3);
  backdrop-filter:var(--glass-filter-3);
}

/* Overlays are the strongest glass; semantic feedback keeps exact 12% tints. */
.execution-modal-scrim,.customer-modal-scrim{background:rgba(3,20,47,.48);-webkit-backdrop-filter:var(--glass-filter-1);backdrop-filter:var(--glass-filter-1)}
.execution-dialog,.customer-modal-card,.customer-form{
  border:1px solid var(--line-strong);
  background:var(--glass-white-5);
  box-shadow:0 30px 80px rgba(3,20,47,.24);
  -webkit-backdrop-filter:var(--glass-filter-5);
  backdrop-filter:var(--glass-filter-5);
}
.workbench-toast{
  z-index:var(--z-toast);
  border-color:rgba(255,255,255,.16);
  background:rgba(7,26,59,.88);
  box-shadow:0 18px 44px rgba(3,20,47,.18);
  -webkit-backdrop-filter:var(--glass-filter-4);
  backdrop-filter:var(--glass-filter-4);
}
.workbench-toast.error{background:rgba(214,69,69,.92)}
.status-success,.is-success{background:var(--semantic-success-soft);color:var(--semantic-success)}
.status-warning,.is-warning{background:var(--semantic-warning-soft);color:var(--semantic-warning)}
.status-error,.is-error{background:var(--semantic-danger-soft);color:var(--semantic-danger)}
.status-highlight,.is-highlight{background:var(--semantic-gold-soft);color:var(--semantic-gold)}

/* Dark is designed independently: deep blue fields, floating white borders, weak shadow. */
:root[data-theme="dark"] :is(
  .field-control,.composer-control,.composer-task-action,.composer-attachment,
  .collaboration-row,.execution-card,.memory-row,.execution-panel>header,.memory-list-panel>header,
  .customer-os-v3 .customer-metrics>article,.customer-os-v3 .customer-toolbar,
  .customer-os-v3 .customer-toolbar label,.customer-os-v3 .customer-toolbar button,
  .customer-os-v3 .customer-stage>header,.customer-os-v3 .customer-row,
  .customer-os-v4 .customer-form-head,.customer-os-v4 .customer-detail-tabs
){background:rgba(16,44,92,.62);color:var(--ink)}
:root[data-theme="dark"] :is(input,textarea,select){color:var(--ink)}
:root[data-theme="dark"] :is(input,textarea)::placeholder{color:var(--muted-2)}
:root[data-theme="dark"] .message.user .message-body{color:#fff}
:root[data-theme="dark"] .message-body>pre.message-code-block{border:1px solid rgba(255,255,255,.10);background:#03142f;color:rgba(248,251,255,.90)}
:root[data-theme="dark"] .message-body>table.message-table tbody tr:nth-child(even){background:rgba(43,127,255,.08)}
:root[data-theme="dark"] .customer-os-v3 .customer-row:hover{background:rgba(43,127,255,.12)}
:root[data-theme="dark"] .customer-os-v3 .customer-phase-lanes{background:rgba(255,255,255,.10)}
:root[data-theme="dark"] .customer-os-v4 .customer-back,
:root[data-theme="dark"] .customer-os-v4 .customer-os-node-track button{border-color:var(--line-strong);background:rgba(16,44,92,.66);color:var(--ink-2)}

@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  .login-shell,.chat-head,.collaboration-head,.execution-head,.memory-head,.composer,
  .message.assistant .message-body,.collaboration-browser,.collaboration-detail,
  .execution-focus,.execution-panel,.execution-project,.memory-list-panel,.memory-detail,
  .customer-os-v3 .customer-toolbar,.customer-os-v3 .customer-phase,
  .execution-dialog,.customer-modal-card,.customer-form{background:#fff}
  :root[data-theme="dark"] :is(.login-shell,.chat-head,.collaboration-head,.execution-head,.memory-head,.composer,
  .message.assistant .message-body,.collaboration-browser,.collaboration-detail,
  .execution-focus,.execution-panel,.execution-project,.memory-list-panel,.memory-detail,
  .customer-os-v3 .customer-toolbar,.customer-os-v3 .customer-phase,
  .execution-dialog,.customer-modal-card,.customer-form){background:#0d244e}
}

@media (max-width:940px){
  .thread-sidebar{-webkit-backdrop-filter:var(--glass-filter-3);backdrop-filter:var(--glass-filter-3)}
  .chat-head::after,.collaboration-head::after,.execution-head::after,.memory-head::after{left:14px}
  .customer-os-v3 .customer-pipeline{gap:6px;padding:6px}
}
@media (max-width:760px){
  .login-shell,.composer,.chat-head,.collaboration-head,.execution-head,.memory-head{
    -webkit-backdrop-filter:var(--glass-filter-3);
    backdrop-filter:var(--glass-filter-3);
  }
  .customer-os-v3 .customer-pipeline{padding:0}
  .customer-os-v4 .customer-os-node-track button{background:var(--glass-white-4)}
}
@media (max-width:430px){
  .login-view{padding:12px;background:transparent}
  .login-shell{width:100%;min-height:0;border:1px solid rgba(255,255,255,.58);border-radius:14px;box-shadow:0 22px 64px rgba(11,63,168,.16)}
  .login-intro{min-height:92px;padding:20px}
  .workbench-login{padding:26px 22px calc(24px + env(safe-area-inset-bottom))}
  .sidebar-foot{grid-template-columns:1fr 1fr}
}

@media (prefers-reduced-motion:reduce){
  .login-submit{transition:none}
}

/* My Avatar v2 · reference-aligned task home. All shell overrides are scoped to
   chat mode so Collaboration, Execution and Memory retain their current layout. */
.avatar-home .visually-hidden{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0 0 0 0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.workbench-app[data-workspace-mode="chat"]{
  --avatar-global-rail:76px;
  --avatar-context-rail:270px;
  grid-template-columns:calc(var(--avatar-global-rail) + var(--avatar-context-rail)) minmax(0,1fr);
  background:#f5f8fc;
}
.workbench-app[data-workspace-mode="chat"] .thread-sidebar{
  display:grid;
  grid-template-columns:var(--avatar-global-rail) var(--avatar-context-rail);
  grid-template-rows:64px minmax(0,1fr) auto auto;
  overflow:hidden;
  border-right:1px solid var(--line);
  background:var(--rail);
  box-shadow:none;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.workbench-app[data-workspace-mode="chat"] .sidebar-head{
  grid-column:1;
  grid-row:1;
  min-height:64px;
  justify-content:center;
  padding:10px;
  border-bottom:1px solid rgba(255,255,255,.1);
  background:transparent;
}
.workbench-app[data-workspace-mode="chat"] .sidebar-head .workbench-brand{flex:none}
.workbench-app[data-workspace-mode="chat"] .sidebar-head .workbench-brand>span:last-child,
.workbench-app[data-workspace-mode="chat"] #btn-skill-repo-side{display:none}
.workbench-app[data-workspace-mode="chat"] .sidebar-head .brand-mark{
  width:38px;
  height:38px;
  border:0;
  border-radius:8px;
  background:var(--accent);
  box-shadow:none;
  font-size:17px;
}
.workbench-app[data-workspace-mode="chat"] .employee-profile{
  grid-column:1;
  grid-row:3;
  min-height:56px;
  justify-content:center;
  padding:8px;
  border:0;
  background:transparent;
}
.workbench-app[data-workspace-mode="chat"] .employee-profile .profile-copy,
.workbench-app[data-workspace-mode="chat"] .employee-profile .profile-live{display:none}
.workbench-app[data-workspace-mode="chat"] .employee-profile .profile-avatar{
  width:36px;
  height:36px;
  flex-basis:36px;
  border-color:rgba(255,255,255,.24);
  background:#e8efff;
  color:var(--accent);
}
.workbench-app[data-workspace-mode="chat"] .workspace-mode-switch{
  grid-column:1;
  grid-row:2;
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:8px 7px;
}
.workbench-app[data-workspace-mode="chat"] .workspace-mode-switch button{
  min-height:58px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:5px 2px;
  border:1px solid transparent;
  border-radius:8px;
  color:#aebdd0;
  text-align:center;
}
.workbench-app[data-workspace-mode="chat"] .workspace-mode-switch button:hover{
  border-color:rgba(255,255,255,.1);
  background:rgba(255,255,255,.06);
}
.workbench-app[data-workspace-mode="chat"] .workspace-mode-switch button.active{
  border-color:rgba(107,182,255,.28);
  background:#173a68;
  box-shadow:none;
  color:#fff;
}
.workbench-app[data-workspace-mode="chat"] .workspace-mode-switch button svg{width:19px;height:19px}
.workbench-app[data-workspace-mode="chat"] .workspace-mode-switch button b{font-size:10px;font-weight:620}
.workbench-app[data-workspace-mode="chat"] .sidebar-foot{
  grid-column:1;
  grid-row:4;
  grid-template-columns:1fr;
  gap:5px;
  padding:7px;
  border-top:1px solid rgba(255,255,255,.1);
  background:transparent;
}
.workbench-app[data-workspace-mode="chat"] .sidebar-foot>button{
  height:40px;
  min-height:40px;
  padding:0 4px;
  border-color:transparent;
  background:transparent;
  font-size:10px;
}
.workbench-app[data-workspace-mode="chat"] .sidebar-theme-toggle span{display:none}

.workbench-app[data-workspace-mode="chat"] #chat-sidebar-panel{
  grid-column:2;
  grid-row:1/5;
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:0;
  border-right:1px solid var(--line);
  background:#f8fafc;
  color:var(--ink);
}
.avatar-context-head{
  min-height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 14px;
  border-bottom:1px solid var(--line);
  background:#fff;
}
.avatar-context-head>div{min-width:0;display:flex;flex-direction:column}
.avatar-context-head b{font-size:16px;font-weight:720}
.avatar-context-head span{margin-top:3px;color:var(--muted);font-size:11px}
.avatar-context-head button{
  width:44px;
  height:44px;
  display:grid;
  flex:0 0 44px;
  place-items:center;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  color:var(--accent);
}
.avatar-context-head button:hover{border-color:var(--accent);background:var(--accent-soft)}
.avatar-context-head svg,.avatar-new-task svg,.avatar-thread-search svg{
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.avatar-new-task{
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin:12px 12px 8px;
  border:1px solid var(--accent);
  border-radius:6px;
  background:var(--accent);
  color:#fff;
  font-size:13px;
  font-weight:700;
  transition:background-color var(--motion-fast) var(--ease),transform var(--motion-instant) var(--ease);
}
.avatar-new-task:hover{background:var(--accent-hover)}
.avatar-new-task:active{transform:translateY(1px)}
.avatar-new-task:disabled{opacity:.55}
.workbench-app[data-workspace-mode="chat"] .thread-section-head{
  min-height:42px;
  padding:3px 12px;
  border:0;
  color:var(--muted);
}
.workbench-app[data-workspace-mode="chat"] .thread-source-tabs{
  height:36px;
  flex:1;
  padding:3px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#eef2f7;
}
.workbench-app[data-workspace-mode="chat"] .thread-source-tabs button{
  height:28px;
  border:0;
  border-radius:5px;
  color:var(--muted);
  font-size:11px;
}
.workbench-app[data-workspace-mode="chat"] .thread-source-tabs button.active{
  background:#fff;
  color:var(--accent);
  box-shadow:0 1px 2px rgba(15,32,57,.08);
}
.workbench-app[data-workspace-mode="chat"] #refresh-threads{
  width:36px;
  height:36px;
  flex:0 0 36px;
  color:var(--muted);
}
.workbench-app[data-workspace-mode="chat"] #refresh-threads:hover{background:#eef2f7;color:var(--accent)}
.avatar-thread-search{
  min-height:42px;
  display:flex;
  align-items:center;
  gap:8px;
  margin:5px 12px 8px;
  padding:0 11px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  color:var(--muted);
}
.avatar-thread-search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(43,99,229,.11)}
.avatar-thread-search input{
  min-width:0;
  width:100%;
  height:40px;
  border:0;
  background:transparent;
  color:var(--ink);
  font-size:12px;
}
.avatar-thread-search input::placeholder{color:#667991}
.workbench-app[data-workspace-mode="chat"] .thread-list{flex:1;min-height:0;padding:4px 9px 10px}
.workbench-app[data-workspace-mode="chat"] .thread-item{
  min-height:66px;
  margin-bottom:3px;
  padding:10px;
  border:1px solid transparent;
  border-radius:7px;
  background:transparent;
  color:var(--ink-2);
}
.workbench-app[data-workspace-mode="chat"] .thread-item::before{border-color:#94a3b8}
.workbench-app[data-workspace-mode="chat"] .thread-item:hover{border-color:var(--line);background:#fff}
.workbench-app[data-workspace-mode="chat"] .thread-item.active{
  border-color:#c7d6f5;
  background:#edf3ff;
  box-shadow:none;
}
.workbench-app[data-workspace-mode="chat"] .thread-item.active::before{border-color:var(--accent);background:var(--accent)}
.workbench-app[data-workspace-mode="chat"] .thread-item-copy b{color:var(--ink);font-size:12px}
.workbench-app[data-workspace-mode="chat"] .thread-item-copy span{color:var(--muted);font-size:11px}
.workbench-app[data-workspace-mode="chat"] .thread-item-copy time{color:#667991;font-size:10px}
.workbench-app[data-workspace-mode="chat"] .thread-list-empty,
.workbench-app[data-workspace-mode="chat"] .thread-list-error{color:var(--muted)}
.workbench-app[data-workspace-mode="chat"] .thread-list-error button{border-color:var(--line);background:#fff;color:var(--accent)}
.workbench-app[data-workspace-mode="chat"] .thread-list-loading i,
.workbench-app[data-workspace-mode="chat"] .thread-list-loading span{background:#e7edf5}
.avatar-context-note{
  margin:0;
  padding:10px 12px 12px;
  border-top:1px solid var(--line);
  color:#667991;
  font-size:10px;
  line-height:1.55;
}

.workbench-app[data-workspace-mode="chat"] .chat-head{
  min-height:64px;
  padding:8px 24px;
  background:#fff;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
  box-shadow:none;
}
.workbench-app[data-workspace-mode="chat"] .chat-head::after{display:none}
.workbench-app[data-workspace-mode="chat"] .chat-heading p{color:var(--success)}
.workbench-app[data-workspace-mode="chat"] .chat-heading h1{font-size:18px;font-weight:720}
.workbench-app[data-workspace-mode="chat"] .chat-head-meta #head-new-thread{
  border:1px solid var(--accent);
  border-radius:6px;
  background:var(--accent);
  box-shadow:none;
}
.workbench-app[data-workspace-mode="chat"] .avatar-context-head #avatar-sidebar-new-thread{color:var(--accent)}
.workbench-app[data-workspace-mode="chat"] .chat-stream{
  background:#f5f8fc;
  scrollbar-gutter:stable;
}
.workbench-app[data-workspace-mode="chat"] .chat-cockpit.avatar-home-mode .chat-stream{padding:0}
.workbench-app[data-workspace-mode="chat"] .chat-cockpit.avatar-home-mode>.composer{display:none}

.avatar-home{
  min-height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:50px 32px 44px;
  color:var(--ink);
}
.avatar-home-identity{
  display:inline-flex;
  align-items:center;
  gap:9px;
  margin-bottom:18px;
  color:var(--muted);
  font-size:12px;
}
.avatar-home-orb{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:var(--accent);
  color:#fff;
}
.avatar-home-orb svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.avatar-home-online{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:3px 7px;
  border-radius:999px;
  background:#e9f8f3;
  color:#087964;
  font-size:10px;
  font-weight:650;
}
.avatar-home-online i{width:5px;height:5px;border-radius:50%;background:#07836d}
.avatar-home h2{
  margin:0;
  color:#10203a;
  font-size:34px;
  font-weight:740;
  letter-spacing:-.03em;
  line-height:1.2;
  text-align:center;
  text-wrap:balance;
}
.avatar-home-subtitle{
  max-width:68ch;
  margin:12px 0 22px;
  color:var(--muted);
  font-size:14px;
  line-height:1.65;
  text-align:center;
  text-wrap:pretty;
}
.avatar-task-composer{
  width:min(900px,100%);
  overflow:hidden;
  border:1px solid var(--line-strong);
  border-radius:14px;
  background:#fff;
  box-shadow:0 4px 8px rgba(15,32,57,.07);
  transition:border-color var(--motion-fast) var(--ease);
}
.avatar-task-composer:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(43,99,229,.11)}
.avatar-task-composer textarea{
  width:100%;
  min-height:132px;
  max-height:260px;
  resize:vertical;
  padding:20px 21px 8px;
  border:0;
  background:transparent;
  color:var(--ink);
  font-size:15px;
  line-height:1.7;
}
.avatar-task-composer textarea::placeholder{color:#667991;opacity:1}
.avatar-home-attachments{padding:0 12px 6px}
.avatar-composer-toolbar{
  min-height:56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:7px 10px 9px 12px;
}
.avatar-composer-toolbar>div{display:flex;align-items:center;gap:3px}
.avatar-composer-action{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:0 10px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:var(--muted);
  font-size:12px;
}
.avatar-composer-action:hover{background:#eef2f7;color:var(--ink)}
.avatar-composer-action:disabled{opacity:.45}
.avatar-composer-action svg,.avatar-home-send svg,
.avatar-context-belt svg,.avatar-suggestions svg,.avatar-recent-item svg{
  width:18px;
  height:18px;
  flex:none;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.avatar-home-send{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border:1px solid var(--accent);
  border-radius:9px;
  background:var(--accent);
  color:#fff;
  transition:background-color var(--motion-fast) var(--ease),transform var(--motion-instant) var(--ease);
}
.avatar-home-send:hover{background:var(--accent-hover)}
.avatar-home-send:active{transform:translateY(1px)}
.avatar-home-send:disabled{opacity:.5}
.avatar-home-send.is-loading svg{animation:avatar-spin 800ms linear infinite}

.avatar-context-belt{
  width:min(900px,100%);
  display:grid;
  grid-template-columns:1.05fr 1.2fr 1.15fr 1.05fr;
  margin-top:10px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
}
.avatar-belt-item{
  min-width:0;
  display:grid;
  grid-template-columns:18px minmax(0,1fr);
  gap:8px;
  padding:12px 13px;
  border-right:1px solid var(--line);
  color:var(--muted);
}
.avatar-belt-item:last-child{border-right:0}
.avatar-belt-item small{display:block;margin-bottom:3px;color:#667991;font-size:10px}
.avatar-belt-item strong{display:block;overflow:hidden;color:var(--ink-2);font-size:11px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}

.avatar-suggestion-section,.avatar-recent-section{width:min(900px,100%)}
.avatar-suggestion-section{margin-top:30px}
.avatar-suggestion-section>header,.avatar-recent-section>header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.avatar-suggestion-section>header strong,.avatar-recent-section>header strong{font-size:13px}
.avatar-suggestion-section>header span,.avatar-recent-section>header span{color:#667991;font-size:10px}
.avatar-suggestions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.avatar-suggestions>button{
  min-height:108px;
  padding:15px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  color:var(--ink);
  text-align:left;
  transition:border-color var(--motion-fast) var(--ease),background-color var(--motion-fast) var(--ease),transform var(--motion-fast) var(--ease);
}
.avatar-suggestions>button:hover{border-color:#b9c9ee;background:#fbfdff;transform:translateY(-2px)}
.avatar-suggestions>button>span{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;color:var(--accent)}
.avatar-suggestions small{color:#667991;font-size:10px}
.avatar-suggestions strong{display:block;margin-bottom:5px;font-size:13px}
.avatar-suggestions p{margin:0;color:var(--muted);font-size:11px;line-height:1.55}
.avatar-recent-section{margin-top:19px;padding-top:13px;border-top:1px solid var(--line)}
.avatar-recent-item{
  width:100%;
  min-height:54px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:9px 2px;
  border:0;
  border-bottom:1px solid var(--line);
  background:transparent;
  color:var(--ink);
  text-align:left;
}
.avatar-recent-item:hover strong{color:var(--accent)}
.avatar-recent-item strong{display:block;font-size:12px}
.avatar-recent-item p{margin:3px 0 0;color:var(--muted);font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.avatar-recent-item>span{display:flex;align-items:center;gap:4px;color:#667991;font-size:10px}

.avatar-mobile-nav{display:none}

:root[data-theme="dark"] .workbench-app[data-workspace-mode="chat"]{background:#07172f}
:root[data-theme="dark"] .workbench-app[data-workspace-mode="chat"] #chat-sidebar-panel,
:root[data-theme="dark"] .workbench-app[data-workspace-mode="chat"] .chat-stream{background:#0a2044}
:root[data-theme="dark"] .avatar-context-head,
:root[data-theme="dark"] .avatar-task-composer,
:root[data-theme="dark"] .avatar-context-belt,
:root[data-theme="dark"] .avatar-suggestions>button{background:#102c59;border-color:rgba(255,255,255,.14)}
:root[data-theme="dark"] .avatar-context-head,
:root[data-theme="dark"] .avatar-home,
:root[data-theme="dark"] .avatar-home h2,
:root[data-theme="dark"] .avatar-task-composer textarea,
:root[data-theme="dark"] .avatar-suggestions>button{color:#f4f8ff}
:root[data-theme="dark"] .avatar-home h2{color:#f4f8ff}
:root[data-theme="dark"] .avatar-home-subtitle,
:root[data-theme="dark"] .avatar-home-identity,
:root[data-theme="dark"] .avatar-suggestions p,
:root[data-theme="dark"] .avatar-recent-item p{color:#b6c7df}
:root[data-theme="dark"] .avatar-belt-item strong,
:root[data-theme="dark"] .avatar-suggestions strong,
:root[data-theme="dark"] .avatar-recent-item{color:#eef4ff}
:root[data-theme="dark"] .avatar-thread-search,
:root[data-theme="dark"] .avatar-context-head button{background:#102c59;border-color:rgba(255,255,255,.14);color:#c6d7ef}
:root[data-theme="dark"] .avatar-thread-search input{color:#fff}
:root[data-theme="dark"] .workbench-app[data-workspace-mode="chat"] .thread-item-copy b{color:#eef4ff}
:root[data-theme="dark"] .workbench-app[data-workspace-mode="chat"] .thread-item-copy span,
:root[data-theme="dark"] .workbench-app[data-workspace-mode="chat"] .thread-item-copy time{color:#afc1db}
:root[data-theme="dark"] .workbench-app[data-workspace-mode="chat"] .thread-item:hover{background:#102c59}
:root[data-theme="dark"] .workbench-app[data-workspace-mode="chat"] .thread-item.active{background:#14386f;border-color:#2b63e5}

@media (max-width:940px){
  .workbench-app[data-workspace-mode="chat"]{grid-template-columns:minmax(0,1fr)}
  .workbench-app[data-workspace-mode="chat"] .thread-sidebar{
    position:fixed;
    inset:0 auto 0 0;
    z-index:var(--z-sidebar);
    width:min(346px,90vw);
    grid-template-columns:76px minmax(0,1fr);
    transform:translateX(-102%);
    transition:transform var(--motion-standard) var(--ease);
    box-shadow:12px 0 30px rgba(6,20,39,.2);
  }
  .workbench-app[data-workspace-mode="chat"] .thread-sidebar.open{transform:translateX(0)}
  .avatar-context-belt{grid-template-columns:repeat(2,minmax(0,1fr))}
  .avatar-belt-item:nth-child(2){border-right:0}
  .avatar-belt-item:nth-child(-n+2){border-bottom:1px solid var(--line)}
  .avatar-suggestions{grid-template-columns:1fr}
  .avatar-suggestions>button{min-height:auto}
  .workbench-app[data-workspace-mode="chat"] .chat-heading p,
  .workbench-app[data-workspace-mode="chat"] .chat-head-meta{display:none}
}

@media (min-width:941px){
  .workbench-app[data-workspace-mode="chat"] .chat-head{display:none}
}

@media (max-width:760px){
  .workbench-app[data-workspace-mode="chat"] .chat-cockpit{height:calc(100% - 66px)}
  .workbench-app[data-workspace-mode="chat"] .chat-head{min-height:58px;padding:6px 12px}
  .workbench-app[data-workspace-mode="chat"] .chat-head-meta>span,
  .workbench-app[data-workspace-mode="chat"] .chat-head-meta #head-new-thread{display:none}
  .avatar-home{padding:34px 14px 32px}
  .avatar-home-identity{margin-bottom:15px}
  .avatar-home h2{font-size:29px}
  .avatar-home-subtitle{margin:11px 0 20px;font-size:12px}
  .avatar-task-composer textarea{min-height:150px;padding:17px 16px 6px;font-size:14px}
  .avatar-composer-action{padding-inline:8px}
  .avatar-composer-action span{display:none}
  .avatar-context-belt{grid-template-columns:1fr}
  .avatar-belt-item{border-right:0;border-bottom:1px solid var(--line)}
  .avatar-belt-item:last-child{border-bottom:0}
  .avatar-suggestion-section{margin-top:23px}
  .workbench-app[data-workspace-mode="chat"] .avatar-mobile-nav{
    position:fixed;
    z-index:var(--z-sticky);
    right:0;
    bottom:0;
    left:0;
    height:66px;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    padding:5px 6px calc(5px + env(safe-area-inset-bottom));
    border-top:1px solid var(--line);
    background:#fff;
  }
  .workbench-app[data-workspace-mode="chat"] .avatar-mobile-nav button{
    min-width:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    border:0;
    background:transparent;
    color:#71839a;
    font-size:9px;
  }
  .workbench-app[data-workspace-mode="chat"] .avatar-mobile-nav button.active{color:var(--accent)}
  .workbench-app[data-workspace-mode="chat"] .avatar-mobile-nav svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  :root[data-theme="dark"] .workbench-app[data-workspace-mode="chat"] .avatar-mobile-nav{border-color:rgba(255,255,255,.14);background:#081b38}
}

@media (max-width:430px){
  .avatar-home{padding-inline:12px}
  .avatar-home h2{font-size:27px}
  .avatar-home-identity{gap:7px;font-size:11px}
  .avatar-home-orb{width:32px;height:32px}
  .avatar-task-composer{border-radius:12px}
  .avatar-suggestion-section>header,.avatar-recent-section>header{align-items:flex-start;flex-direction:column;gap:3px}
}

@keyframes avatar-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){
  .avatar-new-task,.avatar-task-composer,.avatar-home-send,.avatar-suggestions>button,
  .workbench-app[data-workspace-mode="chat"] .thread-sidebar{transition-duration:.01ms!important}
  .avatar-home-send.is-loading svg{animation:none}
}

/* Personal interaction timeline · owner-scoped ledger evidence. */
.memory-domain-nav{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:4px;
  margin:0 0 12px;
  padding:4px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:6px;
  background:rgba(255,255,255,.04);
}
.memory-domain-nav button{
  min-width:0;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:0 4px;
  border:1px solid transparent;
  border-radius:4px;
  background:transparent;
  color:rgba(255,255,255,.62);
  font-size:10px;
  font-weight:600;
}
.memory-domain-nav button:hover{color:#fff;background:rgba(255,255,255,.06)}
.memory-domain-nav button.active{
  border-color:rgba(107,182,255,.24);
  background:rgba(43,127,255,.16);
  color:#fff;
}
.memory-domain-nav svg{
  width:16px;
  height:16px;
  flex:0 0 16px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.interaction-range-nav button{justify-content:flex-start}

.interaction-timeline{
  min-width:0;
  min-height:0;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:16px 20px 20px;
  overflow:hidden;
}
.interaction-filter-shell{
  min-width:0;
  flex:0 0 auto;
  display:grid;
  gap:8px;
}
.interaction-filter-bar{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:minmax(136px,180px) minmax(136px,180px) minmax(132px,160px) minmax(132px,160px) auto;
  align-items:end;
  gap:8px;
}
.interaction-filter-bar label{min-width:0;display:flex;flex-direction:column;gap:4px}
.interaction-filter-bar label>span{color:var(--muted);font-size:11px;font-weight:600}
.interaction-filter-bar :is(select,input),
.interaction-filter-bar>button{
  width:100%;
  min-width:0;
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--line-strong);
  border-radius:6px;
  background:var(--paper);
  color:var(--ink-2);
  font-size:12px;
}
.interaction-filter-bar :is(select,input):focus{border-color:var(--accent)}
.interaction-filter-bar>button{width:auto;color:var(--muted);font-weight:600}
.interaction-filter-bar>button:hover{border-color:var(--accent);color:var(--accent)}
.interaction-exact-filters{
  min-width:0;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.interaction-exact-filters summary{
  position:relative;
  min-height:44px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 28px 0 0;
  color:var(--ink-2);
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  list-style:none;
}
.interaction-exact-filters summary::-webkit-details-marker{display:none}
.interaction-exact-filters summary::after{
  content:"";
  position:absolute;
  right:4px;
  width:7px;
  height:7px;
  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;
  transform:rotate(45deg) translateY(-2px);
  transition:transform .16s ease;
}
.interaction-exact-filters[open] summary::after{transform:rotate(225deg) translate(-2px,-2px)}
.interaction-exact-filters summary small{
  margin-left:auto;
  color:var(--muted);
  font-size:10px;
  font-weight:500;
}
.interaction-exact-filters.is-active summary small{color:var(--accent);font-weight:650}
.interaction-exact-filters form{
  display:grid;
  grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) minmax(132px,160px) auto;
  align-items:end;
  gap:8px;
  padding:0 0 12px;
}
.interaction-exact-filters label{min-width:0;display:flex;flex-direction:column;gap:4px}
.interaction-exact-filters label>span{color:var(--muted);font-size:11px;font-weight:600}
.interaction-exact-filters :is(input,select),
.interaction-exact-filters button{
  min-width:0;
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--line-strong);
  border-radius:6px;
  background:var(--paper);
  color:var(--ink-2);
  font-size:12px;
}
.interaction-exact-filters :is(input,select):focus{border-color:var(--accent)}
.interaction-exact-filters button{
  color:var(--accent);
  font-weight:650;
  white-space:nowrap;
}
.interaction-exact-filters button:hover{border-color:var(--accent);background:var(--accent-soft)}

.interaction-timeline-grid{
  min-width:0;
  min-height:0;
  flex:1;
  display:grid;
  grid-template-columns:minmax(380px,.82fr) minmax(480px,1.18fr);
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--paper);
}
.interaction-stream,
.interaction-inspector{min-width:0;min-height:0;background:var(--paper)}
.interaction-stream{display:flex;flex-direction:column;border-right:1px solid var(--line)}
.interaction-stream>header{
  min-height:60px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 16px;
  border-bottom:1px solid var(--line);
}
.interaction-stream>header>div{display:flex;align-items:baseline;gap:8px}
.interaction-stream h2,
.interaction-inspector h2{margin:0;color:var(--ink);font-size:15px;font-weight:680}
.interaction-stream>header span,
.interaction-stream>header small{color:var(--muted);font-size:11px}
.interaction-list{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain}
.interaction-stream>footer{padding:8px 16px;border-top:1px solid var(--line)}
.interaction-stream>footer button{
  width:100%;
  min-height:44px;
  border:1px solid var(--line-strong);
  border-radius:6px;
  background:var(--paper);
  color:var(--ink-2);
  font-size:12px;
  font-weight:600;
}
.interaction-stream>footer button:hover{border-color:var(--accent);color:var(--accent)}
.interaction-day-heading{
  position:sticky;
  top:0;
  z-index:var(--z-sticky);
  padding:8px 16px;
  border-bottom:1px solid var(--line);
  background:var(--paper-soft);
  color:var(--muted);
  font-size:11px;
  font-weight:680;
}
.interaction-row{
  width:100%;
  min-height:88px;
  display:grid;
  grid-template-columns:4px minmax(0,1fr);
  gap:12px;
  padding:12px 16px 12px 12px;
  border:0;
  border-bottom:1px solid var(--line);
  background:var(--paper);
  color:var(--ink);
  text-align:left;
}
.interaction-row:hover{background:var(--paper-soft)}
.interaction-row.active{background:var(--accent-soft);box-shadow:inset 3px 0 var(--accent)}
.interaction-row>i{width:4px;height:100%;min-height:56px;border-radius:2px;background:var(--success)}
.interaction-row.is-user>i{background:var(--accent)}
.interaction-row-body{min-width:0}
.interaction-row-meta{display:flex;align-items:center;gap:8px;min-width:0}
.interaction-row-meta b{color:var(--ink);font-size:12px;font-weight:680}
.interaction-row-meta span{
  padding:2px 4px;
  border-radius:4px;
  background:var(--paper-soft);
  color:var(--muted);
  font-size:10px;
}
.interaction-row-meta time{margin-left:auto;color:var(--muted);font-size:10px;white-space:nowrap}
.interaction-row-body p{
  display:-webkit-box;
  margin:8px 0 0;
  overflow:hidden;
  color:var(--ink-2);
  font-size:12px;
  line-height:1.6;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.interaction-row-body small{display:block;margin-top:8px;color:var(--muted);font-size:10px}
.interaction-list-empty,
.interaction-chain-empty{
  display:grid;
  place-items:center;
  min-height:240px;
  padding:32px;
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
  text-align:center;
}
.interaction-list-loading{display:grid;gap:8px;padding:16px}
.interaction-list-loading i{height:80px;border-radius:4px;background:var(--paper-soft);animation:loadingPulse 1.2s ease-in-out infinite}

.interaction-inspector{display:flex;flex-direction:column;overflow:hidden}
.interaction-detail-empty{
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:40px;
  color:var(--muted);
  text-align:center;
}
.interaction-detail-empty>span{display:none}
.interaction-detail-empty p{max-width:360px;margin:8px 0 0;font-size:12px;line-height:1.6}
.interaction-detail{min-height:0;height:100%;display:flex;flex-direction:column}
.interaction-detail>header{
  min-height:60px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:8px 16px;
  border-bottom:1px solid var(--line);
}
.interaction-detail>header>div{display:flex;align-items:center;gap:8px;min-width:0}
.interaction-detail>header span{color:var(--accent);font-size:11px;font-weight:680}
.interaction-detail>header b{
  padding:4px 8px;
  border-radius:4px;
  background:rgba(18,183,106,.12);
  color:var(--success);
  font-size:10px;
}
.interaction-back{
  display:none;
  min-width:44px;
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--paper);
  color:var(--ink-2);
  font-size:12px;
}
.interaction-detail-body{min-height:0;flex:1;overflow:auto;padding:20px 24px 32px}
.interaction-detail-summary{margin:0;color:var(--ink);font-size:15px;line-height:1.7}
.interaction-detail-meta{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px 24px;
  margin:20px 0 0;
  padding:16px 0;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.interaction-detail-meta div{min-width:0}
.interaction-detail-meta dt{color:var(--muted);font-size:10px}
.interaction-detail-meta dd{margin:4px 0 0;overflow:hidden;color:var(--ink-2);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.interaction-memory-context{
  margin-top:24px;
  padding:20px 0 4px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.interaction-memory-context-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.interaction-memory-context-heading h3{margin:0;color:var(--ink);font-size:13px;font-weight:680}
.interaction-memory-context-heading span{color:var(--muted);font-size:10px}
.interaction-memory-context>p{
  max-width:72ch;
  margin:8px 0 0;
  color:var(--ink-2);
  font-size:11px;
  line-height:1.65;
}
#interaction-memory-context-list{margin-top:12px}
.interaction-memory-context-row{padding:16px 0;border-top:1px solid var(--line)}
.interaction-memory-context-row>div{display:flex;align-items:center;gap:8px}
.interaction-memory-context-row b{color:var(--ink);font-size:12px;font-weight:680}
.interaction-memory-context-row>div span{
  padding:2px 4px;
  border-radius:4px;
  background:var(--accent-soft);
  color:var(--accent);
  font-size:10px;
}
.interaction-memory-context-row>p{margin:8px 0 0;color:var(--ink);font-size:13px;line-height:1.65}
.interaction-memory-context-row dl{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px 24px;
  margin:12px 0 0;
}
.interaction-memory-context-row dl div{min-width:0}
.interaction-memory-context-row dt{color:var(--muted);font-size:10px}
.interaction-memory-context-row dd{
  margin:4px 0 0;
  overflow-wrap:anywhere;
  color:var(--ink-2);
  font-size:11px;
  line-height:1.55;
}
.interaction-memory-context-empty{
  margin:0;
  padding:16px 0;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:11px;
}
.interaction-evidence-block,
.interaction-task-chain{margin-top:24px}
.interaction-evidence-block>div,
.interaction-task-chain>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}
.interaction-evidence-block h3,
.interaction-task-chain h3{margin:0;color:var(--ink);font-size:13px;font-weight:680}
.interaction-evidence-block>div span,
.interaction-task-chain>div:first-child span{color:var(--muted);font-size:10px}
.interaction-evidence-block pre{
  max-height:280px;
  margin:12px 0 0;
  overflow:auto;
  padding:16px;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--paper-soft);
  color:var(--ink-2);
  font:11px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  white-space:pre-wrap;
  word-break:break-word;
}
#interaction-task-chain{position:relative;margin-top:12px;padding-left:4px}
#interaction-task-chain::before{content:"";position:absolute;top:8px;bottom:8px;left:9px;width:1px;background:var(--line-strong)}
.interaction-chain-node{position:relative;display:grid;grid-template-columns:12px minmax(0,1fr);gap:12px;padding:8px 0}
.interaction-chain-node>i{z-index:1;width:12px;height:12px;margin-top:4px;border:3px solid var(--paper);border-radius:50%;background:var(--muted)}
.interaction-chain-node.is-completed>i,
.interaction-chain-node.is-validated>i,
.interaction-chain-node.is-delivered>i,
.interaction-chain-node.is-verified>i,
.interaction-chain-node.is-published>i{background:var(--success)}
.interaction-chain-node.is-running>i,
.interaction-chain-node.is-authoritative_for_task>i{background:var(--accent)}
.interaction-chain-node.is-failed>i,
.interaction-chain-node.is-cancelled>i{background:var(--danger)}
.interaction-chain-node.is-stale>i,
.interaction-chain-node.is-superseded>i{background:var(--warning)}
.interaction-chain-node>div>div{display:flex;align-items:center;gap:8px}
.interaction-chain-node b{color:var(--ink);font-size:12px;font-weight:650}
.interaction-chain-node span{padding:2px 4px;border-radius:4px;background:var(--paper-soft);color:var(--muted);font-size:10px}
.interaction-chain-node p{margin:4px 0 0;color:var(--ink-2);font-size:11px;line-height:1.6}
.interaction-chain-node small{display:block;margin-top:4px;color:var(--muted);font-size:10px}
.interaction-chain-empty{min-height:120px;padding:24px}
.interaction-correction-impact{margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}
.interaction-correction-impact>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}
.interaction-correction-impact h3{margin:0;color:var(--ink);font-size:13px;font-weight:680}
.interaction-correction-impact>div:first-child span{color:var(--muted);font-size:10px}
.interaction-correction-impact>p{margin:8px 0 0;color:var(--ink-2);font-size:11px;line-height:1.65}
#interaction-correction-impact-list{margin-top:8px}
.interaction-impact-row{
  display:grid;
  grid-template-columns:4px minmax(0,1fr);
  gap:12px;
  padding:12px 0;
  border-bottom:1px solid var(--line);
}
.interaction-impact-row>i{width:4px;height:100%;min-height:44px;border-radius:2px;background:var(--warning)}
.interaction-impact-row.is-retained>i{background:var(--muted)}
.interaction-impact-row>div>div{display:flex;align-items:center;gap:8px}
.interaction-impact-row b{color:var(--ink);font-size:12px;font-weight:650}
.interaction-impact-row span{padding:2px 4px;border-radius:4px;background:var(--paper-soft);color:var(--warning);font-size:10px}
.interaction-impact-row p{margin:4px 0 0;color:var(--ink-2);font-size:11px;line-height:1.6}
.interaction-impact-row small{display:block;margin-top:4px;color:var(--muted);font-size:10px}
.interaction-integrity{margin-top:24px;border-top:1px solid var(--line)}
.interaction-integrity summary{min-height:44px;display:flex;align-items:center;color:var(--muted);font-size:11px;cursor:pointer}
.interaction-integrity dl{display:grid;gap:8px;margin:0;padding:0 0 12px}
.interaction-integrity dl div{display:grid;grid-template-columns:80px minmax(0,1fr);gap:8px}
.interaction-integrity dt{color:var(--muted);font-size:10px}
.interaction-integrity dd{margin:0;overflow:hidden;color:var(--ink-2);font:10px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;text-overflow:ellipsis;white-space:nowrap}
.interaction-detail>footer{display:flex;justify-content:flex-end;padding:8px 16px;border-top:1px solid var(--line)}
.interaction-detail>footer button{
  min-height:44px;
  padding:0 12px;
  border:1px solid rgba(240,68,56,.28);
  border-radius:6px;
  background:var(--paper);
  color:var(--danger);
  font-size:12px;
  font-weight:600;
}
.interaction-detail>footer button.is-confirming{border-color:var(--danger);background:rgba(240,68,56,.08)}

:root[data-theme="dark"] .interaction-timeline-grid,
:root[data-theme="dark"] .interaction-stream,
:root[data-theme="dark"] .interaction-inspector,
:root[data-theme="dark"] .interaction-row,
:root[data-theme="dark"] .interaction-detail,
:root[data-theme="dark"] .interaction-filter-bar :is(select,input),
:root[data-theme="dark"] .interaction-filter-bar>button,
:root[data-theme="dark"] .interaction-exact-filters :is(select,input),
:root[data-theme="dark"] .interaction-exact-filters button,
:root[data-theme="dark"] .interaction-stream>footer button,
:root[data-theme="dark"] .interaction-back,
:root[data-theme="dark"] .interaction-detail>footer button{background:var(--paper)}
:root[data-theme="dark"] .interaction-day-heading,
:root[data-theme="dark"] .interaction-row:hover,
:root[data-theme="dark"] .interaction-row-meta span,
:root[data-theme="dark"] .interaction-evidence-block pre,
:root[data-theme="dark"] .interaction-chain-node span,
:root[data-theme="dark"] .interaction-impact-row span{background:var(--paper-soft)}
:root[data-theme="dark"] .interaction-row.active{background:var(--accent-soft)}

@media (max-width:1180px){
  .interaction-filter-bar{grid-template-columns:repeat(4,minmax(120px,1fr)) auto}
  .interaction-exact-filters form{grid-template-columns:repeat(2,minmax(0,1fr))}
  .interaction-exact-filters button{width:100%}
  .interaction-timeline-grid{grid-template-columns:minmax(340px,.86fr) minmax(420px,1.14fr)}
}

@media (max-width:940px){
  .interaction-timeline{padding:12px}
  .interaction-filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))}
  .interaction-filter-bar>button{width:100%}
  .interaction-timeline-grid{grid-template-columns:minmax(320px,.9fr) minmax(380px,1.1fr)}
}

@media (max-width:760px){
  .interaction-timeline{gap:8px;padding:8px 8px calc(8px + env(safe-area-inset-bottom))}
  .interaction-filter-bar{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .interaction-filter-bar>button{grid-column:1/-1}
  .interaction-exact-filters form{grid-template-columns:1fr}
  .interaction-exact-filters summary{padding-left:4px}
  .interaction-timeline-grid{display:block;overflow:auto}
  .interaction-timeline-grid.has-detail .interaction-stream{display:none}
  .interaction-timeline-grid:not(.has-detail) .interaction-inspector{display:none}
  .interaction-stream,.interaction-inspector{min-height:max(320px,calc(100dvh - 336px));border-right:0}
  .interaction-back{display:block}
  .interaction-detail-body{padding:16px 16px 24px}
}

@media (max-width:430px){
  .memory-domain-nav button{flex-direction:column;gap:2px;font-size:9px}
  .interaction-filter-bar label>span{font-size:10px}
  .interaction-filter-bar :is(select,input),.interaction-filter-bar>button{padding-inline:8px;font-size:11px}
  .interaction-stream>header,.interaction-row,.interaction-stream>footer,.interaction-detail>header,.interaction-detail>footer{padding-inline:12px}
  .interaction-row-meta span{display:none}
  .interaction-detail-meta{grid-template-columns:1fr;gap:12px}
  .interaction-memory-context-row dl{grid-template-columns:1fr;gap:12px}
}

@media (prefers-reduced-motion:reduce){
  .interaction-list-loading i{animation:none}
}

/* Personal memory graph · deterministic source/revision projection. */
.memory-graph{
  min-width:0;
  min-height:0;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:16px 20px 20px;
  overflow:hidden;
}
.memory-graph-summary{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--paper);
}
.memory-graph-summary>div{
  min-width:0;
  min-height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 16px;
  border-right:1px solid var(--line);
}
.memory-graph-summary>div:last-child{border-right:0}
.memory-graph-summary span{color:var(--muted);font-size:11px;font-weight:600}
.memory-graph-summary b{color:var(--ink);font-size:20px;font-weight:720}
.memory-graph-workspace{
  min-width:0;
  min-height:0;
  flex:1;
  display:grid;
  grid-template-columns:minmax(360px,.82fr) minmax(480px,1.18fr);
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--paper);
}
.memory-graph-stream,
.memory-graph-inspector{min-width:0;min-height:0;background:var(--paper)}
.memory-graph-stream{display:flex;flex-direction:column;border-right:1px solid var(--line)}
.memory-graph-stream>header{
  min-height:60px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 16px;
  border-bottom:1px solid var(--line);
}
.memory-graph-stream>header>div{display:flex;align-items:baseline;gap:8px}
.memory-graph-stream h2,
.memory-graph-inspector h2{margin:0;color:var(--ink);font-size:15px;font-weight:680}
.memory-graph-stream>header span,
.memory-graph-stream>header small{color:var(--muted);font-size:11px}
.memory-graph-list{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain}
.memory-graph-row{
  width:100%;
  min-height:92px;
  display:grid;
  grid-template-columns:10px minmax(0,1fr) auto;
  align-items:start;
  gap:12px;
  padding:14px 16px;
  border:0;
  border-bottom:1px solid var(--line);
  background:var(--paper);
  color:var(--ink);
  text-align:left;
}
.memory-graph-row:hover{background:var(--paper-soft)}
.memory-graph-row.active{background:var(--accent-soft)}
.memory-graph-row>i{
  width:8px;
  height:8px;
  margin-top:5px;
  border:2px solid var(--paper);
  border-radius:50%;
  background:var(--success);
  box-shadow:0 0 0 1px var(--success);
}
.memory-graph-row.is-candidate>i{background:var(--warning);box-shadow:0 0 0 1px var(--warning)}
.memory-graph-row.is-superseded>i,
.memory-graph-row.is-forgotten>i{background:var(--muted);box-shadow:0 0 0 1px var(--muted)}
.memory-graph-row-copy{min-width:0}
.memory-graph-row-copy>span{display:block;color:var(--muted);font-size:10px;font-weight:600}
.memory-graph-row-copy h3{
  display:-webkit-box;
  margin:6px 0 0;
  overflow:hidden;
  color:var(--ink);
  font-size:13px;
  font-weight:650;
  line-height:1.55;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.memory-graph-row-copy p{margin:6px 0 0;color:var(--muted);font-size:10px}
.memory-graph-row time{color:var(--muted);font-size:10px;white-space:nowrap}
.memory-graph-list-empty{
  min-height:240px;
  display:grid;
  place-items:center;
  padding:32px;
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
  text-align:center;
}
.memory-graph-list-loading{display:grid;gap:8px;padding:16px}
.memory-graph-list-loading i{height:84px;border-radius:4px;background:var(--paper-soft);animation:loadingPulse 1.2s ease-in-out infinite}
.memory-graph-inspector{display:flex;flex-direction:column;overflow:hidden}
.memory-graph-empty{
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:40px;
  color:var(--muted);
  text-align:center;
}
.memory-graph-empty>span{display:none}
.memory-graph-empty p{max-width:380px;margin:8px 0 0;font-size:12px;line-height:1.6}
.memory-graph-detail{min-height:0;height:100%;display:flex;flex-direction:column}
.memory-graph-detail>header{
  min-height:60px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:8px 16px;
  border-bottom:1px solid var(--line);
}
.memory-graph-detail>header>div{display:flex;align-items:center;gap:8px;min-width:0}
.memory-graph-detail>header span{color:var(--accent);font-size:11px;font-weight:680}
.memory-graph-detail>header b{
  padding:4px 8px;
  border-radius:4px;
  background:rgba(7,131,109,.12);
  color:var(--success);
  font-size:10px;
}
.memory-graph-detail>header b.is-candidate{background:rgba(168,102,11,.12);color:var(--warning)}
.memory-graph-back{
  display:none;
  min-width:44px;
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--paper);
  color:var(--ink-2);
  font-size:12px;
}
.memory-graph-detail-body{min-height:0;flex:1;overflow:auto;padding:20px 24px 32px}
.memory-graph-detail-body>h2{max-width:70ch;font-size:18px;line-height:1.55;text-wrap:pretty}
.memory-graph-detail-body>p{max-width:70ch;margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.65}
.memory-graph-detail-meta{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px 24px;
  margin:20px 0 0;
  padding:16px 0;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.memory-graph-detail-meta div{min-width:0}
.memory-graph-detail-meta dt{color:var(--muted);font-size:10px}
.memory-graph-detail-meta dd{margin:4px 0 0;overflow:hidden;color:var(--ink-2);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.memory-graph-relation-section{margin-top:24px}
.memory-graph-relation-section>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}
.memory-graph-relation-section h3{margin:0;color:var(--ink);font-size:13px;font-weight:680}
.memory-graph-relation-section>div:first-child>span{color:var(--muted);font-size:10px}
#memory-graph-detail-evidence,
#memory-graph-detail-revisions,
#memory-graph-detail-supersedes,
#memory-graph-detail-relations{margin-top:12px;border-top:1px solid var(--line)}
.memory-graph-aliases{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.memory-graph-aliases span{
  max-width:100%;
  padding:5px 8px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--paper-soft);
  color:var(--ink-2);
  font-size:11px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.memory-graph-relation-row{
  width:100%;
  min-height:64px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:5px 12px;
  padding:12px 0;
  border:0;
  border-bottom:1px solid var(--line);
  background:transparent;
  color:var(--ink-2);
  text-align:left;
}
.memory-graph-relation-row span{color:var(--accent);font-size:10px;font-weight:650}
.memory-graph-relation-row.is-active span{color:var(--warning)}
.memory-graph-relation-row p{grid-column:1;margin:0;font-size:12px;line-height:1.6}
.memory-graph-relation-row small{grid-column:2;grid-row:1/3;align-self:center;color:var(--muted);font-size:10px}
.memory-graph-relation-row:hover p{color:var(--accent)}
.memory-graph-evidence-row{padding:12px 0;border-bottom:1px solid var(--line)}
.memory-graph-evidence-row p{margin:0;color:var(--ink-2);font-size:12px;line-height:1.65;white-space:pre-wrap;word-break:break-word}
.memory-graph-evidence-row small{display:block;margin-top:6px;color:var(--muted);font-size:10px}
.memory-graph-revision-row{
  min-height:44px;
  display:grid;
  grid-template-columns:8px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  border-bottom:1px solid var(--line);
}
.memory-graph-revision-row i{width:8px;height:8px;border-radius:50%;background:var(--success)}
.memory-graph-revision-row span{color:var(--ink-2);font-size:12px}
.memory-graph-revision-row time{color:var(--muted);font-size:10px}
.memory-graph-supersedes-row{padding:12px 0;border-bottom:1px solid var(--line)}
.memory-graph-supersedes-row span{color:var(--warning);font-size:10px;font-weight:650}
.memory-graph-supersedes-row p{margin:6px 0 0;color:var(--ink-2);font-size:12px;line-height:1.6}
.memory-graph-relation-empty{margin:0;padding:16px 0;color:var(--muted);font-size:11px;line-height:1.6}

:root[data-theme="dark"] .memory-graph-summary,
:root[data-theme="dark"] .memory-graph-workspace,
:root[data-theme="dark"] .memory-graph-stream,
:root[data-theme="dark"] .memory-graph-inspector,
:root[data-theme="dark"] .memory-graph-row,
:root[data-theme="dark"] .memory-graph-detail,
:root[data-theme="dark"] .memory-graph-back{background:var(--paper)}
:root[data-theme="dark"] .memory-graph-row:hover,
:root[data-theme="dark"] .memory-graph-list-loading i{background:var(--paper-soft)}
:root[data-theme="dark"] .memory-graph-row.active{background:var(--accent-soft)}

@media (max-width:1180px){
  .memory-graph-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
  .memory-graph-summary>div:nth-child(3){border-right:0}
  .memory-graph-summary>div:nth-child(-n+3){border-bottom:1px solid var(--line)}
  .memory-graph-workspace{grid-template-columns:minmax(340px,.86fr) minmax(420px,1.14fr)}
}

@media (max-width:940px){
  .memory-graph{padding:12px}
  .memory-graph-workspace{grid-template-columns:minmax(320px,.9fr) minmax(380px,1.1fr)}
}

@media (max-width:760px){
  .memory-graph{gap:8px;padding:8px 8px calc(8px + env(safe-area-inset-bottom))}
  .memory-graph-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .memory-graph-summary>div{min-height:52px;padding:8px 12px}
  .memory-graph-summary>div:nth-child(odd){border-right:1px solid var(--line)}
  .memory-graph-summary>div:nth-child(even){border-right:0}
  .memory-graph-summary>div:nth-child(-n+4){border-bottom:1px solid var(--line)}
  .memory-graph-workspace{display:block;overflow:auto}
  .memory-graph-workspace.has-detail .memory-graph-stream{display:none}
  .memory-graph-workspace:not(.has-detail) .memory-graph-inspector{display:none}
  .memory-graph-stream,.memory-graph-inspector{min-height:calc(100dvh - 254px);border-right:0}
  .memory-graph-back{display:block}
  .memory-graph-detail-body{padding:16px 16px 24px}
}

@media (max-width:430px){
  .memory-domain-nav button{gap:2px;font-size:9px}
  .memory-heading{min-width:64px}
  .memory-head h1{white-space:nowrap}
  .memory-head-state span{white-space:nowrap}
  .memory-graph-stream>header,.memory-graph-row,.memory-graph-detail>header{padding-inline:12px}
  .memory-graph-stream>header small{display:none}
  .memory-graph-detail-meta{grid-template-columns:1fr;gap:12px}
}

@media (prefers-reduced-motion:reduce){
  .memory-graph-list-loading i{animation:none}
}

/* Reviewed organization memory · independent from private personal memory. */
.memory-private-dot.is-organization{background:var(--accent);box-shadow:0 0 0 3px rgba(43,99,229,.14)}
.memory-organization-section{margin:4px 0 20px;padding:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.memory-organization-section>div{display:flex;align-items:center;justify-content:space-between;gap:12px}
.memory-organization-section h3{margin:0;color:var(--ink);font-size:13px;font-weight:680}
.memory-organization-section span{padding:4px 8px;border-radius:4px;background:var(--paper-soft);color:var(--muted);font-size:10px;font-weight:680}
.memory-organization-section[data-status="submitted"] span,
.memory-organization-section[data-status="updated"] span,
.memory-organization-section[data-status="authorized"] span{background:rgba(168,102,11,.12);color:var(--warning)}
.memory-organization-section[data-status="active"] span{background:rgba(7,131,109,.12);color:var(--success)}
.memory-organization-section[data-status="rejected"] span{background:rgba(193,62,77,.10);color:var(--danger)}
.memory-organization-section p{margin:8px 0 0;color:var(--muted);font-size:11px;line-height:1.65}
#memory-share-revoke.is-confirming{border-color:var(--danger);background:rgba(193,62,77,.08);color:var(--danger)}
.memory-share-confirm small{display:block;margin-top:4px;color:var(--muted);font-size:10px;line-height:1.5}

.organization-memory{
  min-width:0;
  min-height:0;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:16px 20px 20px;
  overflow:hidden;
}
.organization-memory-summary{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--paper);
}
.organization-memory-summary>div{
  min-width:0;
  min-height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 16px;
  border-right:1px solid var(--line);
}
.organization-memory-summary>div:last-child{border-right:0}
.organization-memory-summary span{color:var(--muted);font-size:11px;font-weight:600}
.organization-memory-summary b{color:var(--ink);font-size:20px;font-weight:720}
.organization-memory-workspace{
  min-width:0;
  min-height:0;
  flex:1;
  display:grid;
  grid-template-columns:minmax(360px,.82fr) minmax(480px,1.18fr);
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--paper);
}
.organization-memory-stream,
.organization-memory-inspector{min-width:0;min-height:0;background:var(--paper)}
.organization-memory-stream{display:flex;flex-direction:column;border-right:1px solid var(--line)}
.organization-memory-stream>header{
  min-height:60px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 16px;
  border-bottom:1px solid var(--line);
}
.organization-memory-stream>header>div{display:flex;align-items:baseline;gap:8px}
.organization-memory-stream h2,
.organization-memory-inspector h2{margin:0;color:var(--ink);font-size:15px;font-weight:680}
.organization-memory-stream>header span,
.organization-memory-stream>header small{color:var(--muted);font-size:11px}
.organization-memory-list{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain}
.organization-memory-row{
  width:100%;
  min-height:96px;
  display:grid;
  grid-template-columns:10px minmax(0,1fr) auto;
  align-items:start;
  gap:12px;
  padding:14px 16px;
  border:0;
  border-bottom:1px solid var(--line);
  background:var(--paper);
  color:var(--ink);
  text-align:left;
}
.organization-memory-row:hover{background:var(--paper-soft)}
.organization-memory-row.active{background:var(--accent-soft)}
.organization-memory-row>i{width:8px;height:8px;margin-top:5px;border-radius:50%;background:var(--success)}
.organization-memory-row-copy{min-width:0}
.organization-memory-row-copy>span{display:block;color:var(--accent);font-size:10px;font-weight:650}
.organization-memory-row-copy h3{display:-webkit-box;margin:6px 0 0;overflow:hidden;color:var(--ink);font-size:13px;font-weight:650;line-height:1.55;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.organization-memory-row-copy p{margin:6px 0 0;overflow:hidden;color:var(--muted);font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.organization-memory-row time{color:var(--muted);font-size:10px;white-space:nowrap}
.organization-memory-list-empty{min-height:240px;display:grid;place-items:center;padding:32px;color:var(--muted);font-size:12px;line-height:1.6;text-align:center}
.organization-memory-list-loading{display:grid;gap:8px;padding:16px}
.organization-memory-list-loading i{height:84px;border-radius:4px;background:var(--paper-soft);animation:loadingPulse 1.2s ease-in-out infinite}
.organization-memory-inspector{display:flex;flex-direction:column;overflow:hidden}
.organization-memory-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;color:var(--muted);text-align:center}
.organization-memory-empty>span{display:none}
.organization-memory-empty p{max-width:380px;margin:8px 0 0;font-size:12px;line-height:1.6}
.organization-memory-detail{min-height:0;height:100%;display:flex;flex-direction:column}
.organization-memory-detail>header{min-height:60px;display:flex;align-items:center;gap:12px;padding:8px 16px;border-bottom:1px solid var(--line)}
.organization-memory-detail>header>div{display:flex;align-items:center;gap:8px;min-width:0}
.organization-memory-detail>header span{color:var(--accent);font-size:11px;font-weight:680}
.organization-memory-detail>header b{padding:4px 8px;border-radius:4px;background:rgba(7,131,109,.12);color:var(--success);font-size:10px}
.organization-memory-detail>header b.is-pending{background:rgba(168,102,11,.12);color:var(--warning)}
.organization-memory-back{display:none;min-width:44px;min-height:44px;padding:0 12px;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink-2);font-size:12px}
.organization-memory-detail-body{min-height:0;flex:1;overflow:auto;padding:20px 24px 32px}
.organization-memory-detail-body>h2{max-width:70ch;font-size:18px;line-height:1.55;text-wrap:pretty}
.organization-memory-detail-body>p{max-width:70ch;margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.65}
.organization-memory-detail-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 24px;margin:20px 0 0;padding:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.organization-memory-detail-meta div{min-width:0}
.organization-memory-detail-meta dt{color:var(--muted);font-size:10px}
.organization-memory-detail-meta dd{margin:4px 0 0;overflow:hidden;color:var(--ink-2);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.organization-memory-source-section{margin-top:24px}
.organization-memory-source-section>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}
.organization-memory-source-section h3{margin:0;color:var(--ink);font-size:13px;font-weight:680}
.organization-memory-source-section>div:first-child span{color:var(--muted);font-size:10px}
#organization-memory-detail-sources{margin-top:12px;border-top:1px solid var(--line)}
.organization-memory-source-row{padding:12px 0;border-bottom:1px solid var(--line)}
.organization-memory-source-row span{color:var(--ink-2);font-size:11px;font-weight:650}
.organization-memory-source-row.is-business span{color:var(--accent)}
.organization-memory-source-row.is-pending span{color:var(--warning)}
.organization-memory-source-row p{margin:5px 0 0;color:var(--muted);font-size:11px;line-height:1.6;word-break:break-word}
.organization-memory-review-form{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}
.organization-memory-review-heading h3{margin:0;color:var(--ink);font-size:15px;font-weight:680}
.organization-memory-review-heading p{margin:6px 0 0;color:var(--muted);font-size:11px;line-height:1.6}
.organization-memory-review-form>label{display:flex;flex-direction:column;gap:8px;margin-top:16px;color:var(--ink-2);font-size:11px;font-weight:650}
.organization-memory-review-form :is(input,select,textarea){width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--line-strong);border-radius:6px;background:var(--paper);color:var(--ink);font-size:12px;line-height:1.55}
.organization-memory-review-form textarea{resize:vertical}
.organization-memory-review-form :is(input,select,textarea):focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(43,99,229,.12)}
.organization-memory-business-section{margin-top:20px;padding:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.organization-memory-business-section>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}
.organization-memory-business-section h4{margin:0;color:var(--ink);font-size:13px;font-weight:680}
.organization-memory-business-section>div:first-child button{min-height:44px;padding:0 12px;border:1px solid var(--line-strong);border-radius:6px;background:var(--paper);color:var(--accent);font-size:11px;font-weight:650}
.organization-memory-business-section>p{margin:6px 0 0;color:var(--muted);font-size:10px;line-height:1.6}
#organization-memory-business-refs{margin-top:12px}
.organization-memory-business-empty{margin:0;padding:12px 0;color:var(--muted);font-size:11px}
.organization-memory-business-row{display:grid;grid-template-columns:116px 108px 116px minmax(150px,1fr) 60px;gap:8px;margin-top:8px}
.organization-memory-business-row:first-child{margin-top:0}
.organization-memory-business-row button{min-height:44px;border:1px solid rgba(193,62,77,.25);border-radius:6px;background:var(--paper);color:var(--danger);font-size:11px}
.organization-memory-review-form>footer{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}
.organization-memory-review-form>footer button{min-height:44px;padding:0 16px;border:1px solid var(--line-strong);border-radius:6px;background:var(--paper);color:var(--ink-2);font-size:12px;font-weight:650}
.organization-memory-review-form>footer #organization-memory-approve{border-color:var(--accent);background:var(--accent);color:#fff}
.organization-memory-review-form>footer #organization-memory-reject{border-color:rgba(193,62,77,.28);color:var(--danger)}

:root[data-theme="dark"] .organization-memory-summary,
:root[data-theme="dark"] .organization-memory-workspace,
:root[data-theme="dark"] .organization-memory-stream,
:root[data-theme="dark"] .organization-memory-inspector,
:root[data-theme="dark"] .organization-memory-row,
:root[data-theme="dark"] .organization-memory-detail,
:root[data-theme="dark"] .organization-memory-back,
:root[data-theme="dark"] .organization-memory-review-form :is(input,select,textarea),
:root[data-theme="dark"] .organization-memory-business-section button,
:root[data-theme="dark"] .organization-memory-business-row button{background:var(--paper)}
:root[data-theme="dark"] .organization-memory-row:hover,
:root[data-theme="dark"] .organization-memory-list-loading i{background:var(--paper-soft)}
:root[data-theme="dark"] .organization-memory-row.active{background:var(--accent-soft)}

@media (max-width:1180px){
  .organization-memory-workspace{grid-template-columns:minmax(340px,.86fr) minmax(420px,1.14fr)}
  .organization-memory-business-row{grid-template-columns:repeat(2,minmax(0,1fr)) 60px}
  .organization-memory-business-row input{grid-column:1/3}
  .organization-memory-business-row button{grid-column:3;grid-row:1/3}
}

@media (max-width:940px){
  .organization-memory{padding:12px}
  .organization-memory-workspace{grid-template-columns:minmax(320px,.9fr) minmax(380px,1.1fr)}
}

@media (max-width:760px){
  .organization-memory{gap:8px;padding:8px 8px calc(8px + env(safe-area-inset-bottom))}
  .organization-memory-summary>div{min-height:52px;padding:8px 12px}
  .organization-memory-workspace{display:block;overflow:auto}
  .organization-memory-workspace.has-detail .organization-memory-stream{display:none}
  .organization-memory-workspace:not(.has-detail) .organization-memory-inspector{display:none}
  .organization-memory-stream,.organization-memory-inspector{min-height:calc(100dvh - 254px);border-right:0}
  .organization-memory-back{display:block}
  .organization-memory-detail-body{padding:16px 16px 24px}
  .organization-memory-business-row{grid-template-columns:1fr}
  .organization-memory-business-row input,
  .organization-memory-business-row button{grid-column:auto;grid-row:auto}
  .organization-memory-review-form>footer{flex-direction:column-reverse}
  .organization-memory-review-form>footer button{width:100%}
}

@media (max-width:430px){
  .organization-memory-summary{grid-template-columns:1fr}
  .organization-memory-summary>div{border-right:0;border-bottom:1px solid var(--line)}
  .organization-memory-summary>div:last-child{border-bottom:0}
  .organization-memory-stream>header,.organization-memory-row,.organization-memory-detail>header{padding-inline:12px}
  .organization-memory-stream>header small{display:none}
  .organization-memory-detail-meta{grid-template-columns:1fr;gap:12px}
}

@media (prefers-reduced-motion:reduce){
  .organization-memory-list-loading i{animation:none}
}

/* Personal memory P1 · atomic review and conflict-group governance. */
.memory-review-bar[hidden]{display:none}
.memory-review-bar{
  min-height:56px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:6px 12px;
  border-bottom:1px solid var(--line);
  background:var(--accent-soft);
}
.memory-review-all{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--ink-2);
  font-size:11px;
  font-weight:650;
  cursor:pointer;
}
.memory-review-all input,
.memory-review-selector input{
  width:18px;
  height:18px;
  margin:0;
  accent-color:var(--accent);
}
.memory-review-bar>span{flex:1;color:var(--muted);font-size:10px}
.memory-review-bar>div{display:flex;gap:8px}
.memory-review-bar button{
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--line-strong);
  border-radius:6px;
  background:var(--paper);
  color:var(--ink-2);
  font-size:11px;
  font-weight:650;
}
.memory-review-bar #memory-review-confirm{border-color:var(--accent);background:var(--accent);color:#fff}
.memory-review-bar #memory-review-forget{color:var(--danger)}
.memory-review-bar button:disabled{cursor:not-allowed;opacity:.48}
.memory-review-row{
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  border-bottom:1px solid var(--line);
  background:var(--paper);
}
.memory-review-row .memory-row{min-height:94px;border-bottom:0}
.memory-review-selector{
  min-height:44px;
  display:grid;
  place-items:center;
  align-self:stretch;
  border-right:1px solid var(--line);
  cursor:pointer;
}
.memory-review-selector:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:-3px}
.memory-review-selector:has(input:checked){background:var(--accent-soft)}
.memory-review-selector:has(input:disabled){cursor:not-allowed;opacity:.48}
.memory-review-selector>span{display:none}

.memory-conflict-group{padding-top:12px;border-top:1px solid rgba(193,62,77,.18)}
.memory-conflict-group>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}
.memory-conflict-group>div:first-child b{color:var(--ink);font-size:12px;font-weight:680}
.memory-conflict-group>div:first-child span{color:var(--danger);font-size:10px}
.memory-conflict-group>div:last-child{margin-top:8px;border:1px solid var(--line);border-radius:6px;overflow:hidden;background:var(--paper)}
.memory-conflict-group button{
  width:100%;
  min-height:56px;
  display:grid;
  grid-template-columns:10px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:0;
  border-bottom:1px solid var(--line);
  background:transparent;
  color:var(--ink);
  text-align:left;
}
.memory-conflict-group button:last-child{border-bottom:0}
.memory-conflict-group button:hover{background:var(--accent-soft)}
.memory-conflict-group button:disabled{cursor:wait;opacity:.56}
.memory-conflict-group button>i{width:9px;height:9px;border:1px solid var(--line-strong);border-radius:50%;background:var(--paper)}
.memory-conflict-group button>span{min-width:0;display:flex;flex-direction:column;gap:3px}
.memory-conflict-group button small{color:var(--muted);font-size:10px;font-weight:600}
.memory-conflict-group button strong{color:var(--ink);font-size:12px;font-weight:620;line-height:1.55;text-wrap:pretty}
.memory-conflict-group button em{color:var(--accent);font-size:11px;font-style:normal;font-weight:680;white-space:nowrap}

:root[data-theme="dark"] .memory-review-bar,
:root[data-theme="dark"] .memory-review-row,
:root[data-theme="dark"] .memory-review-bar button,
:root[data-theme="dark"] .memory-conflict-group>div:last-child{background:var(--paper)}
:root[data-theme="dark"] .memory-review-selector:has(input:checked),
:root[data-theme="dark"] .memory-conflict-group button:hover{background:var(--accent-soft)}

@media (max-width:760px){
  .memory-review-bar{flex-wrap:wrap;padding:8px 10px}
  .memory-review-bar>span{text-align:right}
  .memory-review-bar>div{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .memory-review-bar button{min-height:44px}
}

@media (max-width:430px){
  .memory-conflict-group button{grid-template-columns:10px minmax(0,1fr);min-height:64px}
  .memory-conflict-group button em{grid-column:2}
}

/* Conversation task activity · one fixed rail per user turn. */
.task-activity-panel{
  --activity-tone:var(--accent);
  width:100%;
  margin:2px 0 10px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--paper);
}
.task-activity-panel[data-status="completed"]{--activity-tone:var(--success)}
.task-activity-panel[data-status="failed"]{--activity-tone:var(--danger)}
.task-activity-panel[data-status="waiting"]{--activity-tone:var(--warning)}
.task-activity-panel[data-status="cancelled"]{--activity-tone:var(--muted)}
.task-activity-summary{
  width:100%;
  min-height:48px;
  display:grid;
  grid-template-columns:10px minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:0 14px;
  border:0;
  background:transparent;
  color:var(--ink);
  text-align:left;
}
.task-activity-summary:hover{background:var(--paper-soft)}
.task-activity-summary:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.task-activity-status-mark{
  width:8px;
  height:8px;
  border:2px solid var(--activity-tone);
  border-radius:50%;
  background:var(--paper);
}
.task-activity-panel[data-status="running"] .task-activity-status-mark{
  border-width:2px;
  border-top-color:transparent;
  animation:task-activity-spin .9s linear infinite;
}
.task-activity-panel[data-status="completed"] .task-activity-status-mark{background:var(--success)}
.task-activity-panel[data-status="failed"] .task-activity-status-mark{background:var(--danger)}
.task-activity-summary-text{min-width:0;display:flex;align-items:baseline;gap:10px}
.task-activity-eyebrow{flex:0 0 auto;color:var(--muted);font-size:11px;font-weight:650}
.task-activity-summary-text strong{
  min-width:0;
  overflow:hidden;
  color:var(--ink);
  font-size:13px;
  font-weight:650;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.task-activity-summary-meta{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:10px;white-space:nowrap}
.task-activity-status-label{color:var(--activity-tone);font-weight:680}
.task-activity-counter{font-variant-numeric:tabular-nums}
.task-activity-summary svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition:transform var(--motion-fast) var(--ease);
}
.task-activity-summary[aria-expanded="true"] svg{transform:rotate(180deg)}
.task-activity-detail{
  max-height:304px;
  overflow:auto;
  overscroll-behavior:contain;
  border-top:1px solid var(--line);
  scrollbar-gutter:stable;
}
.task-activity-row{
  min-height:58px;
  display:grid;
  grid-template-columns:10px minmax(0,1fr) auto;
  align-items:start;
  gap:12px;
  padding:11px 14px;
  border-bottom:1px solid var(--line);
  background:var(--paper);
}
.task-activity-row:last-child{border-bottom:0}
.task-activity-row>i{width:8px;height:8px;margin-top:5px;border:2px solid var(--line-strong);border-radius:50%;background:var(--paper)}
.task-activity-row[data-status="running"]>i{border-color:var(--accent);border-top-color:transparent;animation:task-activity-spin .9s linear infinite}
.task-activity-row[data-status="completed"]>i{border-color:var(--success);background:var(--success)}
.task-activity-row[data-status="waiting"]>i{border-color:var(--warning);background:var(--warning)}
.task-activity-row[data-status="failed"]>i{border-color:var(--danger);background:var(--danger)}
.task-activity-row[data-status="cancelled"]>i{border-color:var(--muted);background:var(--muted)}
.task-activity-row>div{min-width:0;display:flex;flex-direction:column;gap:3px}
.task-activity-row>div strong{color:var(--ink);font-size:12px;font-weight:650;line-height:1.45}
.task-activity-row>div p{margin:0;color:var(--muted);font-size:10px;line-height:1.45}
.task-activity-row-meta{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:9px;white-space:nowrap}
.task-activity-row-meta>span{padding:2px 6px;border-radius:6px;background:var(--paper-soft)}
.task-activity-row-meta time{font-variant-numeric:tabular-nums}
.task-activity-waiting{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:12px 14px;
  border-top:1px solid var(--line);
  background:color-mix(in srgb,var(--warning) 8%,var(--paper));
}
.task-activity-waiting strong{color:var(--ink);font-size:12px;font-weight:680}
.task-activity-waiting p{margin:0;color:var(--muted);font-size:11px;line-height:1.55;white-space:pre-wrap}
.task-activity-continue{
  width:100%;
  min-height:44px;
  padding:0 14px;
  border:0;
  border-top:1px solid var(--line);
  background:var(--paper-soft);
  color:var(--accent);
  font-size:11px;
  font-weight:680;
  text-align:left;
}
.task-activity-continue:hover{background:var(--accent-soft)}
.task-activity-continue:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.task-trace-toggle{
  width:100%;
  min-height:44px;
  padding:0 14px;
  border:0;
  border-top:1px solid var(--line);
  background:var(--paper-soft);
  color:var(--accent);
  font-size:11px;
  font-weight:680;
  text-align:left;
}
.task-trace-toggle:hover{background:var(--accent-soft)}
.task-trace-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.task-trace-toggle:disabled{color:var(--muted);cursor:wait}
.task-trace-shell{border-top:1px solid var(--line);background:var(--paper-soft)}
.task-trace-loading,.task-trace-error{margin:0;padding:14px;color:var(--muted);font-size:11px;line-height:1.55}
.task-trace-error{color:var(--danger)}
.task-trace-stages{padding:6px 14px 2px}
.task-trace-stage{
  position:relative;
  min-height:48px;
  display:grid;
  grid-template-columns:10px minmax(0,1fr);
  gap:12px;
  align-items:start;
  padding:9px 0;
}
.task-trace-stage:not(:last-child)::after{
  content:"";
  position:absolute;
  top:25px;
  bottom:-9px;
  left:4px;
  width:1px;
  background:var(--line-strong);
}
.task-trace-stage>i{
  position:relative;
  z-index:1;
  width:9px;
  height:9px;
  margin-top:4px;
  border:2px solid var(--line-strong);
  border-radius:50%;
  background:var(--paper-soft);
}
.task-trace-stage[data-status="completed"]>i{border-color:var(--success);background:var(--success)}
.task-trace-stage[data-status="failed"]>i{border-color:var(--danger);background:var(--danger)}
.task-trace-stage[data-status="cancelled"]>i{border-color:var(--muted);background:var(--muted)}
.task-trace-stage>div{min-width:0}
.task-trace-stage strong{display:block;color:var(--ink);font-size:11px;font-weight:650;line-height:1.45}
.task-trace-stage p{margin:2px 0 0;color:var(--muted);font-size:10px;line-height:1.45}
.task-trace-audit{border-top:1px solid var(--line);background:var(--paper)}
.task-trace-audit summary{
  min-height:44px;
  display:flex;
  align-items:center;
  padding:0 14px;
  color:var(--muted);
  font-size:10px;
  font-weight:620;
  cursor:pointer;
}
.task-trace-audit summary:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.task-trace-audit dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:0;border-top:1px solid var(--line)}
.task-trace-audit dl>div{min-width:0;padding:9px 14px;border-bottom:1px solid var(--line)}
.task-trace-audit dl>div:nth-child(odd){border-right:1px solid var(--line)}
.task-trace-audit dt{color:var(--muted);font-size:9px}
.task-trace-audit dd{margin:3px 0 0;overflow:hidden;color:var(--ink);font:10px/1.45 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;text-overflow:ellipsis;white-space:nowrap}
.task-trace-plan,.task-plan-control{border-top:1px solid var(--line);background:var(--paper)}
.task-trace-plan{padding:12px 14px 14px}
.task-trace-plan-head,.task-plan-control-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.task-trace-plan-head strong,.task-plan-control-head strong{color:var(--ink);font-size:11px;font-weight:680}
.task-trace-plan-head span,.task-plan-control-head span{color:var(--muted);font-size:10px;white-space:nowrap}
.task-trace-plan-goal,.task-plan-control-goal{margin:7px 0 0;color:var(--ink-2);font-size:11px;line-height:1.55}
.task-plan-step-list{display:grid;gap:6px;margin:10px 0 0;padding:0;list-style:none}
.task-plan-step-list li{min-width:0;display:grid;grid-template-columns:8px minmax(0,1fr);align-items:start;gap:8px;padding:7px 0;border-top:1px solid var(--line)}
.task-plan-step-list li:first-child{border-top:0}
.task-plan-step-list li>i{width:7px;height:7px;margin-top:4px;border:2px solid var(--line-strong);border-radius:50%;background:var(--paper)}
.task-plan-step-list li[data-status="running"]>i{border-color:var(--accent);border-top-color:transparent;animation:task-activity-spin .9s linear infinite}
.task-plan-step-list li[data-status="completed"]>i{border-color:var(--success);background:var(--success)}
.task-plan-step-list li[data-status="failed"]>i{border-color:var(--danger);background:var(--danger)}
.task-plan-step-list li[data-status="waiting"]>i{border-color:var(--warning);background:var(--warning)}
.task-plan-step-list li>div{min-width:0;display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.task-plan-step-list li strong{overflow:hidden;color:var(--ink-2);font-size:11px;font-weight:620;text-overflow:ellipsis;white-space:nowrap}
.task-plan-step-list li span{flex:0 0 auto;color:var(--muted);font-size:9px;white-space:nowrap}
.task-plan-control{margin:2px 0 10px;padding:12px 14px;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.task-plan-control-head{margin-bottom:2px}
.task-plan-control-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.task-plan-control-actions button{min-height:34px;padding:0 12px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink-2);font-size:11px;font-weight:650}
.task-plan-control-actions button:hover{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.task-plan-control-actions .task-plan-primary-action{border-color:var(--accent);background:var(--accent);color:#fff}
.task-plan-control-actions .task-plan-primary-action:hover{background:var(--accent-hover);color:#fff}
.task-plan-editor{display:grid;gap:12px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.task-plan-editor-heading,.task-plan-editor-steps-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.task-plan-editor-heading strong,.task-plan-editor-steps-heading strong{color:var(--ink);font-size:11px;font-weight:680}
.task-plan-editor-heading span{color:var(--muted);font-size:9px}
.task-plan-editor-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.task-plan-editor-field{display:grid;gap:4px;min-width:0}
.task-plan-editor-field>span{color:var(--muted);font-size:9px;font-weight:620}
.task-plan-editor-field input,.task-plan-editor-field textarea,.task-plan-editor-field select{
  width:100%;min-width:0;box-sizing:border-box;padding:7px 8px;border:1px solid var(--line-strong);
  border-radius:6px;background:var(--paper-soft);color:var(--ink);font:11px/1.45 inherit;resize:vertical
}
.task-plan-editor-field input:focus-visible,.task-plan-editor-field textarea:focus-visible,.task-plan-editor-field select:focus-visible{
  outline:2px solid var(--accent);outline-offset:1px;border-color:var(--accent)
}
.task-plan-editor-wide{grid-column:1/-1}
.task-plan-editor-add,.task-plan-editor-move{
  min-height:30px;padding:0 9px;border:1px solid var(--line-strong);border-radius:6px;
  background:var(--paper);color:var(--ink-2);font-size:10px;font-weight:620
}
.task-plan-editor-add:hover,.task-plan-editor-move:hover:not(:disabled){border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}
.task-plan-editor-remove:hover:not(:disabled){border-color:var(--danger);color:var(--danger);background:rgba(193,62,77,.08)}
.task-plan-editor-move:disabled{opacity:.45;cursor:not-allowed}
.task-plan-editor-steps{display:grid;gap:8px}
.task-plan-editor-step{min-width:0;margin:0;padding:10px;border:1px solid var(--line);border-radius:8px}
.task-plan-editor-step legend{padding:0 4px;color:var(--muted);font-size:9px}
.task-plan-editor-step-top{display:flex;align-items:end;gap:6px}
.task-plan-editor-grow{flex:1}
.task-plan-editor-step-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:8px}
.task-plan-editor-step-fields .task-plan-editor-field:nth-child(3),
.task-plan-editor-step-fields .task-plan-editor-field:nth-child(4),
.task-plan-editor-step-fields .task-plan-editor-field:nth-child(5){grid-column:1/-1}
.task-plan-editor-required{display:flex;align-items:center;gap:6px;min-height:30px;color:var(--ink-2);font-size:10px}
.task-plan-editor-required input{width:14px;height:14px;margin:0;accent-color:var(--accent)}
.task-plan-editor-actions{display:flex;justify-content:flex-end;gap:8px}
.task-plan-editor-actions button{min-height:34px;padding:0 12px;border:1px solid var(--line-strong);border-radius:6px;background:var(--paper);color:var(--ink-2);font-size:10px;font-weight:650}
.task-plan-editor-actions .task-plan-primary-action{border-color:var(--accent);background:var(--accent);color:#fff}
.task-plan-editor-actions .task-plan-primary-action:hover{background:var(--accent-hover)}
.task-plan-editor-error{margin:0;color:var(--danger);font-size:10px;line-height:1.45}
:root[data-theme="dark"] .task-plan-editor-field input,
:root[data-theme="dark"] .task-plan-editor-field textarea,
:root[data-theme="dark"] .task-plan-editor-field select{background:var(--paper)}
@keyframes task-activity-spin{to{transform:rotate(360deg)}}

:root[data-theme="dark"] .task-activity-panel,
:root[data-theme="dark"] .task-activity-row,
:root[data-theme="dark"] .task-activity-status-mark,
:root[data-theme="dark"] .task-activity-row>i,
:root[data-theme="dark"] .task-trace-plan,
:root[data-theme="dark"] .task-plan-control,
:root[data-theme="dark"] .task-plan-step-list li>i{background:var(--paper)}
:root[data-theme="dark"] .task-activity-panel[data-status="completed"] .task-activity-status-mark,
:root[data-theme="dark"] .task-activity-row[data-status="completed"]>i{background:var(--success)}
:root[data-theme="dark"] .task-activity-panel[data-status="failed"] .task-activity-status-mark,
:root[data-theme="dark"] .task-activity-row[data-status="failed"]>i{background:var(--danger)}

@media (max-width:760px){
  .task-activity-panel{margin-bottom:8px}
  .task-activity-summary{min-height:48px;grid-template-columns:9px minmax(0,1fr) auto;gap:9px;padding-inline:11px}
  .task-activity-summary-text{display:block}
  .task-activity-eyebrow{display:none}
  .task-activity-summary-meta{gap:7px}
  .task-activity-status-label{display:none}
  .task-activity-detail{max-height:264px}
  .task-activity-row{grid-template-columns:9px minmax(0,1fr);gap:9px;padding:11px}
  .task-activity-row-meta{grid-column:2;justify-content:flex-start}
  .task-trace-stages{padding-inline:11px}
  .task-trace-stage{gap:9px}
  .task-trace-audit dl{grid-template-columns:1fr}
  .task-trace-audit dl>div:nth-child(odd){border-right:0}
  .task-trace-plan{padding-inline:11px}
  .task-plan-step-list li>div{display:block}
  .task-plan-step-list li span{display:block;margin-top:2px}
  .task-plan-editor-overview,.task-plan-editor-step-fields{grid-template-columns:1fr}
  .task-plan-editor-step-fields .task-plan-editor-field:nth-child(3),
  .task-plan-editor-step-fields .task-plan-editor-field:nth-child(4),
  .task-plan-editor-step-fields .task-plan-editor-field:nth-child(5){grid-column:auto}
}

@media (prefers-reduced-motion:reduce){
  .task-activity-panel[data-status="running"] .task-activity-status-mark,
  .task-activity-row[data-status="running"]>i{animation:none;border-top-color:var(--accent)}
  .task-activity-summary svg{transition:none}
}

/* Personal profile · one authenticated source, opened from the employee avatar */
.employee-profile{
  position:relative;
  width:100%;
  border:0;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.025);
  color:inherit;
  text-align:left;
  cursor:pointer;
}
.employee-profile:hover{background:rgba(255,255,255,.07)}
.employee-profile:focus-visible{outline:2px solid rgba(107,182,255,.9);outline-offset:-3px}
.employee-profile.loading{cursor:progress}
.profile-edit-icon{
  width:16px;
  height:16px;
  flex:0 0 16px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  color:rgba(255,255,255,.54);
}
.workbench-app[data-workspace-mode="chat"] .profile-edit-icon{
  position:absolute;
  right:8px;
  bottom:7px;
  width:14px;
  height:14px;
  display:block;
  padding:2px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:50%;
  background:var(--rail);
  color:#fff;
  pointer-events:none;
}

.header-profile-button{
  width:40px;
  height:40px;
  min-width:40px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--line-strong);
  border-radius:8px;
  background:var(--paper);
  color:var(--ink);
}
.header-profile-button:hover,
.header-profile-button[aria-expanded="true"]{
  border-color:var(--accent);
  background:var(--accent-soft);
}
.header-profile-avatar{
  width:28px;
  height:28px;
  overflow:hidden;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--accent-soft);
  color:var(--accent);
  font-size:11px;
  font-weight:720;
}
.header-profile-avatar img{width:100%;height:100%;object-fit:cover}
.execution-head-actions .header-profile-button{padding:0}
.memory-head>.header-profile-button{flex:0 0 40px}

.profile-settings{
  position:fixed;
  inset:0;
  z-index:var(--z-modal);
  display:flex;
  justify-content:flex-end;
}
.profile-settings-scrim{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  background:rgba(8,20,38,.48);
}
.profile-settings-sheet{
  position:relative;
  width:min(440px,100%);
  height:100%;
  display:flex;
  flex-direction:column;
  border-left:1px solid var(--line);
  background:var(--paper);
  color:var(--ink);
  animation:profile-sheet-in var(--motion-standard) var(--ease) both;
}
.profile-settings-sheet>header{
  min-height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 20px;
  border-bottom:1px solid var(--line);
}
.profile-settings-sheet>header h2{margin:0;font-size:18px;font-weight:700;letter-spacing:-.01em}
.profile-settings-sheet>header p{margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.profile-settings-close{
  width:44px;
  height:44px;
  flex:0 0 44px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--muted);
}
.profile-settings-close:hover{background:var(--paper-soft);color:var(--ink)}
.profile-settings-close svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.profile-settings-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;padding:24px 20px 40px}
.profile-settings-form{display:flex;flex-direction:column;gap:16px}
.profile-avatar-editor{display:grid;grid-template-columns:72px minmax(0,1fr);gap:16px;align-items:center;padding-bottom:20px;border-bottom:1px solid var(--line)}
.profile-avatar-preview{
  width:72px;
  height:72px;
  overflow:hidden;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--line-strong);
  border-radius:50%;
  background:var(--accent-soft);
  color:var(--accent);
  cursor:pointer;
  font-size:22px;
  font-weight:720;
}
.profile-avatar-preview:hover{border-color:var(--accent);background:var(--paper-soft)}
.profile-avatar-preview:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.profile-avatar-preview img{width:100%;height:100%;object-fit:cover}
.profile-avatar-editor strong{font-size:14px;font-weight:680}
.profile-avatar-editor p{margin:5px 0 10px;color:var(--muted);font-size:11px;line-height:1.5}
.profile-avatar-actions{display:flex;flex-wrap:wrap;gap:8px}
.profile-avatar-actions button{
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--line-strong);
  border-radius:8px;
  background:var(--paper);
  color:var(--ink-2);
  font-size:12px;
  font-weight:620;
}
.profile-avatar-actions button:hover{border-color:var(--accent);color:var(--accent)}
.profile-field{display:flex;flex-direction:column;gap:7px}
.profile-field>span{color:var(--ink-2);font-size:12px;font-weight:650}
.profile-field input{
  width:100%;
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--line-strong);
  border-radius:8px;
  background:var(--paper);
  color:var(--ink);
  font-size:14px;
}
.profile-field input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(43,99,229,.12)}
.profile-field input[readonly]{border-color:var(--line);background:var(--paper-soft);color:var(--muted);cursor:default}
.profile-save-button{
  min-height:44px;
  padding:0 16px;
  border:1px solid var(--accent);
  border-radius:8px;
  background:var(--accent);
  color:#fff;
  font-size:13px;
  font-weight:680;
}
.profile-save-button:hover{background:var(--accent-hover)}
.profile-save-button:disabled{opacity:.55;cursor:not-allowed}
.profile-form-status{min-height:18px;margin:-4px 0 0;color:var(--muted);font-size:11px;line-height:1.5}
.profile-form-status.error{color:var(--danger)}
.profile-form-status.success{color:var(--success)}
.profile-security-form{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}
.profile-section-heading h3{margin:0;font-size:15px;font-weight:680}
.profile-section-heading p{margin:5px 0 0;color:var(--muted);font-size:11px;line-height:1.5}
@keyframes profile-sheet-in{from{transform:translateX(24px);opacity:.6}to{transform:translateX(0);opacity:1}}

:root[data-theme="dark"] .profile-settings-sheet{border-color:rgba(255,255,255,.14);background:var(--paper)}
:root[data-theme="dark"] .profile-settings-scrim{background:rgba(0,8,22,.7)}
:root[data-theme="dark"] .profile-avatar-actions button,
:root[data-theme="dark"] .profile-field input{background:var(--paper)}
:root[data-theme="dark"] .profile-field input[readonly]{background:var(--paper-soft)}

@media (max-width:640px){
  .header-profile-button{
    width:44px;
    height:44px;
    min-width:44px;
    border-color:transparent;
    background:transparent;
  }
  .header-profile-button:hover{background:var(--paper-soft)}
  .header-profile-avatar{width:32px;height:32px}
  .profile-settings-sheet{width:100%}
  .profile-settings-sheet>header{min-height:64px;padding:10px 14px}
  .profile-settings-scroll{padding:20px 16px 96px}
  .profile-avatar-editor{grid-template-columns:64px minmax(0,1fr);gap:14px}
  .profile-avatar-preview{width:64px;height:64px}
  .profile-avatar-actions button{min-height:44px}
}

@media (max-width:940px){
  .chat-head-meta .header-profile-button,
  .collaboration-head>.header-profile-button{display:grid}
}

@media (prefers-reduced-motion:reduce){
  .profile-settings-sheet{animation:none}
}

/* 2026-08-18 · linked customer files and one-source execution closure */
.customer-artifact-form{
  grid-template-columns:minmax(180px,1fr) 112px 144px 112px;
  align-items:center;
}
.customer-file-picker{
  position:relative;
  min-width:0;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  overflow:hidden;
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  background:var(--paper);
  color:var(--ink-2);
  cursor:pointer;
  font-size:12px;
  font-weight:650;
}
.customer-file-picker:hover{border-color:var(--accent);color:var(--accent)}
.customer-file-picker:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.customer-file-picker input{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  opacity:0;
}
.customer-file-picker span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer-artifact-form #customer-artifact-url{grid-column:1/3}
.customer-artifact-form #customer-artifact-note{grid-column:3/5}
.customer-artifact-form #customer-artifact-save{grid-column:4;grid-row:1;justify-self:stretch}
.customer-resource-actions{display:flex;gap:8px}
.customer-resource-actions button{min-height:44px;min-width:56px}

.collaboration-execution-link{
  min-height:88px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-top:24px;
  padding:20px 0;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.collaboration-execution-link[hidden]{display:none}
.collaboration-execution-link>div:first-child{min-width:0}
.collaboration-execution-link span{color:var(--accent);font-size:11px;font-weight:700}
.collaboration-execution-link h3{margin:4px 0;font-size:15px;font-weight:700}
.collaboration-execution-link p{margin:0;color:var(--muted);font-size:12px;line-height:1.6}
.collaboration-execution-link>div:last-child{display:flex;flex:0 0 auto;gap:8px}
.collaboration-execution-link button{
  min-height:44px;
  padding:0 16px;
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  background:var(--paper);
  color:var(--ink-2);
  font-size:12px;
  font-weight:680;
}
.collaboration-execution-link #collaboration-sync-execution{border-color:var(--accent);background:var(--accent);color:#fff}
.collaboration-execution-link button:disabled{opacity:.55;cursor:not-allowed}

.memory-summary{grid-template-columns:repeat(3,minmax(0,1fr));min-height:64px}
.memory-summary>div:last-child{border-right:0}
.execution-todo-form{width:min(560px,100%)}

:root[data-theme="dark"] .customer-file-picker,
:root[data-theme="dark"] .collaboration-execution-link button{background:var(--paper)}

/* Execution header keeps exactly one visible primary creation action. */
.execution-head-actions #execution-new-todo,
.execution-head-actions #execution-new-todo[hidden] + #execution-new-schedule{
  border-color:var(--accent);
  background:var(--accent);
  color:#fff;
}
.execution-head-actions #execution-new-todo:hover,
.execution-head-actions #execution-new-todo[hidden] + #execution-new-schedule:hover{
  border-color:var(--accent-hover);
  background:var(--accent-hover);
  color:#fff;
}

@media (max-width:760px){
  .customer-artifact-form{grid-template-columns:1fr 1fr}
  .customer-artifact-form #customer-artifact-name,
  .customer-artifact-form #customer-artifact-url,
  .customer-artifact-form #customer-artifact-note,
  .customer-artifact-form #customer-artifact-save{grid-column:1/-1;grid-row:auto}
  .customer-artifact-form #customer-artifact-kind{grid-column:1}
  .customer-artifact-form .customer-file-picker{grid-column:2}
  .collaboration-execution-link{align-items:flex-start;flex-direction:column;gap:12px}
  .collaboration-execution-link>div:last-child{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .execution-head-actions #execution-new-todo,
  .execution-head-actions #execution-new-schedule{padding-inline:12px}
}

/* 2026-08-18 · organization work and execution hierarchy */
.items-cockpit{
  min-height:0;
  overflow:hidden;
  background:var(--canvas);
}
.items-cockpit>.collaboration-metrics{
  min-height:64px;
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  border-bottom:1px solid var(--line);
  background:var(--paper);
}
.items-cockpit>.collaboration-metrics>button{
  min-width:0;
  min-height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 22px;
  border:0;
  border-right:1px solid var(--line);
  border-bottom:2px solid transparent;
  background:transparent;
  color:var(--muted);
  text-align:left;
}
.items-cockpit>.collaboration-metrics>button:last-child{border-right:0}
.items-cockpit>.collaboration-metrics>button:hover{background:var(--paper-soft);color:var(--ink)}
.items-cockpit>.collaboration-metrics>button.active{
  border-bottom-color:var(--accent);
  background:var(--accent-soft);
  color:var(--ink);
}
.items-cockpit>.collaboration-metrics>button:focus-visible{position:relative;z-index:var(--z-sticky)}
.items-cockpit>.collaboration-metrics span{font-size:12px;font-weight:620}
.items-cockpit>.collaboration-metrics b{font-size:22px;font-weight:720;letter-spacing:-.025em}
.items-cockpit.detail-open{grid-template-rows:minmax(0,1fr)}
.items-cockpit.detail-open>.collaboration-metrics{display:none}
.items-cockpit .collaboration-workspace{
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:0;
  overflow:hidden;
  background:transparent;
}
.items-cockpit .collaboration-workspace:not(.detail-open) .collaboration-detail{display:none}
.items-cockpit .collaboration-workspace.detail-open .collaboration-browser{display:none}
.items-cockpit .collaboration-browser,
.items-cockpit .collaboration-detail{
  min-height:0;
  border:0;
  background:var(--paper);
  box-shadow:none;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.items-cockpit .collaboration-browser>header{min-height:64px;padding:12px 22px 8px}
.items-cockpit .collaboration-browser>header h2{font-size:18px}
.items-cockpit .collaboration-toolbar{gap:12px;padding:0 22px 16px}
.items-cockpit .collaboration-toolbar label,
.items-cockpit .collaboration-toolbar select{height:44px;min-height:44px}
.items-cockpit .collaboration-list-columns{
  min-height:36px;
  display:grid;
  grid-template-columns:minmax(280px,1fr) 120px 100px 120px;
  align-items:center;
  gap:16px;
  padding:0 22px 0 42px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:var(--paper-soft);
  color:var(--muted);
  font-size:11px;
  font-weight:650;
}
.items-cockpit .collaboration-list{overflow:auto;overscroll-behavior:contain}
.items-cockpit .collaboration-item{
  min-height:88px;
  grid-template-columns:20px minmax(280px,1fr) 120px 100px 120px;
  align-items:center;
  gap:16px;
  padding:0 22px 0 0;
  border-bottom:1px solid var(--line);
  background:var(--paper);
}
.items-cockpit .collaboration-item:hover{background:var(--paper-soft)}
.items-cockpit .collaboration-item.active{background:var(--accent-soft);box-shadow:inset 2px 0 0 var(--accent)}
.items-cockpit .collaboration-priority-line{margin-top:0;align-self:center}
.items-cockpit .collaboration-item-copy{padding:12px 0}
.items-cockpit .collaboration-item-top time{display:none}
.items-cockpit .collaboration-item h3{margin-top:8px;font-size:14px}
.items-cockpit .collaboration-item p{margin-top:4px;font-size:12px}
.items-cockpit .collaboration-item-foot{margin-top:8px}
.items-cockpit .collaboration-item-foot span{margin-left:0}
.items-cockpit :is(.collaboration-item-owner,.collaboration-item-due){
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.items-cockpit :is(.collaboration-item-owner,.collaboration-item-due) small{
  color:var(--muted);
  font-size:10px;
}
.items-cockpit :is(.collaboration-item-owner,.collaboration-item-due) strong{
  overflow:hidden;
  color:var(--ink-2);
  font-size:12px;
  font-weight:650;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.items-cockpit .collaboration-item-due.is-overdue strong{color:var(--danger)}
.items-cockpit .collaboration-item-execution{
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-size:11px;
}
.items-cockpit .collaboration-item-execution i{
  width:7px;
  height:7px;
  flex:0 0 7px;
  border-radius:50%;
  background:var(--muted-2);
}
.items-cockpit .collaboration-item-execution[data-status="done"] i{background:var(--success)}
.items-cockpit .collaboration-item-execution[data-status="error"] i{background:var(--danger)}
.items-cockpit .collaboration-item-execution[data-status="synced"] i,
.items-cockpit .collaboration-item-execution[data-status="work_item_only"] i{background:var(--accent)}
.items-cockpit .collaboration-form-head{
  position:sticky;
  top:0;
  z-index:var(--z-sticky);
  min-height:64px;
  padding:8px 22px;
  background:var(--paper);
}
.items-cockpit .collaboration-back{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  padding:0 12px;
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  background:var(--paper);
  color:var(--ink-2);
  font-size:12px;
  font-weight:650;
}
.items-cockpit .collaboration-back::before{content:"←";margin-right:8px}
.items-cockpit .collaboration-form-actions button{min-height:44px}
.items-cockpit .collaboration-form-scroll{padding:22px 28px 36px}
.items-cockpit .collaboration-detail-layout{
  width:min(1180px,100%);
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(320px,.8fr);
  align-items:start;
  gap:22px;
}
.items-cockpit .collaboration-detail-rail{min-width:0;display:grid;gap:16px}
.items-cockpit .collaboration-detail-section,
.items-cockpit .collaboration-history{
  min-width:0;
  padding:22px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--paper);
}
.items-cockpit .collaboration-detail-section>header{margin-bottom:22px}
.items-cockpit .collaboration-detail-section>header h3,
.items-cockpit .collaboration-history>header h3{margin:0;font-size:15px;font-weight:700}
.items-cockpit .collaboration-detail-section>header p,
.items-cockpit .collaboration-history>header p{margin-top:4px;color:var(--muted);font-size:12px;font-weight:400;line-height:1.6}
.items-cockpit .collaboration-grid{gap:16px}
.items-cockpit .collaboration-grid label{gap:8px}
.items-cockpit .collaboration-grid :is(input,select){height:44px;min-height:44px}
.items-cockpit .collaboration-grid textarea{min-height:88px;padding:12px}
.items-cockpit #collaboration-content{min-height:320px}
.items-cockpit .collaboration-person span{min-height:44px;padding:0 12px;border-radius:22px;font-size:11px}
.items-cockpit .collaboration-person input:focus-visible+span{outline:2px solid var(--accent);outline-offset:2px}
.items-cockpit .collaboration-execution-link{
  min-height:0;
  display:grid;
  gap:16px;
  margin:0;
  padding:22px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--accent-soft);
}
.items-cockpit .collaboration-execution-link>div:last-child{display:grid;grid-template-columns:1fr;gap:8px}
.items-cockpit .collaboration-execution-link button{width:100%;min-height:44px}
.items-cockpit .collaboration-history{grid-column:1/-1;margin:0}
.items-cockpit .collaboration-history-list{margin-top:16px}
.items-cockpit .collaboration-revision{min-height:44px;font-size:11px}

.execution-cockpit .execution-view{padding:22px 28px 36px}
.execution-cockpit .execution-focus{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(320px,.8fr);
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--paper);
  box-shadow:none;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.execution-cockpit .execution-focus-copy{min-height:176px;padding:28px}
.execution-cockpit .execution-focus.is-clear .execution-focus-copy{background:var(--paper-soft)}
.execution-cockpit .execution-focus-copy h2{margin-top:12px;font-size:22px}
.execution-cockpit .execution-focus-copy p{margin-top:8px;font-size:13px}
.execution-cockpit .execution-focus-actions{gap:8px;margin-top:22px}
.execution-cockpit .execution-focus-actions button{min-height:44px;padding:0 16px;font-size:12px}
.execution-cockpit .execution-metrics{
  display:grid;
  grid-template-columns:1fr 1fr;
  border:0;
  border-left:1px solid var(--line);
  border-radius:0;
  background:var(--paper-soft);
  box-shadow:none;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.execution-cockpit .execution-metrics>div{
  min-height:88px;
  padding:16px 22px;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:transparent;
}
.execution-cockpit .execution-metrics>div:nth-child(2n){border-right:0}
.execution-cockpit .execution-metrics>div:nth-last-child(-n+2){border-bottom:0}
.execution-cockpit .execution-metrics span{font-size:11px}
.execution-cockpit .execution-metrics b{font-size:24px}
.execution-cockpit .execution-two-column{grid-template-columns:minmax(0,1fr) minmax(300px,360px);gap:16px;margin-top:16px}
.execution-cockpit .execution-panel{
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--paper);
  box-shadow:none;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.execution-cockpit .execution-panel>header{min-height:64px;padding:12px 16px}
.execution-cockpit .execution-panel>header>div{min-width:0}
.execution-cockpit .execution-panel>header h2{font-size:15px}
.execution-cockpit .execution-panel>header div>span{display:block;margin-top:4px;color:var(--muted);font-size:11px}
.execution-cockpit .execution-card{padding:16px}
.execution-cockpit .execution-card-actions{gap:8px;margin-top:12px}
.execution-cockpit .execution-card-actions button{min-height:44px;padding:0 12px;font-size:11px}
.execution-cockpit .execution-empty{padding:36px 22px}
.execution-cockpit .execution-signal-panel{border-color:var(--rail);background:var(--rail);color:var(--rail-text)}
.execution-cockpit .execution-signal-panel>header{border-color:rgba(255,255,255,.12);background:transparent}
.execution-cockpit .execution-signal-panel>header h2,
.execution-cockpit .execution-signal strong{color:var(--rail-text)}
.execution-cockpit .execution-signal-panel>header div>span,
.execution-cockpit .execution-signal small{color:var(--rail-muted)}
.execution-cockpit .execution-signal-panel>header>b{background:rgba(255,255,255,.12);color:var(--rail-text)}
.execution-cockpit .execution-signal{padding:16px;border-color:rgba(255,255,255,.1)}
.execution-cockpit .execution-signal-panel .execution-empty{color:var(--rail-muted)}
.execution-cockpit .execution-schedule-grid{
  grid-template-columns:1fr 1fr;
  gap:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--paper);
}
.execution-cockpit .execution-schedule-grid>.execution-panel{border:0;border-radius:0}
.execution-cockpit .execution-schedule-grid>.execution-panel+ .execution-panel{border-left:1px solid var(--line)}
.execution-cockpit .execution-schedule-row{min-height:80px;padding:12px 16px}
.execution-cockpit .execution-occurrence{min-height:44px;padding:0 12px}
.execution-cockpit .execution-progress-stats{min-height:44px;align-items:center;margin:0;padding:0 4px 12px}
.execution-cockpit .execution-project-list{
  display:block;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--paper);
}
.execution-cockpit .execution-project{
  min-height:132px;
  display:grid;
  grid-template-columns:minmax(280px,1.3fr) minmax(180px,.7fr) minmax(220px,.9fr) 120px;
  align-items:center;
  gap:22px;
  padding:16px 22px;
  border:0;
  border-bottom:1px solid var(--line);
  border-radius:0;
  background:var(--paper);
  box-shadow:none;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.execution-cockpit .execution-project:last-child{border-bottom:0}
.execution-cockpit .execution-project:hover{background:var(--paper-soft)}
.execution-cockpit .execution-project-summary{min-width:0}
.execution-cockpit .execution-project h3{margin-top:8px;font-size:15px}
.execution-cockpit .execution-project-summary>p{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.55}
.execution-cockpit :is(.execution-project-stage,.execution-project-responsibility){min-width:0;display:flex;flex-direction:column;gap:4px}
.execution-cockpit .execution-project-column-label{margin-bottom:4px;color:var(--muted);font-size:10px;font-weight:650}
.execution-cockpit :is(.execution-project-stage,.execution-project-responsibility)>strong{overflow:hidden;color:var(--ink-2);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.execution-cockpit :is(.execution-project-stage,.execution-project-responsibility)>small{color:var(--muted);font-size:11px}
.execution-cockpit .execution-project-responsibility>p{margin:8px 0 0;color:var(--muted);font-size:11px;line-height:1.45}
.execution-cockpit .execution-project-progress{display:block;height:4px;margin-top:8px;overflow:hidden;border-radius:4px;background:var(--accent-soft)}
.execution-cockpit .execution-project-progress b{display:block;height:100%;border-radius:inherit;background:var(--accent)}
.execution-cockpit .execution-project-action{width:120px;min-height:44px;margin:0;padding:0 12px}
.execution-cockpit :is(.execution-head-actions button,.header-profile-button,.icon-button){min-height:44px}

@media (max-width:1100px){
  .items-cockpit .collaboration-list-columns{grid-template-columns:minmax(240px,1fr) 100px 88px 104px}
  .items-cockpit .collaboration-item{grid-template-columns:20px minmax(240px,1fr) 100px 88px 104px}
  .items-cockpit .collaboration-detail-layout{grid-template-columns:minmax(0,1.3fr) minmax(300px,.8fr)}
  .execution-cockpit .execution-project{grid-template-columns:minmax(260px,1fr) minmax(170px,.65fr) minmax(200px,.8fr) 112px;gap:16px}
  .execution-cockpit .execution-project-action{width:112px}
}

@media (max-width:940px){
  .items-cockpit>.collaboration-metrics{grid-template-columns:repeat(5,minmax(0,1fr))}
  .items-cockpit>.collaboration-metrics>button{min-height:64px;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;padding:8px 12px}
  .items-cockpit .collaboration-list-columns{display:none}
  .items-cockpit .collaboration-item{grid-template-columns:20px minmax(0,1fr) 100px 96px;padding-right:16px}
  .items-cockpit .collaboration-item-execution{display:none}
  .items-cockpit .collaboration-detail-layout{grid-template-columns:1fr}
  .items-cockpit .collaboration-history{grid-column:auto}
  .execution-cockpit .execution-focus{grid-template-columns:1fr}
  .execution-cockpit .execution-metrics{border-top:1px solid var(--line);border-left:0}
  .execution-cockpit .execution-two-column{grid-template-columns:1fr}
  .execution-cockpit .execution-signal-panel{min-height:0}
  .execution-cockpit .execution-project{grid-template-columns:minmax(0,1.2fr) minmax(180px,.8fr) 112px}
  .execution-cockpit .execution-project-responsibility{display:none}
}

@media (max-width:640px){
  .items-cockpit>.collaboration-metrics{grid-template-columns:repeat(2,minmax(0,1fr));padding:8px;gap:1px;background:var(--line)}
  .items-cockpit>.collaboration-metrics>button{min-height:56px;border:0;background:var(--paper)}
  .items-cockpit>.collaboration-metrics>button:first-child{grid-column:1/-1}
  .items-cockpit>.collaboration-metrics>button.active{box-shadow:inset 2px 0 0 var(--accent)}
  .items-cockpit .collaboration-browser>header{padding-inline:16px}
  .items-cockpit .collaboration-toolbar{padding:0 16px 12px}
  .items-cockpit .collaboration-item{grid-template-columns:20px minmax(0,1fr);gap:8px;padding-right:16px}
  .items-cockpit :is(.collaboration-item-owner,.collaboration-item-due,.collaboration-item-execution){display:none}
  .items-cockpit .collaboration-form-head{padding:8px 12px}
  .items-cockpit .collaboration-form-head>div:nth-child(2)>span{display:none}
  .items-cockpit .collaboration-form-actions{gap:4px}
  .items-cockpit .collaboration-form-actions button{padding-inline:10px}
  .items-cockpit .collaboration-form-scroll{padding:16px 12px 28px}
  .items-cockpit .collaboration-detail-layout{gap:16px}
  .items-cockpit .collaboration-detail-section,
  .items-cockpit .collaboration-history{padding:16px}
  .items-cockpit .collaboration-result-grid,
  .items-cockpit .collaboration-responsibility-grid{grid-template-columns:1fr}
  .items-cockpit .collaboration-grid .span-2{grid-column:auto}
  .items-cockpit #collaboration-content{min-height:240px}
  .execution-cockpit .execution-view{padding:16px 12px 28px}
  .execution-cockpit .execution-focus-copy{min-height:0;padding:22px}
  .execution-cockpit .execution-focus-copy h2{font-size:19px}
  .execution-cockpit .execution-metrics{grid-template-columns:1fr 1fr}
  .execution-cockpit .execution-metrics>div{min-height:72px;padding:12px 16px}
  .execution-cockpit .execution-schedule-grid{grid-template-columns:1fr}
  .execution-cockpit .execution-schedule-grid>.execution-panel+ .execution-panel{border-top:1px solid var(--line);border-left:0}
  .execution-cockpit .execution-project{grid-template-columns:minmax(0,1fr);gap:12px;padding:16px}
  .execution-cockpit .execution-project-stage{padding-top:12px;border-top:1px solid var(--line)}
  .execution-cockpit .execution-project-action{width:100%;margin-top:0}
}

/* 2026-08-18 · ZIP action hub v3: personal work, schedule and organization flow */
.execution-cockpit .execution-action-hub-layout{
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1.65fr) minmax(300px,.78fr);
  gap:16px;
  margin-top:16px;
}
.execution-cockpit .execution-time-commitments{min-width:0;overflow:hidden}
.execution-cockpit .execution-time-commitments>header button{
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  background:var(--paper);
  color:var(--ink-2);
  font-size:12px;
  font-weight:650;
}
.execution-cockpit .execution-time-section+.execution-time-section{border-top:1px solid var(--line)}
.execution-cockpit .execution-time-section-head{
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 16px;
  background:var(--paper-soft);
}
.execution-cockpit .execution-time-section-head h3{margin:0;font-size:12px;font-weight:700}
.execution-cockpit .execution-time-section-head b{color:var(--muted);font-size:11px;font-weight:650}
.execution-cockpit .execution-time-section .execution-schedule-list{max-height:360px;overflow:auto}
.execution-cockpit .execution-result-rail{
  min-width:0;
  overflow:hidden;
  border-radius:var(--radius-sm);
  background:var(--rail);
  color:var(--rail-text);
}
.execution-cockpit .execution-rail-section+ .execution-rail-section{border-top:1px solid rgba(255,255,255,.12)}
.execution-cockpit .execution-rail-section>header{
  min-height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 16px;
  border-bottom:1px solid rgba(255,255,255,.1);
}
.execution-cockpit .execution-rail-section>header h2{margin:0;color:var(--rail-text);font-size:15px}
.execution-cockpit .execution-rail-section>header span{display:block;margin-top:4px;color:var(--rail-muted);font-size:11px}
.execution-cockpit .execution-rail-section>header b{min-width:28px;padding:4px 8px;border-radius:var(--radius-sm);background:rgba(255,255,255,.1);color:var(--rail-text);font-size:12px;text-align:center}
.execution-cockpit .execution-result-rail .execution-card,
.execution-cockpit .execution-result-rail .execution-signal{
  border:0;
  border-bottom:1px solid rgba(255,255,255,.1);
  border-radius:0;
  background:transparent;
  color:var(--rail-text);
}
.execution-cockpit .execution-result-rail .execution-card h3,
.execution-cockpit .execution-result-rail .execution-card-top span,
.execution-cockpit .execution-result-rail .execution-signal strong{color:var(--rail-text)}
.execution-cockpit .execution-result-rail .execution-card p,
.execution-cockpit .execution-result-rail .execution-card-top small,
.execution-cockpit .execution-result-rail .execution-signal small{color:var(--rail-muted)}
.execution-cockpit .execution-result-rail .execution-card-actions button{border-color:rgba(255,255,255,.2);background:transparent;color:var(--rail-text)}
.execution-cockpit .execution-result-rail .execution-card-actions button:first-child{border-color:rgba(107,182,255,.55);background:rgba(43,127,255,.16)}
.execution-cockpit .execution-result-rail .execution-empty{color:var(--rail-muted)}

.execution-cockpit .execution-schedule-workspace{
  min-width:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--paper);
}
.execution-cockpit .execution-schedule-toolbar{
  min-height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:8px 16px;
  border-bottom:1px solid var(--line);
}
.execution-cockpit :is(.execution-date-nav,.execution-view-switch,.execution-schedule-legend){display:flex;align-items:center}
.execution-cockpit .execution-date-nav{gap:8px}
.execution-cockpit .execution-date-nav strong{min-width:180px;color:var(--ink-2);font-size:13px;text-align:center}
.execution-cockpit .execution-date-nav button,
.execution-cockpit .execution-view-switch button{
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  background:var(--paper);
  color:var(--ink-2);
  font-size:12px;
  font-weight:650;
}
.execution-cockpit .execution-date-nav button:first-child,
.execution-cockpit .execution-date-nav button:last-child{width:44px;padding:0}
.execution-cockpit .execution-view-switch{gap:4px;padding:4px;background:var(--paper-soft);border-radius:var(--radius-sm)}
.execution-cockpit .execution-view-switch button{min-height:36px;border-color:transparent;background:transparent}
.execution-cockpit .execution-view-switch button.active{background:var(--paper);color:var(--accent);box-shadow:0 1px 4px rgba(10,26,54,.08)}
.execution-cockpit .execution-schedule-context{
  min-height:56px;
  display:flex;
  align-items:center;
  gap:16px;
  padding:8px 16px;
  border-bottom:1px solid var(--line);
  background:var(--paper-soft);
}
.execution-cockpit .execution-schedule-context label{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px;font-weight:650}
.execution-cockpit .execution-schedule-context select{height:40px;padding:0 28px 0 10px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink-2);font-size:12px}
.execution-cockpit .execution-schedule-legend{flex:1;justify-content:flex-end;gap:12px;color:var(--muted);font-size:10px}
.execution-cockpit .execution-schedule-legend span{display:inline-flex;align-items:center;gap:4px}
.execution-cockpit .execution-schedule-legend i{width:8px;height:8px;border-radius:2px;background:var(--muted-2)}
.execution-cockpit .execution-schedule-legend .is-meeting{background:var(--accent)}
.execution-cockpit .execution-schedule-legend .is-activity{background:var(--warning)}
.execution-cockpit .execution-schedule-legend .is-task{background:var(--muted)}
.execution-cockpit .execution-schedule-legend .is-ended{background:var(--success)}
.execution-cockpit .execution-schedule-metrics{
  display:grid;
  grid-template-columns:1.2fr repeat(4,minmax(0,1fr));
  border-bottom:1px solid var(--line);
}
.execution-cockpit .execution-schedule-metrics>div{min-height:72px;padding:12px 16px;border-right:1px solid var(--line)}
.execution-cockpit .execution-schedule-metrics>div:last-child{border-right:0}
.execution-cockpit .execution-schedule-metrics span{display:block;color:var(--muted);font-size:10px}
.execution-cockpit .execution-schedule-metrics b{display:block;margin-top:4px;color:var(--ink);font-size:22px}
.execution-cockpit .execution-schedule-metrics .is-primary{background:var(--rail)}
.execution-cockpit .execution-schedule-metrics .is-primary :is(span,b){color:var(--rail-text)}
.execution-cockpit .execution-schedule-board{max-width:100%;min-height:360px;overflow:auto;overscroll-behavior:contain}
.execution-cockpit .execution-today-board{display:grid;grid-template-columns:minmax(0,1fr) 320px;min-height:440px}
.execution-cockpit .execution-day-column{min-width:0;background:var(--paper)}
.execution-cockpit .execution-day-column>header,
.execution-cockpit .execution-upcoming-rail>header{
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 16px;
  border-bottom:1px solid var(--line);
  background:var(--paper-soft);
}
.execution-cockpit .execution-day-column.is-today>header{box-shadow:inset 3px 0 0 var(--accent)}
.execution-cockpit .execution-day-column>header strong,
.execution-cockpit .execution-upcoming-rail>header strong{font-size:12px}
.execution-cockpit .execution-day-column>header span,
.execution-cockpit .execution-upcoming-rail>header span{color:var(--muted);font-size:10px}
.execution-cockpit .execution-day-lane{display:grid;grid-template-columns:64px minmax(0,1fr);border-bottom:1px solid var(--line)}
.execution-cockpit .execution-day-lane>span{padding:16px 12px;border-right:1px solid var(--line);color:var(--muted);font-size:10px;text-align:center}
.execution-cockpit .execution-day-lane>div{min-height:72px;display:grid;align-content:start;gap:8px;padding:8px}
.execution-cockpit .execution-day-lane.is-empty>div{align-content:center;color:var(--muted)}
.execution-cockpit .execution-day-lane.is-empty>div>small{padding-left:8px;font-size:10px}
.execution-cockpit .execution-schedule-card{
  min-width:0;
  display:grid;
  grid-template-columns:72px minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--paper);
}
.execution-cockpit .execution-schedule-card.is-meeting{box-shadow:inset 2px 0 0 var(--accent)}
.execution-cockpit .execution-schedule-card.is-activity{box-shadow:inset 2px 0 0 var(--warning)}
.execution-cockpit .execution-schedule-card.is-task{box-shadow:inset 2px 0 0 var(--muted-2)}
.execution-cockpit .execution-schedule-card.is-ended{background:var(--semantic-success-soft);opacity:.8}
.execution-cockpit .execution-schedule-card-time{color:var(--ink-2);font-size:11px;font-weight:700}
.execution-cockpit .execution-schedule-card>div{min-width:0}
.execution-cockpit .execution-schedule-card strong{display:block;overflow:hidden;color:var(--ink);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.execution-cockpit .execution-schedule-card small{display:block;margin-top:4px;overflow:hidden;color:var(--muted);font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.execution-cockpit .execution-schedule-card-actions{display:flex;gap:4px}
.execution-cockpit .execution-schedule-card-actions button{min-height:36px;padding:0 8px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink-2);font-size:10px}
.execution-cockpit .execution-upcoming-rail{border-left:1px solid var(--line);background:var(--paper-soft)}
.execution-cockpit .execution-upcoming-rail>button{width:100%;min-height:64px;display:grid;grid-template-columns:64px minmax(0,1fr) 52px;align-items:center;gap:8px;padding:8px 12px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink);text-align:left}
.execution-cockpit .execution-upcoming-rail>button:hover{background:var(--paper)}
.execution-cockpit .execution-upcoming-rail>button span,
.execution-cockpit .execution-upcoming-rail>button small{color:var(--muted);font-size:10px}
.execution-cockpit .execution-upcoming-rail>button strong{overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.execution-cockpit .execution-upcoming-rail>p{padding:24px;color:var(--muted);font-size:11px}
.execution-cockpit .execution-week-board{min-width:1120px;display:grid;grid-template-columns:repeat(7,minmax(160px,1fr))}
.execution-cockpit .execution-week-board>.execution-day-column{border-right:1px solid var(--line)}
.execution-cockpit .execution-week-board>.execution-day-column:last-child{border-right:0}
.execution-cockpit .execution-week-board .execution-day-lane{grid-template-columns:1fr}
.execution-cockpit .execution-week-board .execution-day-lane>span{padding:8px 12px;border-right:0;border-bottom:1px solid var(--line);text-align:left}
.execution-cockpit .execution-week-board .execution-day-lane>div{min-height:96px}
.execution-cockpit .execution-week-board .execution-schedule-card{grid-template-columns:1fr;gap:4px}
.execution-cockpit .execution-week-board .execution-schedule-card-actions{margin-top:4px}
.execution-cockpit .execution-month-board{min-width:980px;display:grid;grid-template-columns:repeat(7,minmax(140px,1fr))}
.execution-cockpit .execution-month-day{min-height:148px;padding:8px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
.execution-cockpit .execution-month-day.is-outside{background:var(--paper-soft);opacity:.56}
.execution-cockpit .execution-month-day.is-today{box-shadow:inset 0 3px 0 var(--accent)}
.execution-cockpit .execution-month-day>button{width:100%;min-height:32px;display:flex;align-items:center;justify-content:space-between;border:0;background:transparent;color:var(--ink);text-align:left}
.execution-cockpit .execution-month-day>button span{color:var(--muted);font-size:10px}
.execution-cockpit .execution-month-day .execution-schedule-card{grid-template-columns:1fr;margin-top:4px;padding:8px}
.execution-cockpit .execution-month-day .execution-schedule-card-time,
.execution-cockpit .execution-month-day .execution-schedule-card-actions{display:none}
.execution-cockpit .execution-month-more{display:block;padding:8px;color:var(--muted);font-size:10px}

.execution-cockpit .execution-org-overview,
.execution-cockpit .execution-projects-section{
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--paper);
}
.execution-cockpit .execution-projects-section{margin-top:16px}
.execution-cockpit .execution-org-head,
.execution-cockpit .execution-projects-head{
  min-height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 16px;
  border-bottom:1px solid var(--line);
}
.execution-cockpit :is(.execution-org-head,.execution-projects-head) h2{margin:0;font-size:16px}
.execution-cockpit :is(.execution-org-head,.execution-projects-head) p{margin:4px 0 0;color:var(--muted);font-size:11px}
.execution-cockpit .execution-org-controls{display:flex;align-items:flex-end;gap:8px}
.execution-cockpit .execution-org-controls label{display:flex;flex-direction:column;gap:4px;color:var(--muted);font-size:10px}
.execution-cockpit .execution-org-controls :is(select,button){height:44px;padding:0 12px;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--paper);color:var(--ink-2);font-size:12px}
.execution-cockpit .execution-org-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-bottom:1px solid var(--line)}
.execution-cockpit .execution-org-metrics span{min-height:64px;display:flex;align-items:center;gap:8px;padding:0 16px;border-right:1px solid var(--line);color:var(--muted);font-size:11px}
.execution-cockpit .execution-org-metrics span:last-child{border-right:0}
.execution-cockpit .execution-org-metrics b{color:var(--ink);font-size:22px}
.execution-cockpit .execution-org-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;border-bottom:1px solid var(--line)}
.execution-cockpit .execution-org-main{min-width:0;border-right:1px solid var(--line)}
.execution-cockpit .execution-org-side{min-width:0;background:var(--paper-soft)}
.execution-cockpit .execution-org-section-head{min-height:56px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px;border-bottom:1px solid var(--line)}
.execution-cockpit .execution-org-section-head h3{margin:0;font-size:13px}
.execution-cockpit .execution-org-section-head p{margin:4px 0 0;color:var(--muted);font-size:10px}
.execution-cockpit .execution-org-section-head>b{color:var(--muted);font-size:11px}
.execution-cockpit .execution-org-work-row{min-height:64px;display:grid;grid-template-columns:104px minmax(0,1fr) 64px;align-items:center;gap:12px;padding:8px 16px;border-bottom:1px solid var(--line)}
.execution-cockpit .execution-org-work-row:last-child{border-bottom:0}
.execution-cockpit .execution-org-work-row>span{display:flex;flex-direction:column;gap:4px}
.execution-cockpit .execution-org-work-row b{color:var(--accent);font-size:10px}
.execution-cockpit .execution-org-work-row small{color:var(--muted);font-size:10px}
.execution-cockpit .execution-org-work-row>div{min-width:0}
.execution-cockpit .execution-org-work-row>div strong{display:block;overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.execution-cockpit .execution-org-work-row>button{min-height:40px;border:1px solid var(--accent);border-radius:var(--radius-sm);background:var(--accent);color:#fff;font-size:11px}
.execution-cockpit .execution-org-work-row>em{color:var(--muted);font-size:10px;font-style:normal;text-align:center}
.execution-cockpit .execution-org-capacity{padding:8px 16px}
.execution-cockpit .execution-org-capacity article{padding:8px 0}
.execution-cockpit .execution-org-capacity p{display:flex;justify-content:space-between;gap:8px;margin:0;color:var(--muted);font-size:10px}
.execution-cockpit .execution-org-capacity p strong{color:var(--ink-2);font-size:11px}
.execution-cockpit .execution-org-capacity i{display:block;height:4px;margin-top:8px;overflow:hidden;border-radius:4px;background:var(--line)}
.execution-cockpit .execution-org-capacity i b{display:block;height:100%;background:var(--accent)}
.execution-cockpit .execution-org-capacity .is-risk i b{background:var(--danger)}
.execution-cockpit .execution-org-conflicts{padding:16px;border-top:1px solid var(--line)}
.execution-cockpit .execution-org-conflicts>h3{margin:0 0 8px;font-size:12px}
.execution-cockpit .execution-org-conflicts article{padding:8px 0;border-top:1px solid var(--line)}
.execution-cockpit .execution-org-conflicts article strong{font-size:10px}
.execution-cockpit .execution-org-conflicts article p,
.execution-cockpit .execution-org-stable{margin:4px 0 0;color:var(--muted);font-size:10px;line-height:1.5}
.execution-cockpit .execution-org-schedule-list{display:grid;grid-template-columns:repeat(7,minmax(140px,1fr));min-width:980px}
.execution-cockpit .execution-org-schedule{overflow:auto;overscroll-behavior:contain}
.execution-cockpit .execution-org-schedule>.execution-org-section-head{position:sticky;left:0}
.execution-cockpit .execution-org-schedule-list>section{min-width:0;border-right:1px solid var(--line)}
.execution-cockpit .execution-org-schedule-list>section>header{min-height:40px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 12px;border-bottom:1px solid var(--line);background:var(--paper-soft)}
.execution-cockpit .execution-org-schedule-list>section>header strong{font-size:11px}
.execution-cockpit .execution-org-schedule-list>section>header span{color:var(--muted);font-size:9px}
.execution-cockpit .execution-org-schedule-list>section>div{display:grid;gap:8px;padding:8px}
.execution-cockpit .execution-org-schedule-list .execution-schedule-card{grid-template-columns:1fr;gap:4px}
.execution-cockpit .execution-projects-head .execution-progress-stats{padding:0}

@media (max-width:1100px){
  .execution-cockpit .execution-action-hub-layout{grid-template-columns:minmax(0,1fr) 320px}
  .execution-cockpit .execution-today-board{grid-template-columns:minmax(0,1fr) 280px}
  .execution-cockpit .execution-org-layout{grid-template-columns:minmax(0,1fr) 320px}
}

@media (max-width:940px){
  .execution-cockpit .execution-action-hub-layout{grid-template-columns:1fr}
  .execution-cockpit .execution-result-rail{display:grid;grid-template-columns:1fr 1fr}
  .execution-cockpit .execution-rail-section+ .execution-rail-section{border-top:0;border-left:1px solid rgba(255,255,255,.12)}
  .execution-cockpit .execution-schedule-toolbar{align-items:stretch;flex-direction:column}
  .execution-cockpit .execution-date-nav{justify-content:space-between}
  .execution-cockpit .execution-date-nav strong{flex:1;min-width:0}
  .execution-cockpit .execution-view-switch button{flex:1}
  .execution-cockpit .execution-schedule-context{align-items:flex-start;flex-wrap:wrap}
  .execution-cockpit .execution-schedule-legend{flex-basis:100%;justify-content:flex-start}
  .execution-cockpit .execution-schedule-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
  .execution-cockpit .execution-schedule-metrics .is-primary{grid-column:1/-1}
  .execution-cockpit .execution-schedule-metrics>div:nth-child(4){border-right:0}
  .execution-cockpit .execution-today-board{grid-template-columns:1fr}
  .execution-cockpit .execution-upcoming-rail{border-top:1px solid var(--line);border-left:0}
  .execution-cockpit .execution-org-layout{grid-template-columns:1fr}
  .execution-cockpit .execution-org-main{border-right:0;border-bottom:1px solid var(--line)}
}

@media (max-width:640px){
  .attachment-tray{display:grid;grid-template-columns:1fr}
  .attachment-card,.message-attachments .attachment-card{width:100%}
  .execution-cockpit .execution-result-rail{grid-template-columns:1fr}
  .execution-cockpit .execution-rail-section+ .execution-rail-section{border-top:1px solid rgba(255,255,255,.12);border-left:0}
  .execution-cockpit .execution-time-commitments>header{align-items:flex-start;flex-direction:column}
  .execution-cockpit .execution-time-commitments>header button{width:100%}
  .execution-cockpit .execution-date-nav{display:grid;grid-template-columns:44px minmax(0,1fr) 44px}
  .execution-cockpit .execution-date-nav #execution-schedule-today{grid-column:1/-1;grid-row:2}
  .execution-cockpit .execution-date-nav strong{grid-column:2;grid-row:1}
  .execution-cockpit .execution-schedule-context label{flex:1 1 120px;align-items:stretch;flex-direction:column}
  .execution-cockpit .execution-schedule-context select{width:100%}
  .execution-cockpit .execution-schedule-legend{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .execution-cockpit .execution-schedule-metrics{grid-template-columns:1fr 1fr}
  .execution-cockpit .execution-schedule-metrics .is-primary{grid-column:1/-1}
  .execution-cockpit .execution-schedule-metrics>div{border-bottom:1px solid var(--line)}
  .execution-cockpit .execution-schedule-metrics>div:nth-child(odd){border-right:0}
  .execution-cockpit .execution-schedule-metrics>div:last-child{grid-column:1/-1;border-bottom:0}
  .execution-cockpit .execution-week-board{min-width:0;grid-template-columns:1fr}
  .execution-cockpit .execution-week-board>.execution-day-column{border-right:0;border-bottom:1px solid var(--line)}
  .execution-cockpit .execution-week-board .execution-day-lane{grid-template-columns:56px minmax(0,1fr)}
  .execution-cockpit .execution-week-board .execution-day-lane>span{border-right:1px solid var(--line);border-bottom:0;text-align:center}
  .execution-cockpit .execution-week-board .execution-day-lane>div{min-height:64px}
  .execution-cockpit .execution-week-board .execution-schedule-card{grid-template-columns:1fr auto}
  .execution-cockpit .execution-month-board{min-width:0;grid-template-columns:1fr 1fr}
  .execution-cockpit .execution-month-day{min-height:120px}
  .execution-cockpit .execution-month-day.is-outside{display:none}
  .execution-cockpit .execution-schedule-card{grid-template-columns:64px minmax(0,1fr)}
  .execution-cockpit .execution-schedule-card-actions{grid-column:1/-1}
  .execution-cockpit .execution-schedule-card-actions button{min-height:44px;flex:1}
  .execution-cockpit .execution-org-head,
  .execution-cockpit .execution-projects-head{align-items:flex-start;flex-direction:column}
  .execution-cockpit .execution-org-controls{width:100%}
  .execution-cockpit .execution-org-controls label{flex:1}
  .execution-cockpit .execution-org-controls select{width:100%}
  .execution-cockpit .execution-org-metrics{grid-template-columns:1fr 1fr}
  .execution-cockpit .execution-org-metrics span:nth-child(2n){border-right:0}
  .execution-cockpit .execution-org-metrics span:nth-child(-n+2){border-bottom:1px solid var(--line)}
  .execution-cockpit .execution-org-work-row{grid-template-columns:80px minmax(0,1fr)}
  .execution-cockpit .execution-org-work-row>button,
  .execution-cockpit .execution-org-work-row>em{grid-column:1/-1;min-height:44px}
  .execution-cockpit .execution-org-schedule-list{min-width:0;grid-template-columns:1fr}
  .execution-cockpit .execution-org-schedule-list>section{border-right:0;border-bottom:1px solid var(--line)}
}

/* Recording is a first-class content object inside the conversation. */
.composer-meta #composer-status:empty{display:none}
.voice-record-button{
  border-color:transparent!important;
  background:transparent!important;
  color:var(--ink-2)!important;
  box-shadow:none!important;
}
.voice-record-button:hover:not(:disabled){border-color:var(--line)!important;background:var(--paper-soft)!important;color:var(--accent)!important}
.voice-record-button.is-recording{border-color:var(--danger)!important;background:var(--semantic-danger-soft)!important;color:var(--danger)!important}

.recording-surface-active{grid-template-rows:auto minmax(0,1fr)!important}
.recording-workspace,
.recording-detail{
  min-width:0;
  min-height:0;
  overflow:auto;
  background:var(--paper);
  color:var(--ink);
}
.recording-workspace-head,
.recording-detail-head{
  min-height:64px;
  display:flex;
  align-items:center;
  gap:16px;
  padding:0 24px;
  border-bottom:1px solid var(--line);
  background:var(--paper);
}
.recording-workspace-head>span{font-size:13px;font-weight:600}
.recording-back{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:0 8px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--ink-2);
  font-size:13px;
  font-weight:500;
}
.recording-back:hover:not(:disabled){background:var(--paper-soft);color:var(--ink)}
.recording-back svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.recording-workspace-body{
  min-height:calc(100% - 65px);
  display:flex;
  align-items:center;
  flex-direction:column;
  justify-content:center;
  padding:40px 24px 64px;
  text-align:center;
}
.recording-live-state{
  min-height:28px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:0 10px;
  border-radius:6px;
  background:var(--semantic-danger-soft);
  color:var(--danger);
  font-size:12px;
  font-weight:600;
}
.recording-live-state i{width:7px;height:7px;border-radius:50%;background:currentColor}
.recording-live-state.is-paused{background:var(--semantic-warning-soft);color:var(--warning)}
.recording-live-state.is-finishing{background:var(--accent-soft);color:var(--accent)}
.recording-workspace-body h2{margin:24px 0 0;font-size:22px;font-weight:600;letter-spacing:0}
.recording-workspace-body>time{
  display:block;
  min-width:240px;
  margin-top:16px;
  font-variant-numeric:tabular-nums;
  font-size:44px;
  font-weight:500;
  line-height:1.15;
  letter-spacing:0;
}
.recording-signal{height:56px;display:flex;align-items:center;gap:5px;margin-top:24px;color:var(--accent)}
.recording-signal i{width:3px;height:56px;border-radius:2px;background:currentColor;opacity:.72;transform:scaleY(var(--recording-live-scale,var(--recording-idle-scale,.22)));transform-origin:center;transition:transform 160ms ease,opacity 160ms ease}
.recording-signal i:nth-child(1),.recording-signal i:nth-child(9){--recording-idle-scale:.22}
.recording-signal i:nth-child(2),.recording-signal i:nth-child(8){--recording-idle-scale:.39}
.recording-signal i:nth-child(3),.recording-signal i:nth-child(7){--recording-idle-scale:.61}
.recording-signal i:nth-child(4),.recording-signal i:nth-child(6){--recording-idle-scale:.82}
.recording-signal i:nth-child(5){--recording-idle-scale:1}
.recording-signal.is-paused i{transform:scaleY(.06);opacity:.34}
.recording-controls{display:grid;grid-template-columns:88px 72px 88px;align-items:center;gap:28px;margin-top:32px}
.recording-control-secondary{
  min-height:64px;
  display:flex;
  align-items:center;
  flex-direction:column;
  justify-content:center;
  gap:6px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--ink-2);
  font-size:12px;
}
.recording-control-secondary:hover:not(:disabled){background:var(--paper-soft);color:var(--ink)}
.recording-control-secondary svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.recording-control-primary{
  width:72px;
  height:72px;
  display:grid;
  place-items:center;
  border:7px solid var(--semantic-danger-soft);
  border-radius:50%;
  background:var(--danger);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--danger) 25%,transparent);
}
.recording-control-primary span{width:20px;height:20px;border-radius:4px;background:#fff}
.recording-control-primary:hover:not(:disabled){filter:brightness(.94)}
.recording-control-primary:disabled,.recording-control-secondary:disabled{cursor:not-allowed;opacity:.45}
.recording-workspace-body>p{margin:24px 0 0;color:var(--muted);font-size:12px}

.recording-message-card{
  width:min(560px,100%);
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  box-shadow:0 10px 28px rgba(10,26,54,.08);
  color:var(--ink);
  text-align:left;
}
.recording-message-card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
:root[data-theme="dark"] .recording-message-card{background:var(--paper)}
.recording-message-head{
  width:100%;
  min-height:64px;
  display:grid;
  grid-template-columns:30px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border:0;
  background:transparent;
  color:inherit;
  text-align:left;
}
.recording-message-head:hover{background:var(--paper-soft)}
.recording-message-head:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.recording-message-symbol{width:30px;height:30px;display:grid;place-items:center;color:var(--accent);transition:color 160ms ease}
.recording-message-symbol.is-live{color:var(--danger)}
.recording-message-symbol.is-ready{color:var(--success)}
.recording-message-symbol>svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.recording-message-copy{min-width:0;display:flex;flex-direction:column;gap:5px}
.recording-message-copy strong{overflow:hidden;font-size:14px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}
.recording-message-copy>span{overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.recording-message-status{display:flex;align-items:center;gap:6px;color:var(--muted)}
.recording-message-state{min-height:24px;display:inline-flex;align-items:center;gap:5px;color:var(--muted);font-size:11px;font-weight:500;white-space:nowrap}
.recording-message-state::before{width:7px;height:7px;flex:0 0 auto;border-radius:50%;background:currentColor;content:""}
.recording-message-state.is-running{color:var(--accent)}
.recording-message-state.is-success{color:var(--success)}
.recording-message-state.is-danger{color:var(--danger)}
.recording-message-state.is-warning{color:var(--warning)}
.recording-message-state.is-neutral{color:var(--muted)}
.recording-message-arrow{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.recording-message-player{
  min-height:76px;
  display:grid;
  grid-template-columns:70px minmax(0,1fr) 48px;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border-top:1px solid var(--line);
  background:var(--paper-soft);
}
.recording-message-duration{color:var(--ink-2);font-size:20px;font-weight:400;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.recording-message-waveform{height:42px;display:flex;align-items:center;justify-content:center;gap:2px;min-width:0;color:var(--accent);overflow:hidden;contain:paint}
.recording-message-waveform i{width:2px;height:36px;border-radius:2px;background:currentColor;opacity:.62;transform:scaleY(calc(.11 + (var(--recording-bar-level, .12) * .89)));transform-origin:center;transition:transform 120ms linear,opacity 160ms ease}
.recording-message-card[data-recording-state="recording"] .recording-message-waveform i{opacity:.82}
.recording-message-card[data-recording-state="paused"] .recording-message-waveform i{opacity:.36}
.recording-message-card[data-recording-state="failed"] .recording-message-waveform{color:var(--danger)}
.recording-message-card[data-recording-state="report_ready"] .recording-message-waveform,
.recording-message-card[data-recording-state="delivered"] .recording-message-waveform{color:var(--success)}
.recording-message-action{width:48px;height:48px;display:grid;place-items:center;padding:0;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--accent)}
:root[data-theme="dark"] .recording-message-action{background:var(--paper)}
.recording-message-action:hover:not(:disabled){border-color:var(--accent);background:var(--accent-soft)}
.recording-message-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.recording-message-action:disabled{cursor:default;color:var(--muted);opacity:.58}
.recording-message-action[data-recording-action="stop"]{border-color:var(--accent);background:var(--accent);color:#fff}
.recording-message-action[data-recording-action="details"]{color:var(--accent)}
.recording-message-action[data-recording-action="issue"]{border-color:color-mix(in srgb,var(--warning) 38%,var(--line));color:var(--warning)}
.recording-message-action svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.recording-stop-shape{width:15px;height:15px;border-radius:3px;background:currentColor}
.recording-message-instruction{width:min(620px,100%);display:flex;align-items:baseline;gap:10px;margin:8px 0 0;padding:0 4px;color:var(--ink-2);font-size:13px;line-height:1.55}
.recording-message-instruction span{flex:0 0 auto;color:var(--muted);font-size:11px;font-weight:600}
.recording-message-instruction b{font-weight:400}
.message.user:has(.recording-message-card)>.message-content{max-width:min(720px,calc(100% - 52px))}

.recording-detail{display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto}
.recording-detail[hidden],.recording-workspace[hidden]{display:none!important}
.recording-detail-head>div{min-width:0}
.recording-detail-head h2{margin:0;overflow:hidden;font-size:17px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.recording-detail-head span{display:block;margin-top:3px;color:var(--muted);font-size:11px}
.recording-detail-player{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:16px;padding:20px 24px;border-bottom:1px solid var(--line);background:var(--paper-soft)}
.recording-detail-player>button{width:48px;height:48px;display:grid;place-items:center;border:0;border-radius:50%;background:var(--accent);color:#fff}
.recording-detail-player>button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.recording-detail-player>div{min-width:0;display:grid;grid-template-columns:44px minmax(0,1fr) 52px;align-items:center;gap:10px;color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}
.recording-detail-player input{width:100%;accent-color:var(--accent)}
.recording-detail-tabs{min-height:48px;display:flex;align-items:end;gap:24px;padding:0 24px;border-bottom:1px solid var(--line)}
.recording-detail-tabs button{height:48px;padding:0;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted);font-size:13px;font-weight:500}
.recording-detail-tabs button.active{border-color:var(--accent);color:var(--ink)}
.recording-detail-content{min-height:0;overflow:auto;padding:24px}
.recording-detail-content>section{width:min(900px,100%);margin:0 auto}
.recording-detail-loading{padding:64px 16px;color:var(--muted);font-size:13px;text-align:center}
.recording-detail-loading.is-error{
  max-width:560px;
  margin:32px auto;
  padding:18px 20px;
  border:1px solid rgba(240,68,56,.22);
  border-radius:10px;
  background:rgba(240,68,56,.07);
  color:var(--ink-2);
  font-size:14px;
  line-height:1.7;
  text-align:left;
}
.recording-transcript article{display:grid;grid-template-columns:64px minmax(0,1fr);gap:16px;padding:16px 0;border-bottom:1px solid var(--line)}
.recording-transcript article>button{height:32px;padding:0;border:0;border-radius:6px;background:var(--accent-soft);color:var(--accent);font-size:11px;font-variant-numeric:tabular-nums}
.recording-transcript strong{display:block;font-size:12px;font-weight:600}
.recording-transcript p{margin:6px 0 0;color:var(--ink-2);font-size:14px;line-height:1.75}
.recording-summary-overview,.recording-summary-focus{padding:0 0 20px;border-bottom:1px solid var(--line)}
.recording-summary-overview span,.recording-summary-focus span{color:var(--muted);font-size:11px;font-weight:600}
.recording-summary-overview p,.recording-summary-focus p{margin:8px 0 0;font-size:15px;line-height:1.7}
.recording-summary>section+section{padding-top:24px}
.recording-summary h3{margin:0 0 12px;font-size:15px;font-weight:600}
.recording-summary-topics{display:flex;flex-wrap:wrap;gap:8px}
.recording-summary-topics span{min-height:28px;display:inline-flex;align-items:center;padding:0 10px;border:1px solid var(--line);border-radius:6px;background:var(--paper-soft);color:var(--ink-2);font-size:12px}
.recording-summary ol{display:grid;gap:10px;margin:0;padding-left:22px}
.recording-summary li{padding-left:4px;color:var(--ink-2);font-size:14px;line-height:1.65}
.recording-detail-actions{min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 24px;border-top:1px solid var(--line);background:var(--paper)}
.recording-detail-actions>span{color:var(--muted);font-size:12px}
.recording-detail-actions>span[data-tone="success"]{color:var(--success)}
.recording-detail-actions>span[data-tone="danger"]{color:var(--danger)}
.recording-detail-actions>span[data-tone="warning"]{color:var(--warning)}
.recording-detail-actions>button{min-height:44px;padding:0 16px;border:1px solid var(--accent);border-radius:8px;background:var(--accent);color:#fff;font-size:13px;font-weight:500}

@media (max-width:640px){
  .recording-workspace-head,.recording-detail-head{padding:0 12px}
  .recording-workspace-body{padding:32px 16px 48px}
  .recording-workspace-body>time{min-width:0;font-size:38px}
  .recording-controls{grid-template-columns:72px 64px 72px;gap:20px}
  .recording-control-primary{width:64px;height:64px}
  .recording-message-head{grid-template-columns:26px minmax(0,1fr) auto;gap:8px;padding:9px 10px}
  .recording-message-symbol{width:26px;height:26px}
  .recording-message-symbol>svg{width:21px;height:21px}
  .recording-message-status{gap:3px}
  .recording-message-state{font-size:10px}
  .recording-message-state::before{width:6px;height:6px}
  .recording-message-player{grid-template-columns:54px minmax(0,1fr) 42px;gap:8px;min-height:68px;padding:10px}
  .recording-message-duration{font-size:16px}
  .recording-message-waveform{height:34px;gap:1px}
  .recording-message-waveform i{width:2px;height:30px}
  .recording-message-action{width:42px;height:42px}
  .recording-detail-player{padding:16px 12px}
  .recording-detail-player>div{grid-template-columns:40px minmax(0,1fr) 48px;gap:6px}
  .recording-detail-tabs{padding:0 16px}
  .recording-detail-content{padding:16px}
  .recording-transcript article{grid-template-columns:52px minmax(0,1fr);gap:12px}
  .recording-detail-actions{padding:10px 16px}
}

@media (prefers-reduced-motion:reduce){
  .recording-signal i,.recording-message-waveform i,.recording-message-symbol{transition:none}
}
