/* core/studio/studio.css */
/* Nexora Studio — deliberately quiet, data-first work surface.
 * Scoped under #nx-data-studio; no existing Nexora tab is restyled. */
#nx-data-studio {
  --nxst-ink:#16263a;--nxst-sub:#697789;--nxst-line:#e1e6ed;--nxst-gold:#bd9854;
  --nxst-navy:#11273d;--nxst-paper:#fff;--nxst-back:#f5f7f9;--nxst-blue:#315b80;
  position:fixed;inset:0;z-index:2147480004;display:flex;flex-direction:column;
  background:var(--nxst-back);color:var(--nxst-ink);font:13px/1.42 Inter,"Segoe UI",Arial,sans-serif;
  letter-spacing:0;overflow:hidden;-webkit-font-smoothing:antialiased
}
#nx-data-studio *,#nx-data-studio *::before,#nx-data-studio *::after{box-sizing:border-box}
#nx-data-studio [hidden]{display:none!important}
#nx-data-studio button,#nx-data-studio input,#nx-data-studio textarea{font:inherit}
#nx-data-studio button{cursor:pointer}
#nx-data-studio :focus-visible{outline:2px solid #4679ab;outline-offset:2px}
#nx-data-studio .nst-shell{display:flex;flex:1;min-height:0}
#nx-data-studio .nst-content{flex:1;min-width:0;display:flex;flex-direction:column;min-height:0}
#nx-data-studio .nst-head{height:64px;flex:none;background:#fff;display:flex;gap:16px;align-items:center;
  border-bottom:1px solid var(--nxst-line);padding:0 22px}
#nx-data-studio .nst-mark{width:34px;height:34px;display:grid;place-items:center;background:var(--nxst-navy);
  border-radius:10px;color:#e4c582;font-size:18px;font-weight:700;flex:none}
#nx-data-studio .nst-brand{display:flex;flex-direction:column;gap:2px;min-width:160px}
#nx-data-studio .nst-brand strong{font-size:17px;letter-spacing:-.04em;font-weight:650}
#nx-data-studio .nst-brand small{color:var(--nxst-sub);font-size:11px}
#nx-data-studio .nst-head-spacer{flex:1}
#nx-data-studio .nst-button{display:inline-flex;justify-content:center;align-items:center;gap:7px;
  padding:8px 12px;min-height:33px;background:#fff;border:1px solid #dfe5ed;border-radius:8px;
  color:#34465a;font-weight:550;transition:background .13s,border-color .13s}
#nx-data-studio .nst-button:hover{background:#f0f3f7;border-color:#bac6d4}
#nx-data-studio .nst-button:disabled{opacity:.45;cursor:not-allowed}
#nx-data-studio .nst-primary{color:#fff;background:var(--nxst-navy);border-color:var(--nxst-navy)}
#nx-data-studio .nst-primary:hover{background:#22405c;border-color:#22405c}
#nx-data-studio .nst-accent{color:#a67c32}
#nx-data-studio .nst-toolbar{padding:10px 22px;background:#fff;border-bottom:1px solid var(--nxst-line);
  display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-height:54px}
#nx-data-studio .nst-toolbar .nst-sep{height:24px;width:1px;background:#e1e6ec;margin:0 5px}
#nx-data-studio .nst-tool-label{color:var(--nxst-sub);font-size:11px;padding:0 8px}
#nx-data-studio .nst-formulabar{display:flex;align-items:center;gap:10px;padding:8px 22px;background:#fff;
  border-bottom:1px solid var(--nxst-line);min-height:51px}
#nx-data-studio .nst-name-box{width:117px;border:1px solid #e0e5ec;border-radius:7px;padding:7px 10px;
  font-weight:600;color:#425469;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:none}
#nx-data-studio .nst-fx{font-style:italic;font-family:Georgia,serif;color:var(--nxst-gold);font-size:17px;font-weight:700}
#nx-data-studio .nst-formula-input{flex:1;width:0;border:1px solid #e1e6ed;border-radius:8px;
  padding:8px 11px;outline:0;background:#fff;color:#17293f;font-family:ui-monospace,"SFMono-Regular",Consolas,monospace;font-size:12.5px}
#nx-data-studio .nst-formula-input:focus{border-color:#6087ac;box-shadow:0 0 0 2px rgba(58,105,152,.1)}
#nx-data-studio .nst-grid-shell{position:relative;flex:1;min-height:0;margin:0;background:#fff;overflow:hidden}
#nx-data-studio .nst-grid-head{display:flex;height:35px;overflow:hidden;white-space:nowrap;background:#f4f6f8;
  border-bottom:1px solid #cfd8e2;position:relative;z-index:2}
#nx-data-studio .nst-grid-head .nst-corner{width:56px;min-width:56px;background:#f0f3f6;border-right:1px solid #dce3ea}
#nx-data-studio .nst-colhead{height:35px;flex:none;border-right:1px solid #dbe2e9;
  display:flex;justify-content:center;align-items:center;color:#667488;font-size:12px;font-weight:550}
#nx-data-studio .nst-colhead.nst-current{background:#e2eaf2;color:#193c5a}
#nx-data-studio .nst-scroller{overflow:auto;overscroll-behavior:contain;width:100%;height:calc(100% - 35px);
  scrollbar-color:#bfc9d5 #f3f6f8;scrollbar-width:thin;position:relative}
#nx-data-studio .nst-canvas{position:relative;min-height:100%;background:#fff}
#nx-data-studio .nst-row{display:flex;position:absolute;left:0;right:auto;height:var(--nst-row-height,31px);white-space:nowrap}
#nx-data-studio .nst-row-num{height:var(--nst-row-height,31px);width:56px;min-width:56px;display:flex;align-items:center;justify-content:center;
  background:#f6f8fa;border-bottom:1px solid #e4e8ef;border-right:1px solid #d7dfe7;color:#8390a1;
  font-variant-numeric:tabular-nums;font-size:11px;position:sticky;left:0;z-index:1}
#nx-data-studio .nst-row-num.nst-current{background:#e6edf4;color:#183c5d}
#nx-data-studio .nst-cell{height:var(--nst-row-height,31px);flex:none;padding:0 9px;border-right:1px solid #edf0f4;
  border-bottom:1px solid #edf0f4;overflow:hidden;display:flex;align-items:center;color:#344252;cursor:cell;
  font-variant-numeric:tabular-nums;text-overflow:ellipsis;background:#fff}
#nx-data-studio .nst-cell[data-numeric="true"]{justify-content:flex-end}
#nx-data-studio .nst-cell.nst-selected{background:#edf4f9}
#nx-data-studio .nst-cell.nst-active{box-shadow:inset 0 0 0 2px #38688e;background:#fff;position:relative;z-index:1}
#nx-data-studio .nst-cell.nst-error{color:#a54734}
#nx-data-studio .nst-cell.nst-heading{background:#f2f5f8;font-weight:650;color:#273c52}
#nx-data-studio .nst-cell.nst-ai-write{background:#fdf6e8}
#nx-data-studio .nst-cell .nst-val{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}
#nx-data-studio .nst-cell-input{padding:0 8px;width:100%;height:100%;font:inherit;border:0;outline:0;background:#fff;
  color:#10253d;box-shadow:inset 0 0 0 2px #38688e}
#nx-data-studio .nst-bottom{min-height:45px;background:#fff;border-top:1px solid #dce4ed;
  display:flex;align-items:center;gap:4px;padding:5px 18px;flex:none;overflow-x:auto}
#nx-data-studio .nst-sheet-tab{background:transparent;border:1px solid transparent;border-radius:7px 7px 3px 3px;
  padding:8px 14px;color:#68798b;white-space:nowrap;font-weight:550}
#nx-data-studio .nst-sheet-tab:hover{background:#f2f5f8}
#nx-data-studio .nst-sheet-tab.active{background:#eaf0f6;border-color:#dce6ef;color:#203f5b;
  box-shadow:inset 0 -2px #c9a452}
#nx-data-studio .nst-status{margin-left:auto;font-size:11px;color:#7b8797;white-space:nowrap}
#nx-data-studio .nst-agent{width:360px;max-width:42vw;border-left:1px solid var(--nxst-line);
  display:flex;flex-direction:column;background:#fbfcfd;box-shadow:-8px 0 28px rgba(15,39,68,.025)}
#nx-data-studio .nst-agent-top{min-height:64px;border-bottom:1px solid #e6ecf1;display:flex;align-items:center;gap:10px;padding:18px}
#nx-data-studio .nst-agent-spark{width:29px;height:29px;background:#f4ead3;border-radius:9px;color:#a87d38;
  display:grid;place-items:center;font-size:17px}
#nx-data-studio .nst-agent-title{display:flex;flex-direction:column}
#nx-data-studio .nst-agent-title strong{font-size:13px}
#nx-data-studio .nst-agent-title span{font-size:10.5px;color:#8190a0}
#nx-data-studio .nst-agent-body{flex:1;min-height:0;overflow:auto;padding:16px 19px;display:flex;flex-direction:column;gap:14px}
#nx-data-studio .nst-hint{color:#627386;font-size:12px;line-height:1.6}
#nx-data-studio .nst-pill{display:inline-flex;border-radius:6px;background:#eaf0f5;padding:5px 9px;
  font-size:11px;font-family:ui-monospace,monospace;color:#36536f;align-self:flex-start}
#nx-data-studio .nst-task{border:1px solid #e3e9ef;padding:12px;border-radius:10px;background:#fff;
  box-shadow:0 2px 8px rgba(15,39,65,.025)}
#nx-data-studio .nst-task strong{font-size:12px;font-weight:650}
#nx-data-studio .nst-task p{font-size:11.5px;color:#627386;margin:6px 0}
#nx-data-studio .nst-task.good{border-color:#c8dbd0}
#nx-data-studio .nst-task.warn{border-color:#e9d8b5}
#nx-data-studio .nst-review{background:#fffbf3;border:1px solid #e7d5ac;border-radius:10px;padding:13px}
#nx-data-studio .nst-review strong{font-size:12.5px}
#nx-data-studio .nst-review p{font-size:11.5px;color:#76623e;margin:7px 0}
#nx-data-studio .nst-review-actions{display:flex;gap:7px;justify-content:flex-end}
#nx-data-studio .nst-agent-bottom{border-top:1px solid #e5ebf0;padding:15px;background:#fff}
#nx-data-studio .nst-prompt{resize:vertical;min-height:95px;max-height:210px;width:100%;border:1px solid #dce4ec;
  border-radius:10px;padding:11px 12px;background:#fff;outline:0;color:#183047}
#nx-data-studio .nst-prompt:focus{border-color:#7597b8}
#nx-data-studio .nst-agent-actions{display:flex;justify-content:space-between;align-items:center;gap:7px;margin-top:9px}
#nx-data-studio .nst-agent-toggle{position:absolute;right:16px;top:10px;z-index:5}
#nx-data-studio .nst-toast{position:absolute;left:50%;bottom:66px;transform:translateX(-50%);
  background:#142b43;color:#fff;padding:10px 16px;border-radius:9px;box-shadow:0 10px 35px rgba(0,0,0,.12);
  font-size:12px;z-index:20;max-width:min(560px,90vw)}
#nx-data-studio .nst-dialog-back{position:absolute;inset:0;background:rgba(12,28,44,.36);z-index:15;
  display:grid;place-items:center;padding:20px}
#nx-data-studio .nst-dialog{background:#fff;width:min(560px,100%);max-height:80vh;overflow:auto;
  border-radius:16px;padding:25px;box-shadow:0 24px 80px rgba(11,31,50,.25)}
#nx-data-studio .nst-dialog h3{font-size:17px;margin:0 0 8px}
#nx-data-studio .nst-dialog p{color:#667789;font-size:12px;line-height:1.6}
#nx-data-studio .nst-dialog .nst-dialog-buttons{display:flex;gap:9px;justify-content:end;margin-top:20px}
#nx-data-studio.nst-agent-closed .nst-agent{display:none}
#nx-data-studio .nst-sr{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;overflow:hidden}
@media(max-width:1050px){
 #nx-data-studio .nst-head{padding:0 13px;gap:8px}
 #nx-data-studio .nst-toolbar,#nx-data-studio .nst-formulabar{padding-left:12px;padding-right:12px}
 #nx-data-studio .nst-agent{width:310px}
}
@media(max-width:720px){
 #nx-data-studio .nst-brand small{display:none}
 #nx-data-studio .nst-head{height:57px}
 #nx-data-studio .nst-head .nst-button.nst-head-secondary{display:none}
 #nx-data-studio .nst-toolbar{overflow-x:auto;flex-wrap:nowrap}
 #nx-data-studio .nst-agent{position:absolute;right:0;top:57px;bottom:0;width:min(100vw,390px);max-width:none;z-index:8;box-shadow:-8px 0 30px rgba(0,0,0,.15)}
 #nx-data-studio .nst-status{display:none}
}
@media(prefers-reduced-motion:reduce){#nx-data-studio *{animation-duration:.001ms!important;transition-duration:.001ms!important}}

#nx-data-studio[hidden]{display:none!important}
#nx-data-studio .nst-review-diff{max-height:245px;overflow:auto;margin:11px 0;
  border:1px solid #e9dfc9;border-radius:7px;background:#fff}
#nx-data-studio .nst-diff-line{display:grid;grid-template-columns:minmax(72px,1fr) minmax(34px,1fr) 15px minmax(42px,1.2fr);
  gap:7px;padding:7px 9px;border-bottom:1px solid #f3ece0;align-items:center}
#nx-data-studio .nst-diff-line:last-child{border-bottom:none}
#nx-data-studio .nst-diff-line span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:10.5px/1.35 ui-monospace,monospace}
#nx-data-studio .nst-diff-name{color:#536575}
#nx-data-studio .nst-diff-before{color:#946c62;text-decoration:line-through}
#nx-data-studio .nst-diff-arrow{color:#a5a7a8;text-align:center}
#nx-data-studio .nst-diff-after{color:#315f53}

#nx-data-studio .nst-quick-actions{display:flex;gap:8px;flex-wrap:wrap}
#nx-data-studio .nst-quick-actions .nst-button{font-size:11px;white-space:normal;text-align:left;border-color:#e6e5df;color:#596a7b}
#nx-data-studio .nst-steps{border-top:1px solid #e5eaf0;margin-top:9px;padding-top:5px;max-height:190px;overflow:auto}
#nx-data-studio .nst-step{margin:6px 0 0!important;padding-left:10px;border-left:2px solid #d5e0ea;font:11px/1.35 Inter,system-ui!important;color:#607387!important}

#nx-data-studio .nst-follow{align-self:flex-start;color:#476783;border-color:#dce4ea;background:#f5f8fb;font-size:11px}
#nx-data-studio .nst-follow:hover{background:#e9f0f7}
#nx-data-studio .nst-cell.nst-ai-write.nst-selected{background:#f6ecda}
#nx-data-studio .nst-cell.nst-ai-write.nst-active{box-shadow:inset 0 0 0 2px #ad8a49;background:#fff9e9}


/* ═══ Visual refinement: motion belongs to chrome, never scrolling cells ═══ */
@keyframes nst-enter{from{opacity:.65;transform:translate3d(0,9px,0)}to{opacity:1;transform:translate3d(0,0,0)}}
@keyframes nst-panel-enter{from{opacity:.8;transform:translate3d(18px,0,0)}to{opacity:1;transform:translate3d(0,0,0)}}
@keyframes nst-toast-in{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes nst-proposal-in{from{opacity:0;transform:translate3d(0,6px,0)}to{opacity:1;transform:translate3d(0,0,0)}}
#nx-data-studio:not([hidden]){animation:nst-enter .21s cubic-bezier(.2,.75,.2,1) both}
#nx-data-studio .nst-agent{animation:nst-panel-enter .22s cubic-bezier(.2,.75,.2,1) both;
  background:linear-gradient(180deg,#fafcfd 0%,#f9fbfd 100%)}
#nx-data-studio .nst-head{box-shadow:0 1px 0 rgba(15,35,57,.025);z-index:3}
#nx-data-studio .nst-brand strong{font-weight:700;font-size:17.5px;letter-spacing:-.055em}
#nx-data-studio .nst-brand small{font-size:11px;letter-spacing:.025em}
#nx-data-studio .nst-mark{font-size:18px;border:1px solid rgba(255,255,255,.13);
  box-shadow:0 5px 13px rgba(16,40,66,.11),inset 0 1px rgba(255,255,255,.14)}
#nx-data-studio .nst-button{font-size:12px;border-radius:9px;transition:background .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease}
#nx-data-studio .nst-button:hover{box-shadow:0 1px 5px rgba(15,38,61,.055)}
#nx-data-studio .nst-button:active{transform:translateY(.5px)}
#nx-data-studio .nst-toolbar{gap:7px;min-height:57px}
#nx-data-studio .nst-toolbar .nst-button{font-weight:575}
#nx-data-studio .nst-formulabar{background:#fcfdfe}
#nx-data-studio .nst-grid-shell{border-top:1px solid rgba(207,215,225,.3)}
#nx-data-studio .nst-cell{font-size:12.5px;transition:background-color .095s ease;user-select:none;-webkit-user-select:none}
#nx-data-studio .nst-cell:hover:not(.nst-active):not(.nst-selected){background:#f8fafc}
#nx-data-studio .nst-cell.nst-heading{color:#20364d}
#nx-data-studio .nst-cell.nst-active{box-shadow:inset 0 0 0 1.8px #476d91,0 0 0 1px rgba(71,109,145,.07)}
#nx-data-studio .nst-colhead:hover,#nx-data-studio .nst-row-num:hover{background:#e9eef4;color:#364f66}
#nx-data-studio .nst-sheet-tab{transition:background-color .16s ease,color .16s ease;min-height:33px;font-weight:590;font-size:12px}
#nx-data-studio .nst-sheet-tab.active{color:#173a58;background:#eef3f7}
#nx-data-studio .nst-bottom{box-shadow:0 -2px 9px rgba(18,46,73,.025)}
#nx-data-studio .nst-agent-top{background:#fff}
#nx-data-studio .nst-agent-spark{font-weight:700;border:1px solid #e8dcc0}
#nx-data-studio .nst-agent-title strong{font-size:13.5px;letter-spacing:-.015em}
#nx-data-studio .nst-agent-body{gap:12px}
#nx-data-studio .nst-task{border-color:#e4eaf0;animation:nst-proposal-in .19s ease-out both}
#nx-data-studio .nst-review{animation:nst-proposal-in .18s ease-out both}
#nx-data-studio .nst-task.good{background:#f8fcfa}
#nx-data-studio .nst-task.warn{background:#fffbf6}
#nx-data-studio .nst-prompt{line-height:1.55;min-height:105px;transition:border-color .14s ease,box-shadow .14s ease}
#nx-data-studio .nst-prompt:focus{box-shadow:0 0 0 3px rgba(64,104,145,.075);outline:none}
#nx-data-studio .nst-toast{animation:nst-toast-in .2s cubic-bezier(.2,.75,.2,1) both}
#nx-data-studio .nst-formulabar .nst-name-box{font-variant-numeric:tabular-nums}
#nx-data-studio .nst-diff-line{font-variant-numeric:tabular-nums}
#nx-data-studio .nst-dialog{animation:nst-proposal-in .18s ease-out both}
#nx-studio-open-button{transition:background .16s ease,transform .16s ease,box-shadow .16s ease}
#nx-studio-open-button:hover{background:#203d58!important;transform:translateY(-2px);box-shadow:0 12px 28px rgba(19,43,67,.17)!important}
#nx-studio-open-button:active{transform:translateY(0)}
#nx-studio-open-button:focus-visible{outline:2px solid #bc995c;outline-offset:3px}
@media(max-width:780px){
  #nx-data-studio .nst-tool-label{display:none}
  #nx-data-studio .nst-brand{min-width:0}
  #nx-data-studio .nst-head{padding:0 10px}
  #nx-data-studio .nst-head .nst-button{padding:7px 9px}
  #nx-data-studio .nst-agent-bottom{padding:12px}
}
@media(prefers-reduced-motion:reduce){
  #nx-data-studio:not([hidden]),#nx-data-studio .nst-agent,#nx-data-studio .nst-task,
  #nx-data-studio .nst-review,#nx-data-studio .nst-dialog,#nx-data-studio .nst-toast{animation:none!important}
  #nx-data-studio .nst-button,#nx-data-studio .nst-cell,#nx-studio-open-button{transition:none!important}
}


#nx-data-studio .nst-colhead{position:relative}
#nx-data-studio .nst-col-resizer{position:absolute;right:-4px;top:0;bottom:0;width:9px;z-index:4;cursor:col-resize;touch-action:none}
#nx-data-studio .nst-col-resizer::after{content:"";position:absolute;top:7px;bottom:7px;left:4px;width:1px;background:transparent;transition:background .12s ease}
#nx-data-studio .nst-col-resizer:hover::after{background:#6f91b0}
#nx-data-studio .nst-colhead[data-preview-width] .nst-col-resizer::after{background:#b48d4a;width:2px}


#nx-data-studio .nst-context{position:fixed;width:212px;z-index:2147480006;background:#fff;border:1px solid #e1e6ed;
  border-radius:11px;padding:6px;box-shadow:0 14px 44px rgba(18,43,67,.16),0 2px 8px rgba(18,43,67,.06);
  animation:nst-proposal-in .12s ease-out both}
#nx-data-studio .nst-context-item{display:block;width:100%;padding:10px 11px;text-align:left;border:0;
  border-radius:7px;background:transparent;color:#32485d;font:500 12px/1.3 Inter,"Segoe UI",system-ui;cursor:pointer}
#nx-data-studio .nst-context-item:hover,#nx-data-studio .nst-context-item:focus-visible{background:#f0f4f8;color:#173653}
#nx-data-studio .nst-context-item:first-child{color:#a37d3d;font-weight:700}


#nx-data-studio .nst-empty{position:absolute;z-index:5;inset:35px 0 0;background:rgba(250,251,253,.92);
  display:flex;align-items:center;justify-content:center;padding:24px;backdrop-filter:blur(2px)}
#nx-data-studio .nst-empty[hidden]{display:none!important}
#nx-data-studio .nst-welcome{background:#fff;max-width:530px;width:100%;border:1px solid #e4e9ef;
  border-radius:16px;box-shadow:0 10px 42px rgba(19,40,62,.06);padding:38px 38px 34px;
  animation:nst-proposal-in .25s cubic-bezier(.2,.75,.2,1) both}
#nx-data-studio .nst-welcome-kicker{display:block;font-size:10px;letter-spacing:.18em;color:#ab894a;
  text-transform:uppercase;font-weight:750;margin-bottom:13px}
#nx-data-studio .nst-welcome h2{font-size:24px;letter-spacing:-.065em;line-height:1.14;
  color:#162e46;font-weight:680;max-width:410px;margin:0 0 15px}
#nx-data-studio .nst-welcome p{font-size:13px;line-height:1.75;color:#6b7988;margin:0;max-width:455px}
#nx-data-studio .nst-welcome-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:27px}
#nx-data-studio .nst-welcome-actions .nst-button{font-size:12.5px}
@media(max-width:720px){
 #nx-data-studio .nst-empty{padding:12px}
 #nx-data-studio .nst-welcome{padding:25px 21px}
 #nx-data-studio .nst-welcome h2{font-size:21px}
}


#nx-data-studio .nst-modal-input{display:block;width:100%;margin-top:17px;padding:11px 13px;min-height:42px;
  border:1px solid #d4dee9;border-radius:9px;background:#fff;color:#172f46;font:500 13px/1.4 Inter,system-ui}
#nx-data-studio .nst-modal-input:focus{outline:2px solid rgba(60,104,145,.3);outline-offset:1px;border-color:#7194b2}
#nx-data-studio .nst-dialog h3{font-size:18px;letter-spacing:-.035em}


/* ═══════════════════════════════════════════════════════════════════════
   Studio 1.1 — professional working grid, not a floating card dashboard.
   Only scoped under #nx-data-studio, preserving existing Nexora styles.
   ═══════════════════════════════════════════════════════════════════════ */
#nx-data-studio{
  --nst-canvas:#fff;--nst-grid-line:#e2e6eb;--nst-active:#18866c;
  --nst-selected:#e9f4ef;--nst-soft:#f5f7f9;--nst-ink:#1c2d3f;
  background:#fff;color:var(--nst-ink);font-family:Inter,"Segoe UI",system-ui,sans-serif;
}
#nx-data-studio .nst-shell{width:100%;height:100%;background:#fff}
#nx-data-studio .nst-content{width:100%;min-width:0;background:#fff}
#nx-data-studio .nst-head{
  height:62px;min-height:62px;padding:0 19px;gap:13px;
  border-bottom:1px solid #e5e8ed;background:#fff;box-shadow:none
}
#nx-data-studio .nst-mark{width:32px;height:32px;border-radius:9px;background:#172b41;
  color:#d7b76d;box-shadow:none;font-size:18px}
#nx-data-studio .nst-brand{gap:1px;min-width:145px}
#nx-data-studio .nst-brand strong{font-weight:700;letter-spacing:-.045em;font-size:16px}
#nx-data-studio .nst-brand small{font-size:10px;color:#81909d;white-space:nowrap}
#nx-data-studio .nst-document-meta{display:flex;align-items:center;gap:9px;padding-left:15px;
  border-left:1px solid #e6eaf0;min-width:0;max-width:30%;color:#657588}
#nx-data-studio .nst-doc-icon{font-size:18px;line-height:1;color:#698498}
#nx-data-studio .nst-document-title{font-size:12px;font-weight:600;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;color:#334b60;letter-spacing:0}
#nx-data-studio .nst-head .nst-button{min-height:34px;border-radius:7px;
  border-color:#e4e8ee;padding:7px 12px;white-space:nowrap;font-weight:600;box-shadow:none}
#nx-data-studio .nst-head .nst-agent-main{background:#1a3048;color:#fff;
  border-color:#1a3048;font-weight:650}
#nx-data-studio .nst-head .nst-agent-main:hover{background:#294660;color:#fff}
#nx-data-studio .nst-head .nst-close-studio{font-size:22px;width:35px;min-width:35px;
  padding:0;background:transparent;border:0;color:#69798a}
#nx-data-studio .nst-toolbar{display:flex;flex-direction:column;align-items:stretch;gap:0;
  padding:0;background:#fff;border-bottom:1px solid #dce3eb;min-height:0;overflow:visible}
#nx-data-studio .nst-ribbon-tabs{display:flex;gap:3px;align-items:end;min-height:37px;
  padding:1px 16px 0;border-bottom:1px solid #ebeff3;overflow-x:auto;scrollbar-width:none}
#nx-data-studio .nst-ribbon-tab{font:600 12px/1.4 Inter,"Segoe UI",system-ui;
  background:transparent;border:0;border-bottom:2px solid transparent;
  padding:10px 16px 8px;color:#738092;cursor:pointer;white-space:nowrap;
  transition:color .12s,border-color .12s}
#nx-data-studio .nst-ribbon-tab.active{color:#1a354b;border-bottom-color:#b69a5c}
#nx-data-studio .nst-ribbon-tab:hover{color:#24445c;background:#f8fafc}
#nx-data-studio .nst-ribbon-actions{display:flex;align-items:center;gap:7px;
  height:52px;min-height:52px;padding:7px 18px;overflow-x:auto;
  overscroll-behavior-x:contain;scrollbar-width:thin}
#nx-data-studio .nst-ribbon-button{font-size:11.5px;letter-spacing:-.007em;
  padding:7px 12px;min-height:34px;border-color:transparent;background:transparent;
  border-radius:6px;color:#40566b;font-weight:600;white-space:nowrap;flex:none}
#nx-data-studio .nst-ribbon-button:hover{background:#f0f3f7;border-color:#e1e8ef;box-shadow:none}
#nx-data-studio .nst-ribbon-button.nst-type-ai{color:#917240}
#nx-data-studio .nst-formulabar{min-height:50px;height:50px;padding:7px 14px;
  gap:10px;background:#fff;border-bottom:1px solid #dce2e9}
#nx-data-studio .nst-name-box{width:85px;min-width:85px;border:1px solid #dce2e9;
  padding:7px 9px;height:34px;color:#3c5367;font-size:12px;border-radius:5px}
#nx-data-studio .nst-fx{font-size:17px;color:#9f8a57}
#nx-data-studio .nst-formula-input{height:35px;border-radius:5px;padding:7px 11px;
  border:1px solid #dce2e9;font-size:12.5px;background:#fff;color:#19334b;box-shadow:none}
#nx-data-studio .nst-formula-input:focus{border-color:#16886c;box-shadow:0 0 0 1px #16886c}
#nx-data-studio .nst-formulabar .nst-button{height:34px;min-height:34px;
  font-size:11.5px;border-radius:6px;color:#906f34}
#nx-data-studio .nst-grid-shell{background:#fff;border-top:0}
#nx-data-studio .nst-grid-head{height:29px;min-height:29px;background:#f5f6f8;border-bottom:1px solid #dce2e9}
#nx-data-studio .nst-grid-head .nst-corner{height:29px;background:#f3f5f7;border-right-color:#dce2e9}
#nx-data-studio .nst-colhead{height:29px;color:#667382;font-size:11px;font-weight:550;
  border-right:1px solid #e2e5e9;letter-spacing:.02em}
#nx-data-studio .nst-colhead.nst-current{background:#e9f3ee;color:#19765f;
  box-shadow:inset 0 -1px #18866c}
#nx-data-studio .nst-scroller{height:calc(100% - 29px);background:#fff;outline:0}
#nx-data-studio .nst-row{white-space:nowrap}
#nx-data-studio .nst-row-num{background:#f7f8fa;border-bottom:1px solid var(--nst-grid-line);
  border-right:1px solid #dce2e9;font-size:11px;color:#7a8795}
#nx-data-studio .nst-row-num.nst-current{background:#eaf3ee;color:#19765f;font-weight:650}
#nx-data-studio .nst-cell{padding:0 9px;border-right:1px solid var(--nst-grid-line);
  border-bottom:1px solid var(--nst-grid-line);font-size:calc(12.5px * var(--nst-zoom,1));
  font-weight:400;color:#263747;background:#fff;transition:none!important}
#nx-data-studio .nst-cell[data-numeric="true"]{justify-content:flex-end}
#nx-data-studio .nst-cell.nst-heading{background:#f5f7f9;color:#263a4d;
  font-weight:650}
#nx-data-studio .nst-cell.nst-selected{background:var(--nst-selected)}
#nx-data-studio .nst-cell.nst-active,
#nx-data-studio .nst-cell.nst-active.nst-selected{background:#fff;
  box-shadow:inset 0 0 0 2px var(--nst-active)!important;outline:0;
  border-radius:0;position:relative;z-index:2}
#nx-data-studio .nst-cell:hover:not(.nst-active):not(.nst-selected){background:#f9fbfc}
#nx-data-studio .nst-cell.nst-reference{box-shadow:inset 0 0 0 2px #648db1!important;
  background:#f0f5fa!important;z-index:3;position:relative}
#nx-data-studio .nst-cell.nst-reference.nst-active{box-shadow:inset 0 0 0 2px #648db1!important}
#nx-data-studio .nst-cell.nst-wrapped{align-items:center}
#nx-data-studio .nst-cell.nst-wrapped .nst-val{overflow:hidden;white-space:normal;line-height:1.35;
  display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;
  word-break:break-word;text-overflow:ellipsis}
#nx-data-studio .nst-cell-input{background:#fff!important;outline:0!important;
  box-shadow:inset 0 0 0 2px var(--nst-active)!important;border-radius:0;
  font-size:inherit;line-height:1.4}
#nx-data-studio .nst-cell.nst-error{color:#c14a47}
#nx-data-studio .nst-cell.nst-ai-write{background:#fff8e9}
#nx-data-studio .nst-bottom{min-height:39px;height:39px;border-top:1px solid #dce3e9;
  padding:0 13px;gap:0;align-items:stretch;background:#f9fafb;box-shadow:none}
#nx-data-studio .nst-tab-wrap{display:flex;align-items:stretch;gap:0;flex:none;border-right:1px solid #eef0f4}
#nx-data-studio .nst-sheet-tab{background:transparent;border:0!important;border-bottom:2px solid transparent!important;
  border-radius:0;box-shadow:none!important;padding:10px 13px 8px;
  font-size:11.5px;font-weight:550;color:#697889;min-height:0;max-width:240px;
  overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#nx-data-studio .nst-sheet-tab.active{background:#fff;border-bottom:2px solid var(--nst-active)!important;
  color:#1c765f;font-weight:650}
#nx-data-studio .nst-tab-more{border:0;background:#fff;color:#667b8a;padding:0 7px;
  font-size:17px;line-height:1;cursor:pointer}
#nx-data-studio .nst-tab-more:hover{background:#eff3f6}
#nx-data-studio .nst-bottom > .nst-button{border:0;border-radius:0;font-size:17px;background:transparent;
  color:#5d7081;padding:0 14px}
#nx-data-studio .nst-status{display:flex;align-items:center;
  margin:0 0 0 10px;font-size:10.5px;color:#85909c}
#nx-data-studio .nst-selection-stats{margin-left:auto;color:#6c7887;font-variant-numeric:tabular-nums}
#nx-data-studio .nst-sheet-menu{position:fixed;min-width:195px;z-index:2147480011;padding:6px;
  background:#fff;border:1px solid #dce4ec;border-radius:9px;
  box-shadow:0 14px 38px rgba(19,45,68,.15);animation:nst-proposal-in .12s ease-out both}
#nx-data-studio .nst-sheet-option{display:flex;justify-content:flex-start;width:100%;
  border:0;box-shadow:none;background:transparent;font-size:12px;color:#34495d;padding:10px}
#nx-data-studio .nst-sheet-option:hover{background:#f0f4f7}
#nx-data-studio .nst-review-drawer{position:absolute;right:15px;top:165px;bottom:55px;
  width:min(400px,calc(100vw - 30px));overflow-y:auto;z-index:9;background:#fff;
  border:1px solid #dce3ea;border-radius:12px;box-shadow:0 18px 50px rgba(16,39,62,.16);
  padding:0 14px 16px;animation:nst-panel-enter .18s ease-out both}
#nx-data-studio .nst-review-drawer[hidden]{display:none!important}
#nx-data-studio .nst-review-header{display:flex;align-items:center;justify-content:space-between;
  gap:10px;position:sticky;top:0;background:#fff;border-bottom:1px solid #e5eaf0;
  padding:11px 3px;z-index:2}
#nx-data-studio .nst-review-title{font-weight:700;font-size:13px;color:#203951}
#nx-data-studio .nst-icon-button{width:27px!important;min-width:27px;border:none!important;
  padding:0!important;font-size:19px!important;background:transparent!important;color:#6e7d8a!important}
#nx-data-studio .nst-review-scope{display:block;font:11px/1.4 ui-monospace,monospace;
  color:#667a8a;margin:9px 0}
#nx-data-studio .nst-review-list .nst-review{box-shadow:none;border-radius:9px}
#nx-data-studio .nst-ai-dialog{max-width:610px}
#nx-data-studio .nst-ai-kicker{font-size:10px;color:#9b7c44;letter-spacing:.12em;
  text-transform:uppercase;font-weight:750;margin-bottom:8px}
#nx-data-studio .nst-ai-textarea{width:100%;height:136px;resize:vertical;
  border-radius:8px;padding:12px;border:1px solid #cfd9e4;color:#203447;
  font:13px/1.55 Inter,"Segoe UI",sans-serif;outline:0}
#nx-data-studio .nst-ai-textarea:focus{border:1px solid #16866c;box-shadow:0 0 0 1px #16866c}
/* the floating V3 panel beside Studio; once docked inside Studio it takes its own column */
body.nxv3-native-open #nx-data-studio:not([hidden]):not(:has(#NXV3_NATIVE_PNL)){
  right:min(620px,46vw);transition:right .2s cubic-bezier(.2,.75,.2,1)
}
@media(max-width:1020px){
  #nx-data-studio .nst-document-meta{max-width:23%;padding-left:8px}
  #nx-data-studio .nst-head{padding:0 12px}
  body.nxv3-native-open #nx-data-studio:not([hidden]){right:0}
}
@media(max-width:680px){
  #nx-data-studio .nst-head{height:55px;min-height:55px;gap:7px}
  #nx-data-studio .nst-head .nst-button.nst-head-secondary{display:none}
  #nx-data-studio .nst-brand small{display:none}
  #nx-data-studio .nst-document-meta{max-width:22%}
  #nx-data-studio .nst-ribbon-tabs{padding:0 5px}
  #nx-data-studio .nst-ribbon-tab{padding:8px 10px}
  #nx-data-studio .nst-ribbon-actions{padding:5px 8px;min-height:44px;height:44px}
  #nx-data-studio .nst-formulabar{padding:5px 8px;gap:6px}
  #nx-data-studio .nst-formulabar .nst-button{font-size:0!important;min-width:34px}
  #nx-data-studio .nst-formulabar .nst-button::after{content:"✦";font-size:14px}
  #nx-data-studio .nst-status:not(.nst-selection-stats){display:none}
}
@media(prefers-reduced-motion:reduce){
  #nx-data-studio .nst-review-drawer,#nx-data-studio .nst-sheet-menu{animation:none!important}
  body.nxv3-native-open #nx-data-studio:not([hidden]){transition:none!important}
}

#nx-data-studio .nst-cell.nst-section-heading{font-weight:700;color:#28394a}
#nx-data-studio .nst-cell.nst-section-heading .nst-val{font-weight:700}

#nx-data-studio .nst-mark img{display:block;width:23px;height:23px;object-fit:contain}


/* ══════ Studio 2 — compact planning intelligence layered on grid ══════ */
#nx-data-studio .nst-context-pro {
  width:306px; max-height:min(570px,78dvh); overflow:auto;
  padding:7px; border-radius:12px;
  background:rgba(255,255,255,.99);
  border:1px solid #dce3eb;
  box-shadow:0 20px 55px rgba(13,34,57,.16),0 4px 13px rgba(13,34,57,.065);
  backdrop-filter:blur(12px);z-index:30
}
#nx-data-studio .nst-context-header {padding:12px 13px 11px;
  border-bottom:1px solid #edf0f3;background:#f8fafc;border-radius:8px 8px 0 0;
  display:flex;flex-direction:column;gap:4px}
#nx-data-studio .nst-context-eyebrow {color:#9a7f4f;font-size:9px;
  letter-spacing:.13em;font-weight:760}
#nx-data-studio .nst-context-header strong {font-size:12.5px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#233d55;font-weight:680}
#nx-data-studio .nst-context-section {padding:14px 12px 5px;
  font-size:9px;font-weight:770;color:#8795a4;letter-spacing:.105em;text-transform:uppercase}
#nx-data-studio .nst-context-pro .nst-context-item {display:flex;align-items:center;
  gap:10px;min-height:48px;width:100%;padding:8px 10px;border-radius:8px;
  font-size:12px;color:#293e54;text-align:left}
#nx-data-studio .nst-context-pro .nst-context-item:first-child {color:#293e54}
#nx-data-studio .nst-context-pro .nst-context-item:hover {background:#f1f5f9}
#nx-data-studio .nst-context-pro .nst-context-ai:hover {background:#f9f5ec}
#nx-data-studio .nst-context-icon {display:grid;place-items:center;flex:none;
  width:30px;height:30px;background:#f2f5f8;border:1px solid #e9edf1;
  border-radius:8px;font-size:15px;color:#527086;font-weight:680}
#nx-data-studio .nst-context-ai .nst-context-icon {background:#f7f0e4;
  color:#a17c3c;border-color:#eee4d2}
#nx-data-studio .nst-context-copy {min-width:0;display:flex;flex-direction:column;gap:3px;flex:1}
#nx-data-studio .nst-context-copy strong {font-size:11.8px;font-weight:670;color:#243a4e}
#nx-data-studio .nst-context-copy small {font-size:10px;line-height:1.35;color:#8794a0;font-weight:450}
#nx-data-studio .nst-context-spark {font-size:13px;color:#b2935b}
#nx-data-studio .nst-ai-input {border-color:#bd9b59!important;
  box-shadow:inset 0 0 0 1.3px #bd9b59!important;background:#fffdf8!important}
#nx-data-studio .nst-ai-inline {position:absolute;right:17px;bottom:55px;z-index:10;
  width:min(470px,calc(100% - 34px));background:#fff;border:1px solid #dce5ed;
  box-shadow:0 13px 42px rgba(17,43,65,.13),0 2px 8px rgba(17,43,65,.055);
  border-radius:12px;padding:12px 13px;animation:nst-proposal-in .18s ease-out both}
#nx-data-studio .nst-ai-inline[hidden]{display:none!important}
#nx-data-studio .nst-ai-inline[data-tone="running"]{border-color:#d7c6a3}
#nx-data-studio .nst-ai-inline[data-tone="error"]{border-color:#e7bdba}
#nx-data-studio .nst-ai-inline[data-tone="done"]{border-color:#b8d6c7}
#nx-data-studio .nst-ai-inline-top{display:flex;align-items:center;gap:11px}
#nx-data-studio .nst-inline-spark{width:32px;height:32px;flex:none;
  display:grid;place-items:center;background:#faf4e8;border-radius:9px;color:#aa853e;
  border:1px solid #eee3cd;font-size:15px}
#nx-data-studio .nst-ai-inline-copy{display:flex;flex-direction:column;min-width:0;
  flex:1;gap:3px}
#nx-data-studio .nst-ai-inline-copy strong{font-size:12.5px;line-height:1.35;color:#1d384e}
#nx-data-studio .nst-ai-inline-copy span{font-size:11px;line-height:1.35;
  color:#788795;max-height:42px;overflow:hidden;text-overflow:ellipsis}
#nx-data-studio .nst-open-agent{border:1px solid #e4eaf0!important;background:#fafbfd;
  color:#375369!important;font-size:11px!important;padding:8px!important;white-space:nowrap}
#nx-data-studio .nst-ai-dismiss{border:0!important;background:transparent!important;
  font-size:18px!important;color:#8794a0!important;padding:3px 6px!important}
#nx-data-studio .nst-ai-dialog .nst-ai-textarea{min-height:140px;line-height:1.65}
#nx-data-studio .nst-ai-dialog .nst-dialog-buttons{margin-top:16px}
#nx-data-studio .nst-ribbon-actions{background:#fcfdfd;border-top:1px solid #f3f4f6}
#nx-data-studio .nst-ribbon-button.nst-type-ai{
  background:#fbf7ee;border:1px solid #efe4cc;color:#896b38;box-shadow:none}
#nx-data-studio .nst-ribbon-button.nst-type-ai:hover{
  background:#f6eddc;color:#74562b;border-color:#dec89d}
#nx-data-studio .nst-formulabar .nst-accent{background:#f9f4e7;
  border-color:#efdfbf;color:#866a39}
@media(max-width:810px){
 #nx-data-studio .nst-context-pro {width:min(304px,calc(100vw - 20px))}
 #nx-data-studio .nst-ai-inline {right:8px;bottom:48px}
 #nx-data-studio .nst-open-agent {font-size:0!important}
 #nx-data-studio .nst-open-agent::after {content:'Open';font-size:11px}
}
@media(prefers-reduced-motion:reduce){
 #nx-data-studio .nst-ai-inline,#nx-data-studio .nst-context-pro{animation:none!important}
}


/* Studio 1.3 — Excel-style row/column rulers & readable imported BOQ. */
#nx-data-studio .nst-colhead {
  user-select:none; -webkit-user-select:none;cursor:default;
}
#nx-data-studio .nst-col-resizer{
  width:12px;right:-6px;z-index:7;
}
#nx-data-studio .nst-col-resizer::after{
  background:#d3dce5;opacity:0;left:5px;top:5px;bottom:5px;
}
#nx-data-studio .nst-colhead:hover .nst-col-resizer::after,
#nx-data-studio .nst-col-resizer:hover::after{opacity:1;background:#24745e;width:2px}
#nx-data-studio .nst-row-num{
  position:sticky;left:0;z-index:4;overflow:visible;user-select:none;-webkit-user-select:none;
  cursor:default;
}
#nx-data-studio .nst-row-resizer{
  position:absolute;left:0;right:0;bottom:-4px;height:9px;
  z-index:7;cursor:row-resize;touch-action:none;
}
#nx-data-studio .nst-row-resizer::after{
  content:"";position:absolute;left:8px;right:8px;top:4px;height:1px;
  background:transparent;
}
#nx-data-studio .nst-row-num:hover .nst-row-resizer::after,
#nx-data-studio .nst-row-resizer:hover::after{background:#24745e;height:2px}
#nx-data-studio .nst-size-guide{
  position:absolute;z-index:18;pointer-events:none;
  border:0;background:#277a65;opacity:.85;
}
#nx-data-studio .nst-size-guide[hidden]{display:none}
#nx-data-studio .nst-size-guide.nst-size-column{
  width:2px;top:0;bottom:0;height:auto;box-shadow:0 0 0 1px #fff;
}
#nx-data-studio .nst-size-guide.nst-size-row{
  height:2px;left:0;right:0;width:auto;box-shadow:0 0 0 1px #fff;
}
/* Imported BOQ is a structured engineering document, not a generic card
   list. Preserve its readable black type, table borders and hierarchy. */
#nx-data-studio .nst-boq-layout .nst-cell{
  font-family:Arial,"Segoe UI",sans-serif;color:#182331;
  border-right:1px solid #aebbc6;border-bottom:1px solid #cbd3db;
  font-size:calc(12px * var(--nst-zoom,1));
}
#nx-data-studio .nst-boq-layout .nst-cell.nst-heading{
  background:#fff;font-weight:700;color:#152331;
  border-bottom:2px solid #667b8b;
}
#nx-data-studio .nst-boq-layout .nst-cell.nst-section-heading{
  background:#fff;font-weight:700;color:#142333;
}
#nx-data-studio .nst-boq-layout .nst-row-num{
  background:#f7f8fa;border-right:1px solid #9eaebb;
}
#nx-data-studio .nst-boq-layout .nst-cell.nst-wrapped .nst-val{
  line-height:1.36;-webkit-line-clamp:8;overflow-wrap:anywhere;
}
#nx-data-studio .nst-boq-layout .nst-cell.nst-selected{background:#eaf5ee}
#nx-data-studio .nst-boq-layout .nst-cell.nst-active,
#nx-data-studio .nst-boq-layout .nst-cell.nst-active.nst-selected{
  box-shadow:inset 0 0 0 2px var(--nst-active)!important;background:#fff;
}
@media(max-width:900px){
 #nx-data-studio .nst-col-resizer{width:16px;right:-8px}
 #nx-data-studio .nst-row-resizer{height:13px;bottom:-6px}
}
@media(prefers-reduced-motion:reduce){
 #nx-data-studio .nst-size-guide{transition:none}
}


/* Excel-faithful BOQ paper: this belongs to the cells, not the toolbar.
   Light horizontal worksheet rules, strong vertical bill-column separators.
   Unformatted/scratch sheets retain their neutral grid. */
#nx-data-studio .nst-scroller.nst-boq-layout{
  --nst-grid-line:#d1d1d1;
  background:#fff;
  -webkit-font-smoothing:auto;
}
#nx-data-studio .nst-boq-layout .nst-cell{
  font-family:Arial,Calibri,"Segoe UI",sans-serif;
  color:#080808;
  font-size:calc(13px * var(--nst-zoom,1));
  font-weight:400;
  letter-spacing:normal;
  line-height:1.28;
  background:#fff;
  border-bottom:1px solid #d0d0d0;
  border-right:1px solid #d0d0d0;
  border-radius:0;
  opacity:1;
}
#nx-data-studio .nst-boq-layout .nst-cell .nst-val{
  color:inherit;
  opacity:1;
  font-weight:inherit;
  font-size:inherit;
}
#nx-data-studio .nst-boq-layout .nst-cell.nst-boq-table-cell{
  border-right:1px solid #202020;
}
#nx-data-studio .nst-boq-layout .nst-cell.nst-boq-table-first{
  border-left:1px solid #202020;
}
#nx-data-studio .nst-boq-layout .nst-cell.nst-boq-table-last{
  border-right:1px solid #202020;
}
#nx-data-studio .nst-boq-layout .nst-cell.nst-boq-table-header,
#nx-data-studio .nst-boq-layout .nst-cell.nst-heading{
  color:#080808;
  background:#fff;
  font-weight:700;
  border-bottom:1px solid #202020;
}
#nx-data-studio .nst-boq-layout .nst-cell.nst-boq-table-header{
  justify-content:center;
  text-align:center;
}
#nx-data-studio .nst-boq-layout .nst-cell.nst-boq-table-header .nst-val{
  text-align:center;
}
#nx-data-studio .nst-boq-layout .nst-cell.nst-boq-section,
#nx-data-studio .nst-boq-layout .nst-cell.nst-section-heading{
  color:#080808;
  font-weight:700;
  background:#fff;
}
#nx-data-studio .nst-boq-layout .nst-cell.nst-boq-section .nst-val,
#nx-data-studio .nst-boq-layout .nst-cell.nst-section-heading .nst-val{
  text-decoration:underline;
  text-underline-offset:2px;
}
#nx-data-studio .nst-boq-layout .nst-cell[data-numeric="true"]{
  color:#080808;
}
#nx-data-studio .nst-boq-layout .nst-cell.nst-error{
  color:#781d1d;
}
#nx-data-studio .nst-boq-layout .nst-cell.nst-selected{
  background:#e9f3ee;
}
#nx-data-studio .nst-boq-layout .nst-cell.nst-active,
#nx-data-studio .nst-boq-layout .nst-cell.nst-active.nst-selected{
  color:#080808;
  background:#fff;
  box-shadow:inset 0 0 0 2px #18866c!important;
}
#nx-data-studio .nst-boq-layout .nst-row-num{
  color:#333;
  background:#f4f4f4;
  border-right:1px solid #777;
  border-bottom:1px solid #d0d0d0;
}
#nx-data-studio .nst-grid-head.nst-boq-layout .nst-colhead{
  color:#353535;
  background:#f4f4f4;
  border-right:1px solid #b9b9b9;
}
#nx-data-studio .nst-grid-head.nst-boq-layout .nst-colhead.nst-current{
  color:#13684f;
  background:#e6f0ea;
}
/* Keep the ribbon quiet and subordinate to the actual worksheet. */
#nx-data-studio .nst-ribbon-actions .nst-ribbon-button{
  box-shadow:none;
}


/* Crisp, neutral worksheet contrast even on scratch and non-BOQ tabs.
   The document surface uses black ink; Nexora navy/gold remain in its chrome. */
#nx-data-studio{--nst-grid-line:#d0d0d0}
#nx-data-studio .nst-cell{color:#101010}
#nx-data-studio .nst-colhead{color:#494949}
#nx-data-studio .nst-row-num{color:#555}


/* BOQ ink and rules: only the document surface changes; the Nexora chrome
   and ordinary scratch spreadsheets keep their own restrained palette. */
#nx-data-studio .nst-scroller.nst-boq-layout .nst-cell.nst-boq-table-cell{
  color:#000;
  font-family:Arial,Calibri,"Segoe UI",sans-serif;
  font-weight:400;
  border-right:1.5px solid #111;
  border-bottom:1px solid #d2d2d2;
  opacity:1;
}
#nx-data-studio .nst-scroller.nst-boq-layout .nst-cell.nst-boq-table-first{
  border-left:1.5px solid #111;
}
#nx-data-studio .nst-scroller.nst-boq-layout .nst-cell.nst-boq-table-last{
  border-right:1.5px solid #111;
}
#nx-data-studio .nst-scroller.nst-boq-layout .nst-cell.nst-boq-table-header{
  color:#000;
  font-weight:700;
  border-top:1.5px solid #111;
  border-bottom:1.5px solid #111;
  background:#fff;
}
#nx-data-studio .nst-scroller.nst-boq-layout .nst-cell.nst-boq-section,
#nx-data-studio .nst-scroller.nst-boq-layout .nst-cell.nst-section-heading{
  color:#000;font-weight:700;
}
#nx-data-studio .nst-scroller.nst-boq-layout .nst-cell.nst-boq-table-cell .nst-val{
  color:inherit;font-weight:inherit;opacity:1;
}
#nx-data-studio .nst-scroller.nst-boq-layout .nst-cell.nst-error{
  color:#841d1d;
}

/* Studio-only AI output and inline command surface (not the project chat). */
#nx-data-studio .nst-ai-inline{max-width:min(590px,calc(100vw - 28px));border:1px solid #d7e3ec;border-radius:14px;
 background:#fff;box-shadow:0 12px 34px rgba(22,43,64,.15);padding:12px}
#nx-data-studio .nst-ai-inline[data-tone="running"]{border-color:#b79557}
#nx-data-studio .nst-studio-composer[hidden],#nx-data-studio .nst-studio-result[hidden]{display:none!important}
#nx-data-studio .nst-studio-composer{display:grid;gap:8px;margin-top:10px}
#nx-data-studio .nst-studio-prompt{display:block;width:100%;min-height:80px;max-height:170px;resize:vertical;
 box-sizing:border-box;padding:10px 11px;border:1px solid #d6dfe7;border-radius:10px;
 font:13px/1.55 Inter,Arial,sans-serif;color:#13293b;background:#fff}
#nx-data-studio .nst-studio-result{white-space:pre-wrap;overflow:auto;max-height:230px;
 border-top:1px solid #e8edf1;margin-top:10px;padding:11px 2px 2px;
 font:12px/1.6 Inter,Arial,sans-serif;color:#20384e}
#nx-data-studio .nst-ai-inline[data-tone="error"] .nst-studio-result{color:#a04036}
#nx-data-studio .nst-studio-stop{color:#9a443b;border-color:#e1b7ae}


/* Nexora Studio V2: contextual worksheet intelligence; sheet remains the hero. */
#nx-data-studio .nst-v2-quickbar,#nx-data-studio .nst-v2-result{
 position:absolute;z-index:31;background:#fff;border:1px solid #d9e1e8;
 box-shadow:0 15px 48px rgba(12,32,55,.19);font-family:Inter,Arial,sans-serif;
}
#nx-data-studio .nst-v2-quickbar[hidden],#nx-data-studio .nst-v2-result[hidden]{display:none!important}
#nx-data-studio .nst-v2-quickbar{display:flex;align-items:center;gap:6px;
 max-width:calc(100% - 16px);min-height:40px;padding:5px 7px;border-radius:12px;flex-wrap:nowrap}
#nx-data-studio .nst-v2-selection-label{font:600 10px Inter,Arial,sans-serif;color:#718498;
 padding:0 8px;white-space:nowrap;max-width:110px;overflow:hidden;text-overflow:ellipsis}
#nx-data-studio .nst-v2-quickbar button{font:600 11px Inter,Arial,sans-serif;
 white-space:nowrap;cursor:pointer;border:1px solid #dce5eb;border-radius:8px;
 background:#fff;color:#19374d;padding:8px 10px}
#nx-data-studio .nst-v2-quickbar .nst-v2-quick-primary{background:#102b43;color:#fff;border-color:#102b43}
#nx-data-studio .nst-v2-result{width:min(462px,calc(100% - 18px));max-height:min(670px,calc(100% - 90px));
 overflow:auto;box-sizing:border-box;padding:18px;border-radius:17px;color:#163046;scrollbar-width:thin;
 overscroll-behavior:contain}
#nx-data-studio .nst-v2-card-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
#nx-data-studio .nst-v2-kicker{font:700 10px Inter,Arial,sans-serif;letter-spacing:.105em;color:#a37e42}
#nx-data-studio .nst-v2-title{display:block;font:700 16px/1.4 Inter,Arial,sans-serif;color:#122c43;margin:7px 0}
#nx-data-studio .nst-v2-subtitle{font:400 11px/1.6 Inter,Arial,sans-serif;color:#6b7e8d;margin:0 0 13px}
#nx-data-studio .nst-v2-close{background:transparent;border:0;color:#667f90;cursor:pointer;
 padding:5px 8px;font-size:17px;border-radius:7px}
#nx-data-studio .nst-v2-meters{display:grid;grid-template-columns:1fr 1.12fr 1fr;gap:7px;margin:12px 0}
#nx-data-studio .nst-v2-meter{background:#f4f7fa;border:1px solid #e8edf0;padding:11px 8px;
 display:flex;flex-direction:column;align-items:center;gap:6px;border-radius:10px;min-width:0}
#nx-data-studio .nst-v2-meter>span{font-size:8px;font-weight:700;letter-spacing:.06em;color:#788997}
#nx-data-studio .nst-v2-meter>strong{font-size:22px;line-height:1.2;color:#27445a;font-variant-numeric:tabular-nums}
#nx-data-studio .nst-v2-meter>small{font-size:9px;color:#718393;text-align:center}
#nx-data-studio .nst-v2-featured{background:#142d44;border-color:#142d44}
#nx-data-studio .nst-v2-featured>span{color:#cfb380}
#nx-data-studio .nst-v2-featured>strong,#nx-data-studio .nst-v2-featured>small{color:#fff}
#nx-data-studio .nst-v2-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:11px}
#nx-data-studio .nst-v2-fact{display:flex;flex-direction:column;gap:6px;padding:9px 7px;
 border:1px solid #e6ecf1;border-radius:9px;min-width:0;background:#fff}
#nx-data-studio .nst-v2-fact span{font-size:9px;color:#718393}
#nx-data-studio .nst-v2-fact strong{font-size:12px;color:#1a3b53}
#nx-data-studio .nst-v2-details{border-top:1px solid #eef1f4;margin:11px 0}
#nx-data-studio .nst-v2-details summary{font:600 11px Inter,Arial,sans-serif;
 color:#27465d;cursor:pointer;padding:11px 0}
#nx-data-studio .nst-v2-details p{font:11px/1.55 Inter,Arial,sans-serif;color:#536c7f;margin:5px 0}
#nx-data-studio .nst-v2-writeback{display:flex;flex-direction:column;gap:6px;background:#eff7f3;
 border:1px solid #cfe6d8;border-radius:10px;padding:11px;margin:12px 0}
#nx-data-studio .nst-v2-writeback small{font:700 9px Inter,Arial,sans-serif;color:#487565}
#nx-data-studio .nst-v2-writeback strong{font-size:14px;color:#205c47}
#nx-data-studio .nst-v2-writeback span{font-size:10px;color:#526d61}
#nx-data-studio .nst-v2-toggle{display:flex;align-items:center;gap:8px;
 color:#344e62;font:11px Inter,Arial,sans-serif;margin:12px 0}
#nx-data-studio .nst-v2-toggle input{accent-color:#16765b}
#nx-data-studio .nst-v2-card-actions{display:flex;gap:7px;flex-wrap:wrap}
#nx-data-studio .nst-v2-card-actions button,#nx-data-studio .nst-v2-next button,
#nx-data-studio .nst-v2-undo{border:1px solid #d9e1e8;border-radius:9px;
 font:600 11px Inter,Arial,sans-serif;padding:10px 12px;cursor:pointer}
#nx-data-studio .nst-v2-apply{background:#16765b;color:#fff;border-color:#16765b!important}
#nx-data-studio .nst-v2-apply:disabled{background:#aab7b1;cursor:not-allowed}
#nx-data-studio .nst-v2-secondary,#nx-data-studio .nst-v2-undo{background:#fff;color:#28475b}
#nx-data-studio .nst-v2-next{border-top:1px solid #e8edf1;margin-top:15px;padding-top:12px}
#nx-data-studio .nst-v2-next strong{font-size:11px;color:#a37e42}
#nx-data-studio .nst-v2-next p{font-size:11px;color:#678095;line-height:1.5;margin:6px 0 10px}
#nx-data-studio .nst-cell.nst-has-note .nst-val:after{content:"";position:absolute;top:2px;right:2px;
 border-top:6px solid #bd9756;border-left:6px solid transparent}
@media(max-width:720px){
 #nx-data-studio .nst-v2-quickbar{gap:3px;padding:3px}
 #nx-data-studio .nst-v2-selection-label{display:none}
 #nx-data-studio .nst-v2-quickbar button{padding:7px;font-size:10px}
 #nx-data-studio .nst-v2-result{width:min(400px,calc(100% - 12px));padding:12px}
 #nx-data-studio .nst-v2-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce){
 #nx-data-studio .nst-v2-result,#nx-data-studio .nst-v2-quickbar{animation:none!important}
}

#nx-data-studio .nst-v2-scope-options{display:grid;gap:8px;margin:14px 0}
#nx-data-studio .nst-v2-scope-option{text-align:left;cursor:pointer;background:#f5f8fa;
 border:1px solid #dce5ec;border-radius:10px;color:#1b3c55;
 font:600 12px/1.5 Inter,Arial,sans-serif;padding:13px 15px}
#nx-data-studio .nst-v2-scope-option:hover,#nx-data-studio .nst-v2-scope-option:focus-visible{
 border-color:#ad8a4e;background:#fff9f0;outline:2px solid rgba(173,138,78,.15)}
#nx-data-studio .nst-cell.nst-has-note{position:relative}

/* ── Data tools: frozen panes, filter arrows, filter menu, find & replace ── */
#nx-data-studio .nst-grid-head .nst-corner{position:sticky;left:0;z-index:5}
#nx-data-studio .nst-frozen-col{position:sticky!important;z-index:2;background:#fff}
#nx-data-studio .nst-colhead.nst-frozen-col{z-index:4;background:inherit}
#nx-data-studio .nst-freeze-edge{box-shadow:inset -2px 0 0 #9aa7b5}
#nx-data-studio .nst-row.nst-frozen-row{position:sticky;z-index:6;background:#fff}
#nx-data-studio .nst-row.nst-frozen-row .nst-cell{background:#fff}
#nx-data-studio .nst-row.nst-freeze-edge-row{box-shadow:0 2px 0 #9aa7b5}
#nx-data-studio .nst-filter-head{padding-right:26px}
#nx-data-studio .nst-filter-head:not(.nst-frozen-col){position:relative}
#nx-data-studio .nst-filter-btn{position:absolute;right:3px;top:50%;transform:translateY(-50%);width:19px;height:19px;
  border:1px solid #c7d0da;border-radius:4px;background:#fff;color:#4b5a69;font-size:10px;line-height:1;padding:0;cursor:pointer}
#nx-data-studio .nst-filter-btn:hover{border-color:#18866c;color:#18866c}
#nx-data-studio .nst-filter-btn.active{background:#e3f3ee;border-color:#18866c;color:#18866c}
#nx-data-studio .nst-pop{position:absolute;z-index:60;background:#fff;border:1px solid #d6dde5;border-radius:10px;
  box-shadow:0 12px 32px rgba(18,40,62,.18),0 2px 6px rgba(18,40,62,.08);padding:10px;display:flex;flex-direction:column;gap:8px;
  font-size:12.5px;color:#14202c;animation:nstPop .16s cubic-bezier(.2,.8,.2,1)}
@keyframes nstPop{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
#nx-data-studio .nst-filter-menu{width:280px;max-height:430px}
#nx-data-studio .nst-pop-title{font-weight:600;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#nx-data-studio .nst-pop-row{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
#nx-data-studio .nst-pop-actions{justify-content:flex-end}
#nx-data-studio .nst-pop-btn{border:1px solid #d6dde5;background:#fff;border-radius:7px;padding:5px 10px;font:inherit;font-size:12px;cursor:pointer;color:inherit}
#nx-data-studio .nst-pop-btn:hover{background:#f3f6f8}
#nx-data-studio .nst-pop-primary{background:#18866c;border-color:#18866c;color:#fff}
#nx-data-studio .nst-pop-primary:hover{background:#13705a}
#nx-data-studio .nst-pop-search{border:1px solid #d6dde5;border-radius:7px;padding:6px 9px;font:inherit;font-size:12.5px;outline:0}
#nx-data-studio .nst-pop-search:focus{border-color:#18866c;box-shadow:0 0 0 3px rgba(24,134,108,.14)}
#nx-data-studio .nst-pop-list{overflow:auto;max-height:230px;border:1px solid #edf0f4;border-radius:7px;padding:4px}
#nx-data-studio .nst-pop-item{display:flex;align-items:center;gap:8px;padding:3px 5px;border-radius:5px;cursor:pointer}
#nx-data-studio .nst-pop-item:hover{background:#f3f6f8}
#nx-data-studio .nst-pop-item span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#nx-data-studio .nst-pop-item small{color:#7a8794;font-variant-numeric:tabular-nums}
#nx-data-studio .nst-pop-all{font-weight:600;border-bottom:1px solid #edf0f4;border-radius:5px 5px 0 0}
#nx-data-studio .nst-pop-note{color:#5d6b7a;font-size:11.5px}
#nx-data-studio .nst-find{top:64px;right:16px;width:320px;max-height:70%}
#nx-data-studio .nst-find-head{justify-content:space-between}
#nx-data-studio .nst-find-opts{display:grid;grid-template-columns:1fr 1fr;gap:2px}
#nx-data-studio .nst-find-results{overflow:auto;display:flex;flex-direction:column;gap:2px;max-height:260px}
#nx-data-studio .nst-find-hit{display:grid;grid-template-columns:auto 1fr;gap:8px;text-align:left;border:0;background:none;padding:4px 6px;border-radius:5px;font:inherit;font-size:12px;cursor:pointer;color:inherit}
#nx-data-studio .nst-find-hit:hover{background:#f3f6f8}
#nx-data-studio .nst-find-where{font-family:ui-monospace,monospace;color:#18866c}
#nx-data-studio .nst-find-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#5d6b7a}
@media (prefers-reduced-motion:reduce){#nx-data-studio .nst-pop{animation:none}}

/* ── fill handle, data bars, list arrows, menus ── */
#nx-data-studio .nst-fill-handle{position:absolute;z-index:8;width:8px;height:8px;background:#18866c;border:1.5px solid #fff;
  box-shadow:0 0 0 1px #18866c;cursor:crosshair;touch-action:none}
#nx-data-studio .nst-fill-handle:hover{transform:scale(1.25)}
#nx-data-studio .nst-fill-ghost{position:absolute;z-index:7;border:2px dashed #18866c;pointer-events:none;background:rgba(24,134,108,.05)}
#nx-data-studio .nst-cell.nst-data-bar{background-image:linear-gradient(90deg,var(--nst-bar-color) 0,var(--nst-bar-color) var(--nst-bar),transparent var(--nst-bar));
  background-size:100% 70%;background-position:0 50%;background-repeat:no-repeat}
#nx-data-studio .nst-list-btn{position:absolute;right:2px;top:50%;transform:translateY(-50%);width:18px;height:18px;border:1px solid #c7d0da;
  border-radius:4px;background:#fff;color:#4b5a69;font-size:10px;padding:0;cursor:pointer;z-index:2}
#nx-data-studio .nst-cell.nst-active{position:relative}
#nx-data-studio .nst-cell-input.nst-invalid{outline:2px solid #c0392b;background:#fff5f5}
#nx-data-studio .nst-menu{min-width:220px;max-height:440px;overflow:auto;padding:6px;gap:1px}
#nx-data-studio .nst-menu-item{display:flex;align-items:center;gap:9px;width:100%;text-align:left;border:0;background:none;border-radius:6px;
  padding:6px 9px;font:inherit;font-size:12.5px;color:inherit;cursor:pointer}
#nx-data-studio .nst-menu-item:hover,#nx-data-studio .nst-menu-item:focus-visible{background:#eef6f3;outline:0}
#nx-data-studio .nst-menu-item small{margin-left:auto;color:#7a8794}
#nx-data-studio .nst-menu-swatch{width:14px;height:14px;border-radius:3px;border:1px solid rgba(0,0,0,.08);flex:none}
#nx-data-studio .nst-menu-head{font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:#7a8794;padding:8px 9px 3px}
#nx-data-studio .nst-menu-sep{height:1px;background:#edf0f4;margin:4px 2px}
#nx-data-studio .nst-cell.nst-merged-tall{position:relative;z-index:3;background:#fff;align-self:flex-start}
#nx-data-studio .nst-cell.nst-merge-covered{border-right-color:transparent;border-bottom-color:transparent;background:transparent;pointer-events:none}

/* ═════════ Studio V2 shell: ribbon, command search, RTL sheets, dark grid ═════════ */
#nx-data-studio{--v2-ink:#14202c;--v2-muted:#5d6b7a;--v2-line:#dfe5ec;--v2-soft:#f5f7f9;--v2-accent:#18866c;--v2-accent-soft:#e6f4ef;
  --v2-gold:#a87b1f;--v2-gold-soft:#fbf3df;--v2-gold-line:#ead29a;--v2-ease:cubic-bezier(.2,.8,.2,1)}
#nx-data-studio .nst-ribbon-tabs{gap:2px;padding:2px 14px 0;min-height:36px;border-bottom:0;background:#f6f8fa}
#nx-data-studio .nst-ribbon-tab{position:relative;padding:8px 14px 9px;border:0;border-radius:7px 7px 0 0;color:var(--v2-muted);font-weight:550}
#nx-data-studio .nst-ribbon-tab:hover{background:#eceff3;color:var(--v2-ink)}
#nx-data-studio .nst-ribbon-tab.active{background:#fff;color:var(--v2-ink);border-bottom-color:transparent;box-shadow:0 -1px 0 var(--v2-line) inset}
#nx-data-studio .nst-ribbon-tab.active::after{content:"";position:absolute;left:14px;right:14px;bottom:3px;height:2px;border-radius:2px;background:var(--v2-accent)}
#nx-data-studio .nst-ribbon-context{color:var(--v2-gold)}
#nx-data-studio .nst-ribbon-context::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;border-radius:3px 3px 0 0;background:var(--v2-gold-line)}
#nx-data-studio .nst-ribbon-context.active::after{background:var(--v2-gold)}
#nx-data-studio .nst-ribbon-actions{height:auto;min-height:92px;padding:6px 8px 3px;gap:0;align-items:stretch;background:#fff;border-top:1px solid var(--v2-line)}
#nx-data-studio .nst-rgroup{display:flex;flex-direction:column;justify-content:space-between;gap:2px;padding:0 9px;border-right:1px solid var(--v2-line);flex:none;
  animation:nstRise .2s var(--v2-ease) both}
#nx-data-studio .nst-rgroup:last-child{border-right:0}
@keyframes nstRise{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
#nx-data-studio .nst-rgroup-body{display:flex;gap:3px;align-items:flex-start}
#nx-data-studio .nst-rgroup-label{font-size:10.5px;color:#7b8794;text-align:center;letter-spacing:.01em;padding-bottom:1px;white-space:nowrap}
#nx-data-studio .nst-rsmall{display:grid;grid-template-rows:repeat(3,auto);grid-auto-flow:column;gap:1px}
#nx-data-studio .nst-ribbon-actions .nst-ribbon-button{display:flex;align-items:center;gap:6px;border:1px solid transparent;border-radius:6px;background:transparent;
  color:var(--v2-ink);font-weight:500;cursor:pointer;transition:background .12s,border-color .12s}
#nx-data-studio .nst-ribbon-actions .nst-ribbon-button:hover{background:var(--v2-accent-soft);border-color:#cfe6dd}
#nx-data-studio .nst-ribbon-actions .nst-ribbon-button:active{transform:translateY(.5px)}
#nx-data-studio .nst-ribbon-actions .nst-ribbon-button:focus-visible{outline:2px solid var(--v2-accent);outline-offset:1px}
#nx-data-studio .nst-rbig{flex-direction:column;justify-content:flex-start;width:66px;min-height:62px;padding:5px 3px;font-size:11.5px;line-height:1.15;text-align:center;white-space:normal}
#nx-data-studio .nst-rbig .nst-ico{width:26px;height:26px;flex:none}
#nx-data-studio .nst-rsm{padding:2px 8px 2px 5px;min-height:23px;font-size:12px;white-space:nowrap}
#nx-data-studio .nst-rsm .nst-ico{width:16px;height:16px;flex:none}
#nx-data-studio .nst-ricon-only .nst-rlabel{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
#nx-data-studio .nst-rmenu.nst-rbig .nst-rlabel::after{content:" ▾";font-size:9px;color:#7b8794}
#nx-data-studio .nst-rmenu.nst-rsm .nst-rlabel::after{content:" ▾";font-size:9px;color:#7b8794}
#nx-data-studio .nst-ico{stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#nx-data-studio .nst-rgroup-ai .nst-ribbon-button .nst-ico,#nx-data-studio .nst-ribbon-button.nst-type-ai .nst-ico{color:var(--v2-gold)}
#nx-data-studio .nst-rgroup-ai .nst-ribbon-button:hover,#nx-data-studio .nst-ribbon-button.nst-type-ai:hover{background:var(--v2-gold-soft);border-color:var(--v2-gold-line)}
#nx-data-studio.nst-painting .nst-cell{cursor:copy}
/* command search */
#nx-data-studio .nst-search{position:relative;flex:1;max-width:460px;margin:0 16px;display:flex;align-items:center;gap:8px;height:34px;padding:0 10px;
  border:1px solid var(--v2-line);border-radius:8px;background:var(--v2-soft);color:var(--v2-muted);transition:border-color .12s,background .12s}
#nx-data-studio .nst-search:focus-within{background:#fff;border-color:var(--v2-accent);box-shadow:0 0 0 3px rgba(24,134,108,.12)}
#nx-data-studio .nst-search .nst-ico{width:16px;height:16px;flex:none}
#nx-data-studio .nst-search-input{flex:1;min-width:0;border:0;background:transparent;font:inherit;font-size:12.5px;color:var(--v2-ink);outline:0}
#nx-data-studio .nst-search-key{font:500 10.5px ui-monospace,monospace;color:#8a96a3;border:1px solid var(--v2-line);border-radius:4px;padding:1px 5px;background:#fff}
#nx-data-studio .nst-search-results{top:40px;left:0;right:0;padding:5px;gap:1px;max-height:380px;overflow:auto}
#nx-data-studio .nst-search-item{display:flex;align-items:center;gap:9px;width:100%;border:0;background:none;border-radius:6px;padding:7px 9px;font:inherit;font-size:12.5px;
  color:var(--v2-ink);cursor:pointer;text-align:left}
#nx-data-studio .nst-search-item .nst-ico{width:17px;height:17px;flex:none;color:var(--v2-muted)}
#nx-data-studio .nst-search-item small{margin-left:auto;color:#8a96a3;white-space:nowrap}
#nx-data-studio .nst-search-item.active,#nx-data-studio .nst-search-item:hover{background:var(--v2-accent-soft)}
#nx-data-studio .nst-search-ask .nst-ico{color:var(--v2-gold)}
#nx-data-studio .nst-search-ask.active,#nx-data-studio .nst-search-ask:hover{background:var(--v2-gold-soft)}
/* menus opened by the ribbon */
#nx-data-studio .nst-swatches{display:grid;grid-template-columns:repeat(10,20px);gap:4px;padding:4px 6px}
#nx-data-studio .nst-swatch{width:20px;height:20px;border-radius:4px;border:1px solid rgba(0,0,0,.12);padding:0;cursor:pointer}
#nx-data-studio .nst-swatch:hover{transform:scale(1.15);box-shadow:0 2px 6px rgba(0,0,0,.18)}
#nx-data-studio .nst-fn-menu{width:340px}
#nx-data-studio .nst-fn-menu .nst-menu-item small{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* right-to-left sheets: the grid is mirrored, the text inside it is not */
#nx-data-studio .nst-grid-shell.nst-rtl .nst-scroller,#nx-data-studio .nst-grid-shell.nst-rtl .nst-grid-head{transform:scaleX(-1)}
#nx-data-studio .nst-grid-shell.nst-rtl .nst-val,#nx-data-studio .nst-grid-shell.nst-rtl .nst-colhead,
#nx-data-studio .nst-grid-shell.nst-rtl .nst-row-num,#nx-data-studio .nst-grid-shell.nst-rtl .nst-cell-input,
#nx-data-studio .nst-grid-shell.nst-rtl .nst-filter-btn,#nx-data-studio .nst-grid-shell.nst-rtl .nst-list-btn{transform:scaleX(-1)}
#nx-data-studio .nst-grid-shell.nst-rtl .nst-filter-btn{transform:translateY(-50%) scaleX(-1)}
#nx-data-studio .nst-grid-shell.nst-rtl .nst-list-btn{transform:translateY(-50%) scaleX(-1)}
#nx-data-studio .nst-grid-shell.nst-rtl .nst-val{display:block;width:100%;direction:rtl;text-align:right}
#nx-data-studio .nst-grid-shell.nst-rtl .nst-cell[data-numeric="true"] .nst-val{direction:ltr;text-align:left}
/* dark grid */
#nx-data-studio.nst-dark{--v2-ink:#e3e9ef;--v2-muted:#9aa8b6;--v2-line:#2b3744;--v2-soft:#18212b;--v2-accent:#3fbf96;--v2-accent-soft:#163a31;
  --v2-gold:#e3b04f;--v2-gold-soft:#2c2513;--v2-gold-line:#6b5420;--nst-grid-line:#2b3744;background:#0f151b;color:#e3e9ef}
#nx-data-studio.nst-dark .nst-head,#nx-data-studio.nst-dark .nst-toolbar,#nx-data-studio.nst-dark .nst-ribbon-actions,#nx-data-studio.nst-dark .nst-formulabar,
#nx-data-studio.nst-dark .nst-bottom,#nx-data-studio.nst-dark .nst-ribbon-tab.active{background:#141c24;color:#e3e9ef;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-ribbon-tabs,#nx-data-studio.nst-dark .nst-grid-head,#nx-data-studio.nst-dark .nst-colhead,#nx-data-studio.nst-dark .nst-corner,
#nx-data-studio.nst-dark .nst-row-num{background:#18212b!important;color:#9aa8b6;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-scroller,#nx-data-studio.nst-dark .nst-canvas{background:#10171e}
#nx-data-studio.nst-dark .nst-cell{background-color:#10171e;color:#e3e9ef;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-cell.nst-selected{background:#163a31}
#nx-data-studio.nst-dark .nst-frozen-col,#nx-data-studio.nst-dark .nst-row.nst-frozen-row,#nx-data-studio.nst-dark .nst-row.nst-frozen-row .nst-cell,
#nx-data-studio.nst-dark .nst-cell.nst-merged-tall{background:#141c24}
#nx-data-studio.nst-dark .nst-formula-input,#nx-data-studio.nst-dark .nst-name-box,#nx-data-studio.nst-dark .nst-search-input,
#nx-data-studio.nst-dark .nst-cell-input{background:#10171e;color:#e3e9ef;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-pop,#nx-data-studio.nst-dark .nst-search-key{background:#18212b;color:#e3e9ef;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-pop-btn,#nx-data-studio.nst-dark .nst-pop-search{background:#10171e;color:#e3e9ef;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-pop-item:hover,#nx-data-studio.nst-dark .nst-menu-item:hover,#nx-data-studio.nst-dark .nst-find-hit:hover{background:#163a31}
@media (prefers-reduced-motion:reduce){#nx-data-studio .nst-rgroup{animation:none}}
#nx-data-studio .nst-rsmall.nst-rrows{display:flex;flex-direction:column;gap:1px}
#nx-data-studio .nst-rrow{display:flex;gap:1px;align-items:center}
#nx-data-studio .nst-rrow .nst-ricon-only{padding:3px 5px;min-width:26px;justify-content:center}
#nx-data-studio .nst-ribbon-actions{overflow-x:auto;scrollbar-width:thin}
#nx-data-studio.nst-dark .nst-cell.nst-active{background-color:#10171e;box-shadow:inset 0 0 0 2px #3fbf96}
#nx-data-studio.nst-dark .nst-cell.nst-selected{background-color:#163a31}
#nx-data-studio.nst-dark .nst-cell.nst-heading,#nx-data-studio.nst-dark .nst-cell.nst-boq-table-header{background-color:#18212b}
#nx-data-studio.nst-dark .nst-button,#nx-data-studio.nst-dark .nst-head-secondary{background:#18212b;color:#e3e9ef;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-button:hover{background:#1f2a35}
#nx-data-studio.nst-dark .nst-v2-quickbar,#nx-data-studio.nst-dark .nst-v2-result,#nx-data-studio.nst-dark .nst-ai-inline,#nx-data-studio.nst-dark .nst-dialog,
#nx-data-studio.nst-dark .nst-context{background:#18212b;color:#e3e9ef;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-v2-quickbar button:not(.nst-primary){background:#10171e;color:#e3e9ef;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-sheet-tab,#nx-data-studio.nst-dark .nst-tab-more{background:transparent;color:#9aa8b6}
#nx-data-studio.nst-dark .nst-sheet-tab.active{background:#10171e;color:#3fbf96}
#nx-data-studio.nst-dark .nst-fill-handle{border-color:#10171e}
#nx-data-studio.nst-dark .nst-scroller .nst-cell,#nx-data-studio.nst-dark .nst-scroller .nst-boq-layout .nst-cell,
#nx-data-studio.nst-dark .nst-scroller.nst-boq-layout .nst-cell{color:#e3e9ef}
#nx-data-studio.nst-dark .nst-scroller .nst-cell.nst-active,#nx-data-studio.nst-dark .nst-scroller.nst-boq-layout .nst-cell.nst-active{background-color:#10171e;box-shadow:inset 0 0 0 2px #3fbf96}
#nx-data-studio.nst-dark .nst-scroller .nst-cell.nst-selected,#nx-data-studio.nst-dark .nst-scroller.nst-boq-layout .nst-cell.nst-selected{background-color:#163a31}
#nx-data-studio.nst-dark .nst-grid-head .nst-colhead{color:#9aa8b6}
#nx-data-studio.nst-dark .nsti-tools button,#nx-data-studio.nst-dark .nst-ribbon-tabs button:not(.nst-ribbon-tab){background:#18212b;color:#e3e9ef;border-color:#2b3744}
/* preview of a staged proposal */
#nx-data-studio .nst-grid-shell{position:relative}
#nx-data-studio .nst-preview-bar{position:absolute;z-index:30;left:50%;bottom:16px;transform:translateX(-50%);display:flex;align-items:center;gap:12px;
  padding:7px 8px 7px 14px;border-radius:11px;background:#12283e;color:#fff;box-shadow:0 12px 30px rgba(18,40,62,.28);font-size:12.5px;white-space:nowrap;
  animation:nstBarIn .22s cubic-bezier(.2,.8,.2,1)}
@keyframes nstBarIn{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}
#nx-data-studio .nst-preview-bar .nst-ico{width:17px;height:17px;color:#e3b04f}
#nx-data-studio .nst-preview-text span{opacity:.75}
#nx-data-studio .nst-preview-legend{display:flex;align-items:center;gap:6px;opacity:.8;font-size:11.5px}
#nx-data-studio .nst-preview-legend i{width:10px;height:10px;border-radius:2px;background:#f6ecda;box-shadow:inset 0 0 0 1.5px #ad8a49}
#nx-data-studio .nst-preview-btn{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.3);border-radius:7px;padding:5px 11px;font-size:12px;cursor:pointer}
#nx-data-studio .nst-preview-btn:hover{background:rgba(255,255,255,.1)}
#nx-data-studio .nst-preview-apply{background:#18866c;border-color:#18866c;font-weight:600}
#nx-data-studio .nst-preview-apply:hover{background:#1d9a7c}
#nx-data-studio .nst-cell.nst-applied{animation:nstApplied .9s ease-out}
@keyframes nstApplied{0%{background-color:#d8f1e6}100%{background-color:inherit}}
@media (prefers-reduced-motion:reduce){#nx-data-studio .nst-preview-bar,#nx-data-studio .nst-cell.nst-applied{animation:none}}
#nx-data-studio .nst-col-spacer{flex:none;height:100%}

/* ═════════ the Agent panel (one Agent, inside Studio) ═════════ */
#nx-data-studio .nst-shell>.nst-content{flex:1;min-width:0}
#nx-data-studio .nst-dock{flex:none;width:380px;max-width:42vw;display:flex;flex-direction:column;border-left:1px solid var(--v2-line);background:#f8fafb;min-height:0;
  animation:nstDockIn .22s cubic-bezier(.2,.8,.2,1)}
@keyframes nstDockIn{from{opacity:0;transform:translateX(12px)}to{opacity:1;transform:none}}
#nx-data-studio .nst-dock-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 12px 6px}
#nx-data-studio .nst-dock-title{display:flex;align-items:center;gap:7px;font-size:13.5px}
#nx-data-studio .nst-dock-title .nst-ico{width:18px;height:18px;color:var(--v2-gold)}
#nx-data-studio .nst-dock-tools{display:flex;align-items:center;gap:4px}
#nx-data-studio .nst-dock-mini{font-size:11.5px;padding:4px 8px;border-radius:6px;background:transparent;border:1px solid transparent;color:var(--v2-muted)}
#nx-data-studio .nst-dock-mini:hover{background:#eef2f5;border-color:var(--v2-line)}
#nx-data-studio .nst-dock-chips{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px 8px}
#nx-data-studio .nst-dock-chip{font-size:11px;color:var(--v2-muted);background:#fff;border:1px solid var(--v2-line);border-radius:999px;padding:2px 9px}
#nx-data-studio .nst-dock-scope{color:var(--v2-accent);background:var(--v2-accent-soft);border-color:#cfe6dd;animation:nstRise .2s cubic-bezier(.2,.8,.2,1)}
#nx-data-studio .nst-dock-thread{flex:1;min-height:0;overflow:auto;padding:6px 12px 12px;display:flex;flex-direction:column;gap:10px;font-size:13px;line-height:1.5}
#nx-data-studio .nst-dock-hello{padding:14px;border:1px dashed var(--v2-line);border-radius:10px;background:#fff;color:var(--v2-muted)}
#nx-data-studio .nst-dock-hello strong{display:block;color:var(--v2-ink);margin-bottom:4px}
#nx-data-studio .nst-dock-hello p{margin:0;font-size:12.5px}
#nx-data-studio .nst-dock-msg{animation:nstRise .2s cubic-bezier(.2,.8,.2,1);min-width:0}
#nx-data-studio .nst-dock-u{align-self:flex-end;max-width:88%;background:#fff;border:1px solid var(--v2-line);border-radius:12px 12px 3px 12px;padding:8px 11px}
#nx-data-studio .nst-dock-a .nst-dock-body{overflow-wrap:anywhere}
#nx-data-studio .nst-dock-a table{display:block;overflow-x:auto;max-width:100%;font-size:12px}
#nx-data-studio .nst-dock-note .nst-dock-body{background:#fff8e8;border:1px solid var(--v2-gold-line);border-radius:9px;padding:8px 10px;font-size:12.5px}
#nx-data-studio .nst-dock-live{margin:0 12px 6px;font-size:11.5px;color:var(--v2-muted);display:flex;align-items:center;gap:7px}
#nx-data-studio .nst-dock-live::before{content:"";width:8px;height:8px;border-radius:50%;border:1.5px solid var(--v2-gold);border-top-color:transparent;animation:nstSpin .8s linear infinite}
@keyframes nstSpin{to{transform:rotate(360deg)}}
#nx-data-studio .nst-dock-suggest{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px 8px}
#nx-data-studio .nst-dock-sugg{font-size:12px;text-align:left;border:1px solid var(--v2-gold-line);background:var(--v2-gold-soft);color:var(--v2-ink);border-radius:999px;padding:4px 10px;white-space:normal}
#nx-data-studio .nst-dock-sugg:hover{background:#f6e7c1}
#nx-data-studio .nst-dock-form{display:flex;align-items:flex-end;gap:6px;padding:10px 12px 12px;border-top:1px solid var(--v2-line);background:#fff}
#nx-data-studio .nst-dock-input{flex:1;min-width:0;resize:none;border:1px solid var(--v2-line);border-radius:9px;padding:8px 10px;font:inherit;font-size:13px;line-height:1.4;max-height:140px;outline:0}
#nx-data-studio .nst-dock-input:focus{border-color:var(--v2-accent);box-shadow:0 0 0 3px rgba(24,134,108,.12)}
#nx-data-studio .nst-dock-stop{border:1px solid #e6c2c2;color:#a23b3b;background:#fff;border-radius:8px;padding:6px 10px;font-size:12px}
#nx-data-studio.nst-dark .nst-dock,#nx-data-studio.nst-dark .nst-dock-form{background:#141c24;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-dock-hello,#nx-data-studio.nst-dark .nst-dock-u,#nx-data-studio.nst-dark .nst-dock-chip,#nx-data-studio.nst-dark .nst-dock-input{background:#18212b;color:#e3e9ef;border-color:#2b3744}
@media (max-width:900px){#nx-data-studio .nst-dock{position:absolute;right:0;top:0;bottom:0;z-index:70;width:min(380px,92vw);max-width:none;box-shadow:-12px 0 30px rgba(18,40,62,.18)}}
@media (prefers-reduced-motion:reduce){#nx-data-studio .nst-dock,#nx-data-studio .nst-dock-msg{animation:none}}
#nx-data-studio .nst-toolbar,#nx-data-studio .nst-ribbon-actions,#nx-data-studio .nst-formulabar{min-width:0;max-width:100%}
#nx-data-studio .nst-ribbon-actions{overflow-x:auto;overflow-y:hidden}
#nx-data-studio .nst-dock{position:relative;z-index:20}
/* workbook check chips and trace arrows */
#nx-data-studio .nst-colhead{overflow:visible}
#nx-data-studio .nst-check-chip{position:absolute;right:4px;top:50%;transform:translateY(-50%);z-index:3;height:18px;padding:0 7px;border-radius:999px;font-size:10.5px;font-weight:600;
  line-height:16px;cursor:pointer;white-space:nowrap;animation:nstChip .3s cubic-bezier(.2,.8,.2,1)}
@keyframes nstChip{from{opacity:0;transform:translateY(-50%) scale(.7)}to{opacity:1;transform:translateY(-50%) scale(1)}}
#nx-data-studio .nst-check-warn{border:1px solid #d9822b;color:#b4541a;background:#fdeee4}
#nx-data-studio .nst-check-info{border:1px solid #e3c278;color:#94701f;background:#fbf3df}
#nx-data-studio .nst-check-card{width:320px}
#nx-data-studio .nst-trace{position:absolute;left:0;top:0;pointer-events:none;z-index:9;overflow:visible}
#nx-data-studio .nst-trace-box{fill:rgba(46,108,200,.08);stroke:#2e6cc8;stroke-width:1.5;stroke-dasharray:4 3}
#nx-data-studio .nst-trace-box-dep{fill:rgba(190,90,30,.08);stroke:#c0662b}
#nx-data-studio .nst-trace-line{stroke:#2e6cc8;stroke-width:1.6}
#nx-data-studio .nst-trace-line-dep{stroke:#c0662b}
#nx-data-studio .nst-trace marker path{fill:#2e6cc8}
@media (prefers-reduced-motion:reduce){#nx-data-studio .nst-check-chip{animation:none}}
#nx-data-studio .nst-menu-item,#nx-data-studio .nst-search-item,#nx-data-studio .nst-find-hit{justify-content:flex-start}
#nx-data-studio .nst-check-chip.nst-check-compact{right:3px;padding:0 5px;min-width:18px}

/* ── charts: floating cards over the grid (core/studio/charts.js) ──
   Categorical slots in fixed order, validated (scripts/validate_palette.js)
   for colour-blind separation on both surfaces; the dark grid gets its own
   steps, not an inverted copy. Text is ink, never a series colour. */
#nx-data-studio{--nst-s1:#2a78d6;--nst-s2:#eb6834;--nst-s3:#1baf7a;--nst-s4:#eda100;--nst-s5:#e87ba4;--nst-s6:#008300;
  --nst-chart-surface:#fcfcfb;--nst-chart-ink:#0b0b0b;--nst-chart-ink2:#52514e;--nst-chart-muted:#898781;--nst-chart-grid:#e1e0d9;--nst-chart-base:#c3c2b7;
  --nst-chart-ring:rgba(11,11,11,.10)}
#nx-data-studio.nst-dark{--nst-s1:#3987e5;--nst-s2:#d95926;--nst-s3:#199e70;--nst-s4:#c98500;--nst-s5:#d55181;--nst-s6:#008300;
  --nst-chart-surface:#1a1a19;--nst-chart-ink:#f0efec;--nst-chart-ink2:#c3c2b7;--nst-chart-grid:#2c2c2a;--nst-chart-base:#383835;--nst-chart-ring:rgba(255,255,255,.10)}
#nx-data-studio .nst-chart-layer{position:absolute;left:0;top:0;width:0;height:0;z-index:6}
#nx-data-studio .nst-chart{position:absolute;display:flex;flex-direction:column;box-sizing:border-box;background:var(--nst-chart-surface);color:var(--nst-chart-ink);
  border:1px solid var(--nst-chart-ring);border-radius:10px;box-shadow:0 1px 2px rgba(16,24,40,.06),0 8px 24px rgba(16,24,40,.08);
  font:12px/1.35 system-ui,-apple-system,"Segoe UI",sans-serif;outline:none;transition:box-shadow .18s ease,border-color .18s ease}
#nx-data-studio .nst-grid-shell.nst-rtl .nst-chart{transform:scaleX(-1)}
#nx-data-studio .nst-chart:hover{box-shadow:0 1px 2px rgba(16,24,40,.08),0 12px 32px rgba(16,24,40,.12)}
#nx-data-studio .nst-chart-focus{border-color:var(--nst-active,#18866c);box-shadow:0 0 0 2px color-mix(in srgb,var(--nst-active,#18866c) 25%,transparent),0 12px 32px rgba(16,24,40,.12)}
#nx-data-studio .nst-chart-new{animation:nst-chart-in .32s cubic-bezier(.2,.8,.2,1)}
#nx-data-studio .nst-chart-new .nst-bar{transform-box:fill-box;transform-origin:bottom;animation:nst-bar-in .5s cubic-bezier(.2,.8,.2,1) both}
#nx-data-studio .nst-chart-new .nst-line{stroke-dasharray:2000;animation:nst-line-in .8s ease-out both}
@keyframes nst-chart-in{from{opacity:0;transform:translateY(6px) scale(.98)}}
@keyframes nst-bar-in{from{transform:scaleY(0)}}
@keyframes nst-line-in{from{stroke-dashoffset:2000}to{stroke-dashoffset:0}}
#nx-data-studio .nst-chart-moving{opacity:.88;cursor:grabbing;box-shadow:0 18px 40px rgba(16,24,40,.22);transition:none;z-index:2}
#nx-data-studio .nst-chart-sizing{transition:none}
#nx-data-studio .nst-chart-head{display:flex;align-items:center;gap:8px;padding:8px 8px 4px 12px;cursor:grab;user-select:none;min-height:24px}
#nx-data-studio .nst-chart-title{font-weight:600;font-size:13px;color:var(--nst-chart-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
#nx-data-studio .nst-chart-src{font-size:11px;color:var(--nst-chart-muted);white-space:nowrap;font-variant-numeric:tabular-nums}
#nx-data-studio .nst-chart-tools{margin-left:auto;display:flex;gap:2px;opacity:0;transition:opacity .15s}
#nx-data-studio .nst-chart:hover .nst-chart-tools,#nx-data-studio .nst-chart-focus .nst-chart-tools,#nx-data-studio .nst-chart:focus-within .nst-chart-tools{opacity:1}
#nx-data-studio .nst-chart-btn{width:26px;height:24px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--nst-chart-ink2);display:grid;place-items:center;cursor:pointer;font-size:14px}
#nx-data-studio .nst-chart-btn:hover{background:color-mix(in srgb,var(--nst-chart-ink) 8%,transparent)}
#nx-data-studio .nst-chart-btn .nst-ico{width:15px;height:15px}
#nx-data-studio .nst-chart-body{position:relative;flex:1;min-height:0;padding:0 12px 8px}
#nx-data-studio .nst-chart-legend{display:flex;flex-wrap:wrap;gap:4px 14px;height:22px;overflow:hidden;color:var(--nst-chart-ink2);font-size:11.5px}
#nx-data-studio .nst-chart-key{display:inline-flex;align-items:center;gap:6px}
#nx-data-studio .nst-key{display:inline-block;width:10px;height:10px;border-radius:3px;background:currentColor}
#nx-data-studio .nst-chart-svg{display:block;overflow:visible}
#nx-data-studio .nst-chart-grid{stroke:var(--nst-chart-grid);stroke-width:1;shape-rendering:crispEdges}
#nx-data-studio .nst-chart-base{stroke:var(--nst-chart-base)}
#nx-data-studio .nst-chart-tick{fill:var(--nst-chart-muted);font-size:10.5px;font-variant-numeric:tabular-nums}
#nx-data-studio .nst-chart-direct{fill:var(--nst-chart-ink2);font-size:11px}
#nx-data-studio .nst-chart-cross{stroke:var(--nst-chart-base);stroke-width:1;pointer-events:none}
#nx-data-studio .nst-chart-band{fill:var(--nst-chart-ink);opacity:.05;pointer-events:none}
#nx-data-studio .nst-line{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
#nx-data-studio .nst-area{stroke:none;opacity:.16}
#nx-data-studio .nst-dot{stroke:var(--nst-chart-surface);stroke-width:2}
#nx-data-studio .nst-s1{color:var(--nst-s1);fill:var(--nst-s1);stroke:var(--nst-s1)}#nx-data-studio .nst-s2{color:var(--nst-s2);fill:var(--nst-s2);stroke:var(--nst-s2)}
#nx-data-studio .nst-s3{color:var(--nst-s3);fill:var(--nst-s3);stroke:var(--nst-s3)}#nx-data-studio .nst-s4{color:var(--nst-s4);fill:var(--nst-s4);stroke:var(--nst-s4)}
#nx-data-studio .nst-s5{color:var(--nst-s5);fill:var(--nst-s5);stroke:var(--nst-s5)}#nx-data-studio .nst-s6{color:var(--nst-s6);fill:var(--nst-s6);stroke:var(--nst-s6)}
#nx-data-studio .nst-bar.nst-s1,#nx-data-studio .nst-bar.nst-s2,#nx-data-studio .nst-bar.nst-s3,#nx-data-studio .nst-bar.nst-s4,#nx-data-studio .nst-bar.nst-s5,#nx-data-studio .nst-bar.nst-s6,
#nx-data-studio .nst-area{stroke:none}
#nx-data-studio .nst-line{fill:none}
/* pie / doughnut: slices parted by a surface-coloured hairline; the share in ink on the slice */
#nx-data-studio .nst-slice{stroke:var(--nst-chart-surface);stroke-width:1.5}
#nx-data-studio .nst-key-swatch{stroke:none}
#nx-data-studio .nst-chart-slice-label{fill:#fff;font-size:11px;font-weight:600;pointer-events:none}
#nx-data-studio .nst-chart-empty{display:grid;place-items:center;height:100%;color:var(--nst-chart-ink2);text-align:center;padding:0 20px}
#nx-data-studio .nst-chart-tip{position:absolute;z-index:3;min-width:140px;max-width:260px;padding:8px 10px;border-radius:8px;background:var(--nst-chart-surface);color:var(--nst-chart-ink);
  border:1px solid var(--nst-chart-ring);box-shadow:0 8px 24px rgba(16,24,40,.16);pointer-events:none;font-size:12px}
#nx-data-studio .nst-chart-tip-title{font-weight:600;margin-bottom:4px}
#nx-data-studio .nst-chart-tip-row{display:flex;align-items:center;gap:6px;color:var(--nst-chart-ink2)}
#nx-data-studio .nst-chart-tip-row b{margin-left:auto;padding-left:12px;color:var(--nst-chart-ink);font-weight:600;font-variant-numeric:tabular-nums}
#nx-data-studio .nst-chart-table-wrap{display:none;position:absolute;inset:0 12px 8px;overflow:auto}
#nx-data-studio .nst-chart-table .nst-chart-table-wrap{display:block}
#nx-data-studio .nst-chart-table .nst-chart-plot,#nx-data-studio .nst-chart-table .nst-chart-legend{visibility:hidden}
#nx-data-studio .nst-chart-data{border-collapse:collapse;width:100%;font-size:11.5px;font-variant-numeric:tabular-nums}
#nx-data-studio .nst-chart-data th,#nx-data-studio .nst-chart-data td{padding:3px 8px;border-bottom:1px solid var(--nst-chart-grid);text-align:right;white-space:nowrap}
#nx-data-studio .nst-chart-data th{text-align:left;color:var(--nst-chart-ink2);font-weight:500;position:sticky;top:0;background:var(--nst-chart-surface)}
#nx-data-studio .nst-chart-grip{position:absolute;right:2px;bottom:2px;width:14px;height:14px;cursor:nwse-resize;opacity:0;transition:opacity .15s;
  background:linear-gradient(135deg,transparent 50%,var(--nst-chart-base) 50%,var(--nst-chart-base) 60%,transparent 60%,transparent 72%,var(--nst-chart-base) 72%,var(--nst-chart-base) 82%,transparent 82%)}
#nx-data-studio .nst-chart:hover .nst-chart-grip,#nx-data-studio .nst-chart-focus .nst-chart-grip{opacity:1}
#nx-data-studio .nst-chart-rec{min-width:320px}
#nx-data-studio .nst-chart-rec .nst-menu-item{flex-wrap:wrap}
#nx-data-studio .nst-chart-rec .nst-menu-item small{flex-basis:100%;margin-left:0;white-space:normal;text-align:left}
@media (prefers-reduced-motion:reduce){#nx-data-studio .nst-chart-new,#nx-data-studio .nst-chart-new .nst-bar,#nx-data-studio .nst-chart-new .nst-line{animation:none}}
@media (forced-colors:active){#nx-data-studio .nst-bar,#nx-data-studio .nst-area{forced-color-adjust:none}}

/* ── tool panels: loading, what-if (core/studio/planning.js) ── */
#nx-data-studio .nst-tool-panel{position:absolute;z-index:40;width:340px;max-width:calc(100% - 24px);padding:12px 14px 14px;border-radius:12px;background:#fff;color:var(--v2-ink,#14202c);
  border:1px solid var(--v2-line,#dfe5ec);box-shadow:0 14px 40px rgba(16,24,40,.18);font:12.5px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif;animation:nst-tool-in .18s cubic-bezier(.2,.8,.2,1)}
@keyframes nst-tool-in{from{opacity:0;transform:translateY(-4px)}}
#nx-data-studio .nst-tool-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
#nx-data-studio .nst-tool-head strong{font-size:13.5px}
#nx-data-studio .nst-tool-close{border:0;background:transparent;font-size:18px;line-height:1;color:var(--v2-muted,#5d6b7a);cursor:pointer;padding:2px 6px;border-radius:6px}
#nx-data-studio .nst-tool-close:hover{background:var(--v2-soft,#f5f7f9)}
#nx-data-studio .nst-tool-note{margin:0 0 8px;color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nst-tool-fine{margin:8px 0;color:var(--v2-muted,#5d6b7a);font-size:11.5px}
#nx-data-studio .nst-tool-list{display:grid;gap:4px}
#nx-data-studio .nst-tool-check{display:grid;grid-template-columns:18px 1fr;column-gap:8px;align-items:center;padding:6px 8px;border-radius:8px;cursor:pointer}
#nx-data-studio .nst-tool-check:hover{background:var(--v2-soft,#f5f7f9)}
#nx-data-studio .nst-tool-check small{grid-column:2;color:var(--v2-muted,#5d6b7a);font-size:11px}
#nx-data-studio .nst-tool-check input{accent-color:var(--v2-accent,#18866c)}
#nx-data-studio .nst-tool-field{display:grid;grid-template-columns:56px 1fr;align-items:center;gap:8px;margin:6px 0}
#nx-data-studio .nst-tool-field span{color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nst-tool-field select{height:30px;border:1px solid var(--v2-line,#dfe5ec);border-radius:7px;padding:0 6px;background:#fff;color:inherit;font:inherit}
#nx-data-studio .nst-tool-slider{grid-template-columns:56px 1fr 52px}
#nx-data-studio .nst-tool-slider input{accent-color:var(--v2-accent,#18866c)}
#nx-data-studio .nst-tool-slider b{text-align:right;font-variant-numeric:tabular-nums}
#nx-data-studio .nst-tool-result{margin-top:8px;padding-top:8px;border-top:1px solid var(--v2-line,#dfe5ec)}
#nx-data-studio .nst-tool-sum{display:flex;align-items:baseline;gap:8px;margin-bottom:4px}
#nx-data-studio .nst-tool-sum b{font-size:15px;font-variant-numeric:tabular-nums}
#nx-data-studio .nst-tool-sum em{font-style:normal;font-weight:600;font-variant-numeric:tabular-nums;color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nst-tool-sum em.nst-good{color:#006300}#nx-data-studio .nst-tool-sum em.nst-bad{color:#b42318}
#nx-data-studio .nst-tool-row{display:flex;justify-content:space-between;width:100%;padding:4px 8px;border:0;border-radius:6px;background:transparent;color:inherit;font:inherit;cursor:pointer}
#nx-data-studio .nst-tool-row:hover{background:var(--v2-soft,#f5f7f9)}
#nx-data-studio .nst-tool-row b{font-weight:600;font-variant-numeric:tabular-nums}
#nx-data-studio .nst-tool-go{width:100%;margin-top:10px;height:34px}
#nx-data-studio.nst-dark .nst-tool-panel,#nx-data-studio.nst-dark .nst-tool-field select{background:#141c24;color:#e3e9ef;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-tool-check:hover,#nx-data-studio.nst-dark .nst-tool-row:hover{background:#18212b}
#nx-data-studio.nst-dark .nst-tool-sum em.nst-good{color:#0ca30c}#nx-data-studio.nst-dark .nst-tool-sum em.nst-bad{color:#e66767}
@media (prefers-reduced-motion:reduce){#nx-data-studio .nst-tool-panel{animation:none}}
/* cell history */
#nx-data-studio .nst-history{width:380px}
#nx-data-studio .nst-history-list{display:grid;gap:2px;max-height:360px;overflow:auto;margin:0 -6px}
#nx-data-studio .nst-history-row{display:grid;grid-template-columns:1fr auto;gap:2px 10px;align-items:center;padding:7px 6px;border-radius:8px}
#nx-data-studio .nst-history-row:hover{background:var(--v2-soft,#f5f7f9)}
#nx-data-studio .nst-history-meta{display:flex;gap:8px;align-items:baseline;font-size:11.5px;color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nst-history-meta b{color:var(--v2-ink,#14202c);font-weight:600}
#nx-data-studio .nst-history-change{grid-column:1;display:flex;gap:6px;align-items:center;min-width:0}
#nx-data-studio .nst-history-change code{font:12px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;background:var(--v2-soft,#f5f7f9);padding:1px 5px;border-radius:4px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#nx-data-studio .nst-history-arrow{color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nst-history-restore{grid-column:2;grid-row:1/3;border:1px solid var(--v2-line,#dfe5ec);background:#fff;border-radius:7px;padding:4px 8px;font:inherit;font-size:11.5px;cursor:pointer;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#nx-data-studio .nst-history-restore:hover{border-color:var(--v2-accent,#18866c);color:var(--v2-accent,#18866c)}
#nx-data-studio .nst-history-latest .nst-history-meta b::after{content:" · latest";font-weight:400;color:var(--v2-muted,#5d6b7a)}
#nx-data-studio.nst-dark .nst-history-change code{background:#18212b}
#nx-data-studio.nst-dark .nst-history-restore{background:#141c24;color:#e3e9ef;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-history-row:hover{background:#18212b}
#nx-data-studio.nst-dark .nst-history-meta b{color:#e3e9ef}

/* Quick actions: a corner button on a range, opened on demand (Excel's Quick Analysis) */
#nx-data-studio .nst-v2-qa{position:absolute;z-index:30;width:26px;height:26px;padding:0;border-radius:8px;border:1px solid var(--v2-line,#dfe5ec);
  background:#fff;color:#9b752e;display:grid;place-items:center;cursor:pointer;box-shadow:0 4px 12px rgba(16,24,40,.14);
  animation:nst-qa-in .16s cubic-bezier(.2,.8,.2,1);transition:transform .12s,box-shadow .12s}
#nx-data-studio .nst-v2-qa[hidden]{display:none!important}
#nx-data-studio .nst-v2-qa:hover{transform:scale(1.08);box-shadow:0 6px 16px rgba(16,24,40,.2)}
#nx-data-studio .nst-v2-qa svg{width:15px;height:15px;fill:currentColor}
@keyframes nst-qa-in{from{opacity:0;transform:scale(.7)}}
#nx-data-studio .nst-v2-quickbar{flex-direction:column;align-items:stretch;gap:2px;width:260px;padding:6px;border-radius:12px}
#nx-data-studio .nst-v2-quickbar .nst-v2-selection-label{padding:4px 8px 6px}
#nx-data-studio .nst-v2-quickbar button{display:grid;text-align:left;gap:1px;padding:8px 10px;border-radius:8px;border:0;background:transparent}
#nx-data-studio .nst-v2-quickbar button:hover{background:var(--v2-soft,#f5f7f9)}
#nx-data-studio .nst-v2-quickbar button strong{font:600 12.5px Inter,system-ui,sans-serif}
#nx-data-studio .nst-v2-quickbar button small{font:400 11px Inter,system-ui,sans-serif;color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nst-v2-quickbar .nst-v2-quick-primary{background:#102b43;color:#fff}
#nx-data-studio .nst-v2-quickbar .nst-v2-quick-primary small{color:#c9d6e2}
#nx-data-studio .nst-v2-quickbar .nst-v2-quick-primary:hover{background:#163a59}
#nx-data-studio.nst-dark .nst-v2-qa{background:#141c24;border-color:#2b3744;color:#d6b26a}
@media (prefers-reduced-motion:reduce){#nx-data-studio .nst-v2-qa{animation:none}}

#nx-data-studio .nst-head-history{display:flex;gap:2px;margin-right:8px;padding:2px;border:1px solid var(--v2-line,#dfe5ec);border-radius:10px;background:#fff}
#nx-data-studio .nst-head-icon{width:36px;height:34px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--v2-ink,#14202c);display:grid;place-items:center;cursor:pointer}
#nx-data-studio .nst-head-icon:hover:not(:disabled){background:var(--v2-soft,#f5f7f9)}
#nx-data-studio .nst-head-icon:disabled{opacity:.35;cursor:default}
#nx-data-studio .nst-head-icon .nst-ico{width:19px;height:19px}
#nx-data-studio.nst-dark .nst-head-history{background:#141c24;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-head-icon{color:#e3e9ef}
/* touch screens have no hover: show the chart tools and the resize grip */
@media (hover:none){#nx-data-studio .nst-chart-tools,#nx-data-studio .nst-chart-grip{opacity:1}}

/* ── Compare BOQs (core/studio/compare.js) ──
   Each BOQ is drawn in its own form; a change is struck through and the new value written in.
   Change kinds carry a colour, a symbol and a word, never the colour alone. */
#nx-data-studio{--nsc-add:#0a7d2c;--nsc-add-bg:#dcf3e1;--nsc-del:#b42318;--nsc-del-bg:#fde2e1;--nsc-chg:#a15c00;--nsc-chg-bg:#fff1c7;
  --nsc-move:#6b3fc4;--nsc-move-bg:#efe7fd;--nsc-rev:#b54708;--nsc-rev-bg:#ffe4cc;--nsc-up:#d03b3b;--nsc-down:#2a78d6;--nsc-surface:#fff;--nsc-page:#f3f5f8;--nsc-hatch:#e6eaf0;--nsc-line:#e3e8ee;--nsc-rule:#d3dae3}
#nx-data-studio.nst-dark{--nsc-add:#5cd17a;--nsc-add-bg:#12341f;--nsc-del:#f2837a;--nsc-del-bg:#3c1714;--nsc-chg:#f0c060;--nsc-chg-bg:#3a2c08;
  --nsc-move:#b9a0f5;--nsc-move-bg:#271c45;--nsc-rev:#f0a35e;--nsc-rev-bg:#3a2210;--nsc-up:#e66767;--nsc-down:#3987e5;--nsc-surface:#141c24;--nsc-page:#0f161d;--nsc-hatch:#1d2733;--nsc-line:#212c38;--nsc-rule:#2c3946}
#nx-data-studio .nsc{position:absolute;inset:0;z-index:70;display:flex;flex-direction:column;background:var(--nsc-page);color:var(--v2-ink,#14202c);
  font:13px/1.45 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;animation:nsc-in .2s cubic-bezier(.2,.8,.2,1)}
#nx-data-studio .nsc.nsc-leaving{animation:nsc-out .16s ease-in forwards}
@keyframes nsc-in{from{opacity:0;transform:translateY(8px)}}@keyframes nsc-out{to{opacity:0;transform:translateY(6px)}}
/* the bar */
#nx-data-studio .nsc-head{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px 14px;padding:10px 14px;background:var(--nsc-surface);border-bottom:1px solid var(--v2-line,#dfe5ec)}
#nx-data-studio .nsc-title{display:flex;align-items:center;gap:8px;align-self:center}
#nx-data-studio .nsc-title svg{width:22px;height:22px;fill:none;stroke:#9b752e;stroke-width:1.8;stroke-linecap:round}
#nx-data-studio .nsc-title strong{font-size:15px;white-space:nowrap}
#nx-data-studio .nsc-pick{display:flex;align-items:flex-end;gap:6px;flex:1 1 380px;min-width:0;max-width:600px}
#nx-data-studio .nsc-pick>button{flex:none}
#nx-data-studio .nsc-select{display:grid;gap:2px;flex:1 1 120px;min-width:0;max-width:220px}
#nx-data-studio .nsc-select span{font-size:10px;font-weight:650;letter-spacing:.05em;text-transform:uppercase;color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nsc-select select{width:100%;min-width:0;height:32px;border:1px solid var(--v2-line,#dfe5ec);border-radius:8px;padding:0 8px;background:var(--nsc-surface);color:inherit;font:inherit}
#nx-data-studio .nsc-swap,#nx-data-studio .nsc-step{height:32px;min-width:32px;border:1px solid var(--v2-line,#dfe5ec);border-radius:8px;background:var(--nsc-surface);color:inherit;cursor:pointer;font-size:15px}
#nx-data-studio .nsc-step{font-size:18px;line-height:1}
#nx-data-studio .nsc-step:disabled{opacity:.4;cursor:default}
#nx-data-studio .nsc-modes{display:flex;padding:2px;border:1px solid var(--v2-line,#dfe5ec);border-radius:9px;background:var(--nsc-surface)}
#nx-data-studio .nsc-mode{height:26px;padding:0 11px;border:0;border-radius:7px;background:transparent;color:inherit;font:600 12px Inter,system-ui,sans-serif;cursor:pointer;white-space:nowrap}
#nx-data-studio .nsc-mode.on{background:#102b43;color:#fff}
#nx-data-studio .nsc-only{display:inline-flex;align-items:center;gap:6px;height:32px;font-weight:600;font-size:12px;cursor:pointer;white-space:nowrap}
#nx-data-studio .nsc-only input{width:15px;height:15px;accent-color:#102b43}
#nx-data-studio .nsc-nav{display:inline-flex;align-items:center;gap:6px}
#nx-data-studio .nsc-where{min-width:74px;text-align:center;font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nsc-actions{display:flex;gap:6px;align-items:center;margin-left:auto}
#nx-data-studio .nsc-ghost,#nx-data-studio .nsc-primary{height:32px;padding:0 11px;border-radius:8px;font:600 12px Inter,system-ui,sans-serif;cursor:pointer;white-space:nowrap}
#nx-data-studio .nsc-ghost{border:1px solid var(--v2-line,#dfe5ec);background:var(--nsc-surface);color:inherit}
#nx-data-studio .nsc-ghost:hover{border-color:var(--v2-accent,#18866c);color:var(--v2-accent,#18866c)}
#nx-data-studio .nsc-primary{border:0;background:#102b43;color:#fff}#nx-data-studio .nsc-primary:hover{background:#163a59}
#nx-data-studio .nsc-ghost:disabled,#nx-data-studio .nsc-primary:disabled{opacity:.45;cursor:default}
#nx-data-studio .nsc-close{height:32px;width:32px;border:0;border-radius:8px;background:transparent;font-size:20px;color:var(--v2-muted,#5d6b7a);cursor:pointer}
#nx-data-studio .nsc-close:hover{background:var(--v2-soft,#f5f7f9)}
/* one line of counts that doubles as the legend */
#nx-data-studio .nsc-strip{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;padding:7px 14px;background:var(--nsc-surface);border-bottom:1px solid var(--v2-line,#dfe5ec);font-size:12px}
#nx-data-studio .nsc-strip:empty{display:none}
#nx-data-studio .nsc-count{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 9px 0 6px;border:1px solid transparent;border-radius:7px;background:transparent;color:inherit;font:inherit;cursor:pointer}
#nx-data-studio .nsc-count:hover:not(:disabled){border-color:var(--v2-line,#dfe5ec);background:var(--v2-soft,#f5f7f9)}
#nx-data-studio .nsc-count:disabled{cursor:default;opacity:.55}
#nx-data-studio .nsc-count b{font-weight:700;font-variant-numeric:tabular-nums}
#nx-data-studio .nsc-count span{color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nsc-count i{width:12px;height:12px;border-radius:3px;border:2px solid currentColor}
#nx-data-studio .nsc-t-changed{color:var(--nsc-chg)}#nx-data-studio .nsc-t-added{color:var(--nsc-add)}#nx-data-studio .nsc-t-removed,#nx-data-studio .nsc-t-replaced{color:var(--nsc-del)}
#nx-data-studio .nsc-t-moved{color:var(--nsc-move)}#nx-data-studio .nsc-t-renum{color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nsc-count.nsc-t-changed i{background:var(--nsc-chg-bg)}#nx-data-studio .nsc-count.nsc-t-added i{background:var(--nsc-add-bg)}
#nx-data-studio .nsc-count.nsc-t-removed i{background:var(--nsc-del-bg)}#nx-data-studio .nsc-count.nsc-t-moved i{background:var(--nsc-move-bg)}
#nx-data-studio .nsc-count b,#nx-data-studio .nsc-count span{color:var(--v2-ink,#14202c)}#nx-data-studio .nsc-count span{opacity:.7}
#nx-data-studio .nsc-cols{color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nsc-total{display:inline-flex;align-items:baseline;gap:7px;margin-left:auto;font-variant-numeric:tabular-nums;cursor:help}
#nx-data-studio .nsc-total span{color:var(--v2-muted,#5d6b7a)}#nx-data-studio .nsc-total b{font-weight:600}
#nx-data-studio .nsc-total strong{font-weight:700}
#nx-data-studio .nsc-up{color:var(--nsc-up)}#nx-data-studio .nsc-down{color:var(--nsc-down)}
/* the sheets: one scroller, the two BOQs on the same rows, a map of the changes on the right */
#nx-data-studio .nsc-stage{position:relative;flex:1;min-height:0;display:flex;margin:10px 14px 12px;border:1px solid var(--nsc-rule);border-radius:10px;background:var(--nsc-surface);overflow:hidden}
#nx-data-studio .nsc-wrap{flex:1;min-width:0;overflow:auto;outline:none}
#nx-data-studio .nsc-map{position:relative;flex:0 0 14px;border-left:1px solid var(--nsc-line);background:var(--v2-soft,#f5f7f9);cursor:pointer}
#nx-data-studio .nsc-mark{position:absolute;left:2px;right:2px;min-height:3px;border-radius:2px;background:currentColor;opacity:.9}
#nx-data-studio .nsc-mark:hover{left:0;right:0;opacity:1}
#nx-data-studio .nsc-lens{position:absolute;left:0;right:0;border:1px solid rgba(16,43,67,.35);background:rgba(16,43,67,.08);border-radius:2px;pointer-events:none}
#nx-data-studio.nst-dark .nsc-lens{border-color:rgba(255,255,255,.3);background:rgba(255,255,255,.07)}
#nx-data-studio .nsc-grid{table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:12px;line-height:1.35}
#nx-data-studio .nsc-grid th{position:sticky;z-index:3;background:var(--v2-soft,#f3f5f8);font-weight:600;color:var(--v2-muted,#5d6b7a);border-bottom:1px solid var(--nsc-rule);border-right:1px solid var(--nsc-line);padding:0 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#nx-data-studio .nsc-sides th{top:0;height:28px;text-align:left;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--v2-ink,#14202c);background:var(--nsc-surface)}
#nx-data-studio .nsc-side-label{position:sticky;left:8px;padding:0 2px}
#nx-data-studio .nsc-grid .nsc-sides th{overflow:visible}
#nx-data-studio .nsc-sides .nsc-side-a{box-shadow:inset 0 -2px 0 var(--nsc-del)}#nx-data-studio .nsc-sides .nsc-side-b{box-shadow:inset 0 -2px 0 var(--nsc-add)}
#nx-data-studio .nsc-letters th{top:28px;height:22px;font-size:10.5px;text-align:center}
#nx-data-studio .nsc-letters .nsc-col-new{background:var(--nsc-add-bg);color:var(--nsc-add)}#nx-data-studio .nsc-letters .nsc-col-gone{background:var(--nsc-del-bg);color:var(--nsc-del)}
#nx-data-studio .nsc-grid td{padding:4px 6px;border-bottom:1px solid var(--nsc-line);border-right:1px solid var(--nsc-line);vertical-align:top;overflow-wrap:anywhere;background:var(--nsc-fill,transparent)}
#nx-data-studio .nsc-one td.nsc-x.nsc-n{white-space:normal}
#nx-data-studio .nsc-one td.nsc-x.nsc-n del{display:inline-block}
#nx-data-studio .nsc-grid td.nsc-n{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
#nx-data-studio .nsc-rn,#nx-data-studio .nsc-rnh{text-align:center!important;color:var(--v2-muted,#5d6b7a);font-size:10.5px;font-variant-numeric:tabular-nums;background:var(--v2-soft,#f5f7f9)!important}
#nx-data-studio .nsc-rn-was{font-style:italic}
#nx-data-studio .nsc-mid,#nx-data-studio .nsc-midh{text-align:center;font-weight:800;font-size:13px;border-left:2px solid var(--nsc-rule)!important;border-right:2px solid var(--nsc-rule)!important;background:var(--nsc-surface)}
#nx-data-studio .nsc-one .nsc-mid,#nx-data-studio .nsc-one .nsc-midh{border-left:0!important}
#nx-data-studio .nsc-l-changed .nsc-mid{color:var(--nsc-chg);background:var(--nsc-chg-bg)}
#nx-data-studio .nsc-l-added .nsc-mid{color:var(--nsc-add);background:var(--nsc-add-bg)}
#nx-data-studio .nsc-l-removed .nsc-mid,#nx-data-studio .nsc-l-replaced .nsc-mid{color:var(--nsc-del);background:var(--nsc-del-bg)}
#nx-data-studio .nsc-l-moved .nsc-mid,#nx-data-studio .nsc-l-out .nsc-mid{color:var(--nsc-move);background:var(--nsc-move-bg)}
#nx-data-studio .nsc-l-renum .nsc-mid{color:var(--v2-muted,#5d6b7a);font-weight:600}
#nx-data-studio .nsc-l:hover td:not(.nsc-pad){filter:brightness(.97)}
#nx-data-studio.nst-dark .nsc-l:hover td:not(.nsc-pad){filter:brightness(1.15)}
/* where the other side has nothing: a hatched gap, so the rows stay level */
#nx-data-studio .nsc-pad{background:repeating-linear-gradient(135deg,transparent 0 5px,var(--nsc-hatch) 5px 6px)!important;text-align:center;vertical-align:middle!important}
#nx-data-studio .nsc-pad-move{background:repeating-linear-gradient(135deg,transparent 0 5px,var(--nsc-move-bg) 5px 7px)!important}
/* whole rows */
#nx-data-studio td.nsc-x-add{background:var(--nsc-add-bg);color:var(--v2-ink,#14202c)}
#nx-data-studio td.nsc-x-del{background:var(--nsc-del-bg)}
#nx-data-studio td.nsc-x-del,#nx-data-studio td.nsc-x-del del{color:var(--nsc-del);text-decoration:line-through;text-decoration-thickness:1.5px}
#nx-data-studio td.nsc-x-out{background:var(--nsc-move-bg);color:var(--nsc-move);opacity:.75}
#nx-data-studio td.nsc-x-out del{color:inherit;text-decoration-color:currentColor}
#nx-data-studio td.nsc-x-move{box-shadow:inset 0 2px 0 -1px var(--nsc-move-bg),inset 0 -2px 0 -1px var(--nsc-move-bg);background:color-mix(in srgb,var(--nsc-move-bg) 55%,transparent)}
/* a changed cell: amber, the old struck in red, the new written in green */
#nx-data-studio td.nsc-x{background:var(--nsc-chg-bg)!important;box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--nsc-chg) 55%,transparent)}
#nx-data-studio td.nsc-xs{color:var(--v2-muted,#5d6b7a)}
#nx-data-studio td.nsc-xs del,#nx-data-studio td.nsc-xs ins{background:none!important;color:inherit!important;font-weight:400!important}
#nx-data-studio .nsc-grid del{color:var(--nsc-del);background:var(--nsc-del-bg);text-decoration:line-through;text-decoration-thickness:1.5px;border-radius:2px;padding:0 1px}
#nx-data-studio .nsc-grid ins{color:var(--nsc-add);background:var(--nsc-add-bg);text-decoration:none;font-weight:700;border-radius:2px;padding:0 1px}
#nx-data-studio td.nsc-x-del del{background:none;padding:0}
#nx-data-studio .nsc-one td.nsc-x del{margin-right:2px}
#nx-data-studio .nsc-chg{margin-left:4px;font-size:9.5px;font-weight:700;vertical-align:top}
#nx-data-studio .nsc-blank{color:var(--v2-muted,#5d6b7a);font-style:italic}
#nx-data-studio td.nsc-newcol{background:color-mix(in srgb,var(--nsc-add-bg) 60%,transparent)}
#nx-data-studio td.nsc-oldcol{background:color-mix(in srgb,var(--nsc-del-bg) 60%,transparent)}
/* the change in focus (next / previous) */
#nx-data-studio .nsc-current td{animation:nsc-pulse 1.1s ease-out 1}
#nx-data-studio .nsc-current .nsc-mid{box-shadow:inset 3px 0 0 #102b43,inset -3px 0 0 #102b43}
#nx-data-studio.nst-dark .nsc-current .nsc-mid{box-shadow:inset 3px 0 0 #9cc3ea,inset -3px 0 0 #9cc3ea}
@keyframes nsc-pulse{0%{box-shadow:inset 0 0 0 2px #2a78d6}100%{box-shadow:inset 0 0 0 2px transparent}}
#nx-data-studio .nsc-link{border:0;background:var(--nsc-surface);color:var(--nsc-move);font:600 11.5px Inter,system-ui,sans-serif;padding:2px 8px;border-radius:999px;cursor:pointer;box-shadow:0 0 0 1px var(--nsc-move-bg)}
#nx-data-studio .nsc-link:hover{text-decoration:underline}
#nx-data-studio .nsc-link-in{margin-right:6px;text-decoration:none!important}
#nx-data-studio .nsc-fold{padding:0!important;background:var(--v2-soft,#f5f7f9)!important;border-bottom:1px solid var(--nsc-rule)!important}
#nx-data-studio .nsc-fold-btn{display:block;width:100%;height:26px;border:0;background:transparent;color:var(--v2-muted,#5d6b7a);font:600 11.5px Inter,system-ui,sans-serif;cursor:pointer;text-align:left;padding-left:56px}
#nx-data-studio .nsc-fold-btn:hover{color:#2a78d6}
#nx-data-studio .nsc-banner{position:sticky;left:0;padding:8px 14px;background:var(--nsc-add-bg);color:var(--nsc-add);font-weight:600;font-size:12px}
#nx-data-studio .nsc-empty{display:grid;place-items:center;gap:4px;padding:48px 16px;text-align:center;color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nsc-empty strong{color:var(--v2-ink,#14202c);font-size:14px}
#nx-data-studio .nsc-arrow{color:var(--v2-muted,#5d6b7a)}
#nx-data-studio.nst-dark .nsc-primary,#nx-data-studio.nst-dark .nsc-mode.on{background:#2a4a68}
@media (max-width:900px){#nx-data-studio .nsc-actions{margin-left:0}#nx-data-studio .nsc-total{margin-left:0}}
@media (prefers-reduced-motion:reduce){#nx-data-studio .nsc,#nx-data-studio .nsc-current td{animation:none}}
/* colours an earlier compare left in a tab */
#nx-data-studio .nsc-stale{flex-basis:100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:5px 10px;border-radius:7px;background:var(--nsc-chg-bg);color:var(--v2-ink,#14202c);font-size:11.5px}
#nx-data-studio .nsc-stale .nsc-link{color:var(--nsc-chg);box-shadow:0 0 0 1px currentColor}
/* carry over: a preview drawer over the comparison */
#nx-data-studio .nsc-carry{position:absolute;top:0;right:0;bottom:0;z-index:5;width:min(760px,100%);display:flex;flex-direction:column;background:var(--nsc-surface);border-left:1px solid var(--v2-line,#dfe5ec);box-shadow:-18px 0 40px rgba(16,32,48,.16);animation:nsc-slide .2s cubic-bezier(.2,.8,.2,1)}
@keyframes nsc-slide{from{transform:translateX(24px);opacity:0}}
#nx-data-studio .nsc-carry-head{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;padding:14px 16px 8px}
#nx-data-studio .nsc-carry-head strong{font-size:15px}
#nx-data-studio .nsc-carry-head p{margin:4px 0 0;color:var(--v2-muted,#5d6b7a);font-size:12px;max-width:600px}
#nx-data-studio .nsc-carry-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 12px;padding:6px 16px 12px;border-bottom:1px solid var(--v2-line,#dfe5ec)}
#nx-data-studio .nsc-carry-form .nsc-select{max-width:260px;flex:1 1 200px}
#nx-data-studio .nsc-carry-form .nsc-arrow{padding-bottom:8px}
#nx-data-studio .nsc-carry-list{flex:1;min-height:0;overflow:auto}
#nx-data-studio .nsc-carry-table{width:100%;border-collapse:separate;border-spacing:0;font-size:12px}
#nx-data-studio .nsc-carry-table th{position:sticky;top:0;z-index:1;background:var(--v2-soft,#f3f5f8);text-align:left;font-weight:600;color:var(--v2-muted,#5d6b7a);padding:6px 8px;border-bottom:1px solid var(--nsc-rule)}
#nx-data-studio .nsc-carry-table td{padding:6px 8px;border-bottom:1px solid var(--nsc-line);vertical-align:top;cursor:pointer}
#nx-data-studio .nsc-carry-table td.nsc-n{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
#nx-data-studio .nsc-carry-table .nsc-now{color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nsc-cd span{display:block}
#nx-data-studio .nsc-cd small{display:block;margin-top:2px;font-size:11px;color:var(--nsc-chg)}
#nx-data-studio .nsc-cd small.nsc-cd-was{color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nsc-carry-table tr:hover td{background:var(--v2-soft,#f5f7f9)}
#nx-data-studio .nsc-cs-unit td,#nx-data-studio .nsc-cs-conflict td{background:color-mix(in srgb,var(--nsc-chg-bg) 45%,transparent)}
#nx-data-studio .nsc-cs-suggest td{background:color-mix(in srgb,var(--nsc-move-bg) 45%,transparent)}
#nx-data-studio .nsc-carry-table tr.nsc-off td:not(:first-child){opacity:.6}
#nx-data-studio .nsc-carry-note{margin:8px 16px;color:var(--v2-muted,#5d6b7a);font-size:11.5px}
#nx-data-studio .nsc-carry-foot{display:flex;align-items:center;gap:8px;padding:10px 16px;border-top:1px solid var(--v2-line,#dfe5ec)}
#nx-data-studio .nsc-carry-sum{margin-right:auto;font-size:12px;color:var(--v2-muted,#5d6b7a)}
@media (prefers-reduced-motion:reduce){#nx-data-studio .nsc-carry{animation:none}}
/* needs review: two lines say the same and nothing tells them apart */
#nx-data-studio .nsc-t-review{color:var(--nsc-rev)}#nx-data-studio .nsc-count.nsc-t-review i{background:var(--nsc-rev-bg)}
#nx-data-studio .nsc-l-review .nsc-mid{color:var(--nsc-rev);background:var(--nsc-rev-bg)}
#nx-data-studio td.nsc-x-rev{background:var(--nsc-rev-bg);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--nsc-rev) 35%,transparent)}

/* ── The programme on the BOQ (core/studio/schedule-ui.js) ──
   One coloured bracket per activity beside the row numbers; a card on hover. */
#nx-data-studio .nss-rail{position:absolute;right:3px;top:0;bottom:-1px;width:5px;background:var(--nss-c,#2a78d6);cursor:pointer;z-index:2;transition:width .12s,box-shadow .12s}
#nx-data-studio .nss-rail.nss-first{top:3px;border-radius:3px 3px 0 0}
#nx-data-studio .nss-rail.nss-last{bottom:3px;border-radius:0 0 3px 3px}
#nx-data-studio .nss-rail.nss-first.nss-last{border-radius:3px}
#nx-data-studio .nss-rail:hover{width:7px}
#nx-data-studio .nss-rail.nss-none{top:5px;bottom:5px;width:4px;border-radius:2px;background:repeating-linear-gradient(180deg,#b9c1cc 0 3px,transparent 3px 6px);cursor:help}
#nx-data-studio .nss-card{position:absolute;z-index:90;width:340px;max-width:calc(100% - 24px);background:#fff;color:#14202c;border:1px solid #dfe5ec;border-top:4px solid var(--nss-c,#2a78d6);
  border-radius:12px;box-shadow:0 18px 44px rgba(16,32,48,.18),0 2px 6px rgba(16,32,48,.08);font:12.5px/1.45 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;animation:nss-in .14s ease-out}
#nx-data-studio .nss-card[hidden]{display:none}
#nx-data-studio .nss-card.nss-pinned{box-shadow:0 22px 52px rgba(16,32,48,.24),0 0 0 2px color-mix(in srgb,var(--nss-c) 30%,transparent)}
@keyframes nss-in{from{opacity:0;transform:translateY(4px)}}
#nx-data-studio .nss-card-head{padding:11px 14px 8px}
#nx-data-studio .nss-card-id{display:flex;align-items:center;gap:6px;margin-bottom:4px}
#nx-data-studio .nss-card-id code{font:700 11px "JetBrains Mono",ui-monospace,monospace;color:var(--nss-c,#2a78d6);background:color-mix(in srgb,var(--nss-c) 10%,transparent);padding:2px 7px;border-radius:5px}
#nx-data-studio .nss-x{margin-left:auto;border:0;background:transparent;font-size:18px;line-height:1;color:#8390a1;cursor:pointer;border-radius:6px;width:24px;height:24px}
#nx-data-studio .nss-x:hover{background:#f2f4f7;color:#14202c}
#nx-data-studio .nss-card-name{display:block;font-size:14px;font-weight:700;line-height:1.3}
#nx-data-studio .nss-path{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px;color:#5d6b7a;font-size:11.5px}
#nx-data-studio .nss-sep{color:#b9c1cc}
#nx-data-studio .nss-pill{font-size:10.5px;font-weight:700;padding:2px 7px;border-radius:999px;background:#eef2f6;color:#475467}
#nx-data-studio .nss-st-in-progress{background:#e3effd;color:#1c5cab}#nx-data-studio .nss-st-completed{background:#dcf3e1;color:#0a7d2c}
#nx-data-studio .nss-crit{background:#fde2e1;color:#b42318}
#nx-data-studio .nss-tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:#eef1f4;border-top:1px solid #eef1f4;border-bottom:1px solid #eef1f4}
#nx-data-studio .nss-tile{background:#fff;padding:8px 10px;display:grid;gap:1px}
#nx-data-studio .nss-tile b{font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}
#nx-data-studio .nss-tile b small{font-size:11px;font-weight:600;color:#5d6b7a}
#nx-data-studio .nss-tile span{font-size:10.5px;color:#5d6b7a;white-space:nowrap}
#nx-data-studio .nss-dates{display:flex;align-items:flex-end;gap:10px;padding:9px 14px;border-bottom:1px solid #eef1f4}
#nx-data-studio .nss-dates>div{display:grid;gap:1px}
#nx-data-studio .nss-dates>div:last-child{margin-left:auto;text-align:right}
#nx-data-studio .nss-dates span{font-size:10.5px;color:#5d6b7a;text-transform:uppercase;letter-spacing:.03em}
#nx-data-studio .nss-dates b{font-variant-numeric:tabular-nums;font-weight:650}
#nx-data-studio .nss-arrow{font-style:normal;color:#b9c1cc;padding-bottom:1px}
#nx-data-studio .nss-crit-t{color:#b42318}
#nx-data-studio .nss-here{display:grid;gap:3px;padding:9px 14px;font-size:12px;color:#344054}
#nx-data-studio .nss-muted{color:#5d6b7a;font-size:11.5px}
#nx-data-studio .nss-warn{color:#a15c00;font-size:11.5px}
#nx-data-studio .nss-actions{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 10px}
#nx-data-studio .nss-btn{height:28px;padding:0 10px;border-radius:7px;border:1px solid #dfe5ec;background:#fff;color:#14202c;font:600 11.5px Inter,system-ui,sans-serif;cursor:pointer}
#nx-data-studio .nss-btn:hover{border-color:var(--nss-c,#2a78d6);color:var(--nss-c,#2a78d6)}
#nx-data-studio .nss-btn.nss-primary{background:#102b43;border-color:#102b43;color:#fff}#nx-data-studio .nss-btn.nss-primary:hover{background:#163a59;color:#fff}
#nx-data-studio .nss-foot{margin:0;padding:7px 14px 9px;border-top:1px solid #eef1f4;color:#8390a1;font-size:10.5px}
#nx-data-studio.nst-dark .nss-card{background:#141c24;color:#e3e9ef;border-color:#2b3744}
#nx-data-studio.nst-dark .nss-tiles,#nx-data-studio.nst-dark .nss-dates,#nx-data-studio.nst-dark .nss-foot{border-color:#212c38}
#nx-data-studio.nst-dark .nss-tiles{background:#212c38}#nx-data-studio.nst-dark .nss-tile{background:#141c24}
#nx-data-studio.nst-dark .nss-here{color:#c9d3dd}#nx-data-studio.nst-dark .nss-btn{background:#1b2530;border-color:#2b3744;color:#e3e9ef}
#nx-data-studio.nst-dark .nss-pill{background:#212c38;color:#c9d3dd}#nx-data-studio.nst-dark .nss-x:hover{background:#212c38;color:#fff}
/* a ribbon switch that is on */
#nx-data-studio .nst-ribbon-button.nst-on{background:#e3edf8;color:#102b43;box-shadow:inset 0 0 0 1px #a9c1dc}
#nx-data-studio.nst-dark .nst-ribbon-button.nst-on{background:#1f3a55;color:#fff;box-shadow:inset 0 0 0 1px #3c6a96}
@media (prefers-reduced-motion:reduce){#nx-data-studio .nss-card{animation:none}}
/* the activity the Studio card opened, in the Mapping */
.nss-flash{animation:nss-flash 2.4s ease-out 1}
@keyframes nss-flash{0%,30%{box-shadow:0 0 0 3px #fbbf24;background:rgba(251,191,36,.18)}100%{box-shadow:0 0 0 0 transparent}}
/* Compare: the programme behind the original */
#nx-data-studio .nsc-prog{display:inline-flex;align-items:center;gap:8px;height:28px;padding:0 10px 0 8px;border-radius:8px;border:1px solid #c9d8ea;background:linear-gradient(180deg,#f4f8fd,#eaf1fa);color:#102b43;font:inherit;font-size:12px;cursor:pointer}
#nx-data-studio .nsc-prog:hover{border-color:#2a78d6;box-shadow:0 0 0 3px rgba(42,120,214,.12)}
#nx-data-studio .nsc-prog b{font-weight:700}#nx-data-studio .nsc-prog span{color:#344054}#nx-data-studio .nsc-prog em{font-style:normal;font-weight:600;color:#2a78d6}
#nx-data-studio .nsc-prog-ico{width:14px;height:12px;background:linear-gradient(#2a78d6,#2a78d6) 0 0/9px 3px no-repeat,linear-gradient(#d97706,#d97706) 4px 4.5px/10px 3px no-repeat,linear-gradient(#0f9d76,#0f9d76) 2px 9px/7px 3px no-repeat}
#nx-data-studio.nst-dark .nsc-prog{background:#16283a;border-color:#2c4a66;color:#e3e9ef}#nx-data-studio.nst-dark .nsc-prog span{color:#c9d3dd}
#nx-data-studio .nsc-rn-act{position:relative}
#nx-data-studio .nsc-act{position:absolute;left:2px;top:2px;bottom:2px;width:4px;border-radius:2px;background:var(--nss-c,#2a78d6)}
#nx-data-studio .nsc-act-offer{background:repeating-linear-gradient(180deg,var(--nss-c,#2a78d6) 0 3px,transparent 3px 6px)}
#nx-data-studio .nsc-impact{width:min(820px,100%)}
#nx-data-studio .nsc-imp-tiles{display:grid;grid-template-columns:repeat(6,1fr);gap:1px;margin:0 16px 10px;border:1px solid var(--v2-line,#dfe5ec);border-radius:10px;overflow:hidden;background:var(--v2-line,#dfe5ec)}
#nx-data-studio .nsc-imp-tile{background:var(--nsc-surface);padding:8px 10px;display:grid;gap:1px}
#nx-data-studio .nsc-imp-tile b{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}
#nx-data-studio .nsc-imp-tile span{font-size:11px;color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nsc-imp-row{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:4px 16px;padding:10px 16px 10px 20px;border-bottom:1px solid var(--nsc-line);cursor:pointer;position:relative}
#nx-data-studio .nsc-imp-row::before{content:"";position:absolute;left:8px;top:10px;bottom:10px;width:4px;border-radius:2px;background:var(--nss-c)}
#nx-data-studio .nsc-imp-row:hover{background:var(--v2-soft,#f5f7f9)}
#nx-data-studio .nsc-imp-name{display:grid;gap:2px;min-width:0}
#nx-data-studio .nsc-imp-name code{font:700 10.5px "JetBrains Mono",ui-monospace,monospace;color:var(--nss-c)}
#nx-data-studio .nsc-imp-name b{font-size:13px;font-weight:650}
#nx-data-studio .nsc-imp-name small{color:var(--v2-muted,#5d6b7a);font-size:11px}
#nx-data-studio .nsc-imp-bars{display:grid;gap:4px;align-content:center}
#nx-data-studio .nsc-imp-bar{position:relative;height:18px;border-radius:5px;background:var(--v2-soft,#f2f4f7);overflow:hidden}
#nx-data-studio .nsc-imp-bar i{position:absolute;left:0;top:0;bottom:0;border-radius:5px;animation:nsc-grow .45s cubic-bezier(.2,.8,.2,1);transform-origin:left}
#nx-data-studio .nsc-imp-bar span{position:relative;padding-left:7px;font-size:11px;font-weight:650;line-height:18px;font-variant-numeric:tabular-nums}
#nx-data-studio .nsc-imp-now i{background:#cfd8e3}
#nx-data-studio .nsc-imp-up i{background:color-mix(in srgb,var(--nsc-up) 38%,transparent)}#nx-data-studio .nsc-imp-up span{color:var(--nsc-up)}
#nx-data-studio .nsc-imp-down i{background:color-mix(in srgb,var(--nsc-down) 34%,transparent)}#nx-data-studio .nsc-imp-down span{color:var(--nsc-down)}
#nx-data-studio .nsc-imp-same i{background:#cfd8e3}
#nx-data-studio .nsc-imp-offer i{background:repeating-linear-gradient(135deg,color-mix(in srgb,var(--nsc-add) 30%,transparent) 0 6px,transparent 6px 10px)}
#nx-data-studio .nsc-imp-note{font-size:11.5px;color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nsc-imp-why{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:5px;align-items:center}
#nx-data-studio .nsc-chip-s{font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px;background:var(--v2-soft,#f2f4f7)}
#nx-data-studio .nsc-chip-s.nsc-t-changed{background:var(--nsc-chg-bg)}#nx-data-studio .nsc-chip-s.nsc-t-removed{background:var(--nsc-del-bg)}
#nx-data-studio .nsc-chip-s.nsc-t-added{background:var(--nsc-add-bg)}#nx-data-studio .nsc-chip-s.nsc-t-review{background:var(--nsc-rev-bg)}
#nx-data-studio .nsc-imp-cd{margin-left:auto;font-size:11px;color:var(--v2-muted,#5d6b7a);font-variant-numeric:tabular-nums}
#nx-data-studio .nsc-imp-sec{margin:12px 16px;padding:10px 12px;border-radius:10px;border:1px dashed currentColor}
#nx-data-studio .nsc-imp-sec h4{margin:0 0 2px;font-size:12.5px}
#nx-data-studio .nsc-imp-sec p{margin:0 0 6px;font-size:11.5px;color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nsc-imp-item{display:grid;grid-template-columns:40px 1fr auto;gap:8px;padding:4px 0;font-size:12px;color:var(--v2-ink,#14202c);cursor:pointer;border-top:1px solid var(--nsc-line)}
#nx-data-studio .nsc-imp-item b{font-variant-numeric:tabular-nums;font-weight:600}
@keyframes nsc-grow{from{transform:scaleX(0)}}
/* the activity filter: a view, with a way out */
#nx-data-studio .nss-pill-bar{position:absolute;left:50%;bottom:44px;transform:translateX(-50%);z-index:80;display:flex;align-items:center;gap:8px;max-width:calc(100% - 40px);padding:6px 6px 6px 12px;border-radius:999px;
  background:#102b43;color:#fff;font:12.5px Inter,system-ui,sans-serif;box-shadow:0 10px 30px rgba(16,32,48,.28);animation:nss-in .16s ease-out}
#nx-data-studio .nss-pill-bar[hidden]{display:none}
#nx-data-studio .nss-pill-bar i{width:10px;height:10px;border-radius:3px;background:var(--nss-c);flex:none}
#nx-data-studio .nss-pill-bar b{font:700 11.5px "JetBrains Mono",ui-monospace,monospace}
#nx-data-studio .nss-pill-bar span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#d6e2ee}
#nx-data-studio .nss-pill-x{flex:none;height:26px;padding:0 12px;border:0;border-radius:999px;background:#fff;color:#102b43;font:700 11.5px Inter,system-ui,sans-serif;cursor:pointer}
#nx-data-studio .nss-rail.nss-byname{background:transparent;box-shadow:inset 0 0 0 2px var(--nss-c);width:6px}
/* Compare: the revision applied to the programme */
#nx-data-studio .nsc-ap-sec{margin:10px 16px}
#nx-data-studio .nsc-ap-sec h4{margin:0 0 6px;font-size:11px;letter-spacing:.05em;text-transform:uppercase;color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nsc-ap-row{display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:10px;align-items:center;padding:9px 10px;border:1px solid var(--nsc-line);border-radius:9px;margin-bottom:6px;background:var(--nsc-surface);cursor:pointer}
#nx-data-studio .nsc-ap-row:hover{border-color:#9bb6d6}
#nx-data-studio .nsc-ap-row.nsc-off{opacity:.55}
#nx-data-studio .nsc-ap-row input[type=checkbox]{width:16px;height:16px;accent-color:#102b43}
#nx-data-studio .nsc-ap-body>div{display:flex;flex-wrap:wrap;align-items:center;gap:7px}
#nx-data-studio .nsc-ap-body code{font:700 10.5px "JetBrains Mono",ui-monospace,monospace;color:#2a78d6}
#nx-data-studio .nsc-ap-body b{font-weight:650}
#nx-data-studio .nsc-ap-body small{display:block;margin-top:3px;font-size:11px;color:var(--v2-muted,#5d6b7a)}
#nx-data-studio .nsc-ap-warn{color:var(--nsc-del)!important}
#nx-data-studio .nsc-ap-del{border-color:color-mix(in srgb,var(--nsc-del) 35%,transparent)}
#nx-data-studio .nsc-ap-from{color:var(--v2-muted,#5d6b7a);font-size:12px}
#nx-data-studio .nsc-ap-tag{font-size:10px;font-weight:800;letter-spacing:.04em;padding:2px 6px;border-radius:5px;background:var(--nsc-move-bg);color:var(--nsc-move)}
#nx-data-studio .nsc-ap-tag.nsc-ap-new{background:var(--nsc-add-bg);color:var(--nsc-add)}
#nx-data-studio .nsc-ap-name{min-width:220px;flex:1;height:28px;border:1px solid var(--v2-line,#dfe5ec);border-radius:6px;padding:0 8px;font:inherit;background:var(--nsc-surface);color:inherit}
#nx-data-studio .nsc-ap-days{display:inline-flex;align-items:center;gap:4px;font-weight:600}
#nx-data-studio .nsc-ap-days input{width:64px;height:30px;border:1px solid var(--v2-line,#dfe5ec);border-radius:6px;padding:0 8px;font:600 13px Inter,system-ui,sans-serif;text-align:right;background:var(--nsc-surface);color:inherit}
/* Compare: the header as a ribbon, like Studio's */
#nx-data-studio .nsc-head{display:block;padding:0;gap:0}
#nx-data-studio .nsc-top{display:flex;align-items:flex-end;gap:14px;padding:8px 14px 9px}
#nx-data-studio .nsc-top .nsc-title{align-self:center}
#nx-data-studio .nsc-top .nsc-close{margin-left:auto;align-self:center}
#nx-data-studio .nsc-ribbon{min-height:84px;border-top:1px solid var(--v2-line,#dfe5ec)}
#nx-data-studio .nsc-ribbon .nsc-modes{display:flex;gap:3px;padding:0;border:0;background:transparent}
#nx-data-studio .nsc-ribbon .nsc-mode{height:auto;padding:5px 3px;border-radius:6px;color:var(--v2-ink,#14202c);font-weight:500}
#nx-data-studio .nsc-ribbon .nsc-mode.on,#nx-data-studio .nsc-ribbon .nst-on{background:#e3edf8;color:#102b43;box-shadow:inset 0 0 0 1px #a9c1dc}
#nx-data-studio .nsc-ribbon .nsc-step{height:auto;min-width:0;border:1px solid transparent;font-size:11.5px;line-height:1.15}
#nx-data-studio .nsc-ribbon .nst-ribbon-button:disabled{opacity:.4;cursor:default;background:transparent;border-color:transparent}
#nx-data-studio .nsc-ribbon .nsc-where{align-self:center;min-width:64px;padding:0 4px;font-size:12px}
#nx-data-studio .nsc-ribbon .nsc-only{height:auto;display:flex}
#nx-data-studio.nst-dark .nsc-ribbon .nsc-mode.on,#nx-data-studio.nst-dark .nsc-ribbon .nst-on{background:#1f3a55;color:#fff;box-shadow:inset 0 0 0 1px #3c6a96}

/* Nexora Agent V3 docked in the Studio side column (the V3 panel itself) */
#nx-data-studio .nst-dock-v3{width:440px;max-width:46vw;padding:0;background:#f4f6f9;display:flex}
#nx-data-studio .nst-dock-v3:not(:has(#NXV3_NATIVE_PNL[data-open="1"])){display:none}
@media (max-width:900px){#nx-data-studio .nst-dock-v3{width:min(440px,94vw)}}

/* Space-to-ask: Nexora Agent where you are. A light card in Studio's own
   colours (dark in the dark grid): what it works on, the cells it will read,
   the request, then what it will make. */
#nx-data-studio .nst-ask{position:absolute;z-index:90;color:#1c2d3f;border-radius:14px;padding:12px 12px 9px;display:flex;flex-direction:column;gap:9px;
  background:#fff;border:1px solid #d7e0e8;box-shadow:0 22px 60px rgba(13,34,57,.20),0 3px 10px rgba(13,34,57,.08);
  animation:nst-ask-in .16s cubic-bezier(.2,.8,.2,1) both;font-family:Inter,"Segoe UI",system-ui,sans-serif}
#nx-data-studio .nst-ask::before{content:"";position:absolute;left:14px;right:14px;top:-1px;height:2px;border-radius:2px;
  background:linear-gradient(90deg,#18866c,#c9a24a,#18866c);background-size:200% 100%;opacity:.55;transition:opacity .2s}
#nx-data-studio .nst-ask.nst-ask-typing::before{opacity:1;animation:nst-ask-flow 2.4s linear infinite}
@keyframes nst-ask-flow{to{background-position:200% 0}}
@keyframes nst-ask-in{from{opacity:0;transform:translateY(-5px) scale(.985)}to{opacity:1;transform:none}}
#nx-data-studio .nst-ask.nst-ask-sent{animation:nst-ask-out .14s ease-in both}
@keyframes nst-ask-out{to{opacity:0;transform:translateY(-4px) scale(.98)}}
#nx-data-studio .nst-ask-top{display:flex;align-items:center;gap:8px}
#nx-data-studio .nst-ask-sel{display:inline-flex;align-items:center;gap:7px;min-width:0;padding:4px 9px 4px 7px;border-radius:7px;
  background:#e9f4ef;color:#145f4d;font:600 11.5px/1.2 Inter,system-ui,sans-serif;border:1px solid #cfe6dc}
#nx-data-studio .nst-ask-sel b{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}
#nx-data-studio .nst-ask-sel span{color:#4f7f71;font-weight:550;white-space:nowrap}
#nx-data-studio .nst-ask-sel-ic{width:10px;height:10px;border:2px solid #18866c;border-radius:2px;flex:none}
#nx-data-studio .nst-ask-esc{margin-left:auto;border:1px solid #e1e7ee;background:#f7f9fb;color:#7a8896;border-radius:6px;font:600 10.5px/1 Inter,system-ui;padding:5px 7px;cursor:pointer}
#nx-data-studio .nst-ask-esc:hover{background:#eef2f6;color:#41566b}
#nx-data-studio .nst-ask-peek{max-height:96px;overflow:hidden;border:1px solid #e6ebf0;border-radius:8px;background:#fbfcfd;position:relative}
#nx-data-studio .nst-ask-peek::after{content:"";position:absolute;left:0;right:0;bottom:0;height:16px;background:linear-gradient(rgba(251,252,253,0),#fbfcfd);pointer-events:none}
#nx-data-studio .nst-ask-peek-t{border-collapse:collapse;width:100%;table-layout:fixed;font:500 11px/1.25 Inter,system-ui,sans-serif;color:#2b3e51}
#nx-data-studio .nst-ask-peek-t th,#nx-data-studio .nst-ask-peek-t td{padding:4px 7px;border-bottom:1px solid #eef1f4;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#nx-data-studio .nst-ask-peek-t th{background:#f3f6f8;color:#6b7a89;font-weight:650;font-size:10.5px}
#nx-data-studio .nst-ask-peek-t tr>th:first-child{width:34px;text-align:center;color:#8a97a4}
#nx-data-studio .nst-ask-peek-t td.nst-num{text-align:right;font-variant-numeric:tabular-nums}
#nx-data-studio .nst-ask-row{display:flex;align-items:flex-end;gap:10px;padding:6px 6px 6px 8px;border:1.5px solid #d3dde6;border-radius:11px;background:#fff;transition:border-color .15s,box-shadow .15s}
#nx-data-studio .nst-ask-row:focus-within{border-color:#18866c;box-shadow:0 0 0 3px rgba(24,134,108,.13)}
#nx-data-studio .nst-ask-mark{flex:none;width:28px;height:28px;display:grid;place-items:center;border-radius:8px;color:#fff;margin-bottom:1px;
  background:linear-gradient(140deg,#1f9b7d,#136b56)}
#nx-data-studio .nst-ask.nst-ask-typing .nst-ask-mark{animation:nst-ask-pulse 1.8s ease-in-out infinite}
#nx-data-studio .nst-ask-mark svg{width:16px;height:16px}
@keyframes nst-ask-pulse{50%{box-shadow:0 0 0 5px rgba(24,134,108,.14)}}
#nx-data-studio .nst-ask-input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:#14263a;font:500 14.5px/1.45 Inter,system-ui,sans-serif;
  padding:4px 0;caret-color:#18866c;resize:none;height:26px;max-height:132px;overflow-y:auto}
#nx-data-studio .nst-ask-input::placeholder{color:#97a4b1}
#nx-data-studio .nst-ask-go{flex:none;width:32px;height:32px;border:0;border-radius:9px;cursor:pointer;display:grid;place-items:center;color:#fff;
  background:#18866c;opacity:.35;transition:opacity .15s,transform .12s}
#nx-data-studio .nst-ask.nst-ask-typing .nst-ask-go{opacity:1}
#nx-data-studio .nst-ask-go:hover{transform:translateY(-1px)}
#nx-data-studio .nst-ask-go svg{width:16px;height:16px}
#nx-data-studio .nst-ask-chips{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font:600 11px/1 Inter,system-ui,sans-serif}
#nx-data-studio .nst-ask-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;white-space:nowrap}
#nx-data-studio .nst-ask-chip:empty{display:none}
#nx-data-studio .nst-ask-chip-scope{background:#eef4fb;color:#245580;border:1px solid #d6e4f2}
#nx-data-studio .nst-ask-chip-scope b{font-weight:650}
#nx-data-studio .nst-ask-chip-out{background:#fbf5e6;color:#8a6a2c;border:1px solid #efe1bf}
#nx-data-studio .nst-ask-dot{width:6px;height:6px;border-radius:50%;background:#2f7fc6;box-shadow:0 0 0 3px rgba(47,127,198,.16)}
#nx-data-studio .nst-ask-safe{margin-left:auto;color:#8f9cab;font-weight:500}
#nx-data-studio .nst-ask-ideas{display:flex;flex-wrap:wrap;gap:6px}
#nx-data-studio .nst-ask-idea{display:inline-flex;align-items:center;gap:7px;text-align:left;cursor:pointer;padding:6px 10px 6px 7px;border-radius:8px;
  background:#f6f8fa;color:#2c4258;border:1px solid #e3e9ef;font:550 12px/1.2 Inter,system-ui,sans-serif;transition:background .12s,border-color .12s,transform .12s}
#nx-data-studio .nst-ask-idea:hover,#nx-data-studio .nst-ask-idea.nst-on{background:#e9f4ef;border-color:#9fd2c1;color:#0f5a48;transform:translateY(-1px)}
#nx-data-studio .nst-ask-idea-ic{flex:none;width:20px;height:20px;border-radius:6px;display:grid;place-items:center;background:#fff;color:#18866c;border:1px solid #dbe7e2}
#nx-data-studio .nst-ask-idea-ic svg{width:13px;height:13px}
#nx-data-studio .nst-ask-foot{display:flex;gap:12px;align-items:center;font:500 10.5px/1 Inter,system-ui,sans-serif;color:#8a97a5;border-top:1px solid #edf1f4;padding:8px 2px 0}
#nx-data-studio .nst-ask-foot kbd{display:inline-block;min-width:14px;padding:2px 4px;margin-right:2px;border-radius:4px;background:#f0f3f6;border:1px solid #e1e6eb;color:#53667a;font:600 10px/1.2 Inter,system-ui,sans-serif;text-align:center}
#nx-data-studio .nst-ask-brand{margin-left:auto;color:#9a7f4f;font-weight:650}
#nx-data-studio.nst-dark .nst-ask{background:#18212b;color:#e3e9ef;border-color:#2b3744;box-shadow:0 22px 60px rgba(0,0,0,.5)}
#nx-data-studio.nst-dark .nst-ask-row{background:#10171e;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-ask-input{color:#eef3f8}
#nx-data-studio.nst-dark .nst-ask-peek{background:#10171e;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-ask-peek::after{background:linear-gradient(rgba(16,23,30,0),#10171e)}
#nx-data-studio.nst-dark .nst-ask-peek-t{color:#cdd7e1}
#nx-data-studio.nst-dark .nst-ask-peek-t th{background:#141c24;color:#8d9cab}
#nx-data-studio.nst-dark .nst-ask-peek-t th,#nx-data-studio.nst-dark .nst-ask-peek-t td{border-color:#222d38}
#nx-data-studio.nst-dark .nst-ask-idea{background:#10171e;border-color:#2b3744;color:#cdd7e1}
#nx-data-studio.nst-dark .nst-ask-idea:hover,#nx-data-studio.nst-dark .nst-ask-idea.nst-on{background:#163a31;border-color:#2b6b58;color:#fff}
#nx-data-studio.nst-dark .nst-ask-idea-ic,#nx-data-studio.nst-dark .nst-ask-esc,#nx-data-studio.nst-dark .nst-ask-foot kbd{background:#141c24;border-color:#2b3744;color:#9fd2c1}
#nx-data-studio.nst-dark .nst-ask-sel{background:#163a31;border-color:#2b6b58;color:#bfe8d9}
#nx-data-studio.nst-dark .nst-ask-foot{border-color:#2b3744}
/* the scope it read, on the grid: the whole sheet when the request is about the tab or the workbook */
#nx-data-studio.nst-ask-sheet .nst-scroller{box-shadow:inset 0 0 0 2px rgba(214,178,95,.85),inset 0 0 40px rgba(214,178,95,.18);transition:box-shadow .2s}
@media (prefers-reduced-motion:reduce){#nx-data-studio .nst-ask,#nx-data-studio .nst-ask::before,#nx-data-studio .nst-ask-mark{animation:none!important}}

/* Create model (the Generate pipeline as far as the finished mapping) */
#nx-data-studio .nst-model-dialog{width:min(560px,94vw)}
#nx-data-studio .nst-model-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px 12px;margin:12px 0 4px}
#nx-data-studio .nst-model-field{display:flex;flex-direction:column;gap:4px;font:600 11.5px/1.3 Inter,system-ui,sans-serif;color:#4a5b6d}
#nx-data-studio .nst-model-field:first-child{grid-column:1/-1}
#nx-data-studio .nst-model-field .nst-modal-input{margin:0;width:100%;box-sizing:border-box}
#nx-data-studio .nst-model-note,#nx-data-studio .nst-model-kept{font-size:12px;color:#5b6b7d;margin:8px 0 0}
#nx-data-studio .nst-model-kept{background:#f1f6fb;border:1px solid #d6e3ef;border-radius:8px;padding:8px 10px;color:#24476a}
#nx-data-studio .nst-model-status{display:flex;align-items:center;gap:9px;margin-top:12px;padding:10px 12px;border-radius:9px;background:#f4f7fa;border:1px solid #dde5ed;font:500 12.5px/1.45 Inter,system-ui,sans-serif;color:#22394f}
#nx-data-studio .nst-model-status.nst-model-error{display:block;background:#fff4f3;border-color:#f1c9c4;color:#8a2a20}
#nx-data-studio .nst-model-spin{flex:none;width:14px;height:14px;border-radius:50%;border:2px solid #c7d5e2;border-top-color:#1f5d8c;animation:nst-model-spin .8s linear infinite}
@keyframes nst-model-spin{to{transform:rotate(360deg)}}
@media (max-width:560px){#nx-data-studio .nst-model-fields{grid-template-columns:1fr}}

/* Studio header, rebalanced as a complete component rather than compressed rows.
   The three command rows and each group caption must remain entirely visible. */
#nx-data-studio .nst-head{
  height:52px;min-height:52px;padding:0 14px;gap:10px
}
#nx-data-studio .nst-mark{width:30px;height:30px;border-radius:8px}
#nx-data-studio .nst-brand{min-width:138px;gap:1px}
#nx-data-studio .nst-brand strong{font-size:15px}
#nx-data-studio .nst-brand small{font-size:9.5px}
#nx-data-studio .nst-document-meta{padding-left:10px;gap:7px}
#nx-data-studio .nst-head .nst-button{min-height:32px;padding:6px 11px}
#nx-data-studio .nst-head .nst-close-studio{width:32px;min-width:32px}
#nx-data-studio .nst-search{height:32px;max-width:400px;margin:0 9px;padding:0 9px;min-width:0}
#nx-data-studio .nst-ribbon-tabs{min-height:33px;padding:0 10px}
#nx-data-studio .nst-ribbon-tab{padding:7px 11px 8px;font-size:11.5px}
/* Let command content determine height; no fixed height that crops labels. */
#nx-data-studio .nst-ribbon-actions{
  height:auto;min-height:89px;padding:5px 8px 4px;
  align-items:stretch;gap:0
}
#nx-data-studio .nst-rgroup{
  display:grid;grid-template-rows:minmax(64px,auto) 13px;
  align-content:space-between;gap:3px;min-height:78px;
  padding:0 8px
}
#nx-data-studio .nst-rgroup-body{display:flex;gap:3px;align-items:flex-start;min-height:64px}
#nx-data-studio .nst-rgroup-label{
  height:13px;min-height:13px;line-height:13px;
  font-size:10px;padding:0;text-align:center
}
#nx-data-studio .nst-rsmall{
  display:grid;grid-template-rows:repeat(3,minmax(22px,auto));
  grid-auto-flow:column;align-content:start;gap:0
}
#nx-data-studio .nst-rrow{min-height:22px}
#nx-data-studio .nst-rbig{
  width:64px;min-height:64px;padding:4px 3px;
  font-size:11px;line-height:1.15;text-align:center
}
#nx-data-studio .nst-rbig .nst-ico{width:23px;height:23px}
#nx-data-studio .nst-rsm{min-height:22px;padding:1px 6px;font-size:11.5px;line-height:1.15}
#nx-data-studio .nst-rsm .nst-ico{width:15px;height:15px}
#nx-data-studio .nst-formulabar{
  height:42px;min-height:42px;padding:4px 11px;gap:8px
}
#nx-data-studio .nst-name-box{height:31px;width:78px;min-width:78px;padding:5px 9px}
#nx-data-studio .nst-formula-input{height:32px;padding:5px 10px}
#nx-data-studio .nst-formulabar .nst-button{height:32px;min-height:32px}
@media(max-width:680px){
  #nx-data-studio .nst-head{height:48px;min-height:48px;padding:0 9px;gap:6px}
  #nx-data-studio .nst-ribbon-tabs{padding:0 6px}
  #nx-data-studio .nst-ribbon-actions{height:auto;min-height:87px;padding:5px 6px 4px}
  #nx-data-studio .nst-rgroup{padding:0 7px}
  #nx-data-studio .nst-formulabar{height:40px;min-height:40px;padding:4px 8px}
  #nx-data-studio .nst-search{margin:0 4px}
}

/* All ribbon tabs must occupy the SAME height. Previous auto height varied
   with each tab's commands, moving the entire worksheet during navigation. */
#nx-data-studio .nst-ribbon-tabs{height:34px;min-height:34px;max-height:34px}
#nx-data-studio .nst-ribbon-actions{
  height:100px;min-height:100px;max-height:100px;
  padding:6px 9px;align-items:stretch;overflow-x:auto;overflow-y:hidden
}
#nx-data-studio .nst-rgroup{
  height:88px;min-height:88px;max-height:88px;
  grid-template-rows:72px 13px;gap:3px;padding:0 8px
}
#nx-data-studio .nst-rgroup-body{min-height:72px;height:72px}
#nx-data-studio .nst-rsmall{grid-template-rows:repeat(3,24px);gap:0}
#nx-data-studio .nst-rrow{min-height:24px}
#nx-data-studio .nst-rsm{min-height:24px}
#nx-data-studio .nst-rbig{
  width:72px;min-height:72px;max-height:72px;
  padding:3px 3px;font-size:11px
}
#nx-data-studio .nst-rbig .nst-ico{width:23px;height:23px}
#nx-data-studio .nst-rgroup-label{
  min-height:13px;height:13px;line-height:13px
}
@media(max-width:680px){
  #nx-data-studio .nst-ribbon-actions{
    height:100px;min-height:100px;max-height:100px;padding:6px 7px
  }
}

/* Imported XLSX contains its own border contract. Do not fabricate black
   vertical bill separators around cells that Excel left unbordered. All
   explicit source borders remain inline and therefore override these rules.
   Legacy/hand-built BOQ worksheets keep their existing engineering fallback. */
#nx-data-studio .nst-scroller.nst-boq-layout.nst-excel-source .nst-cell.nst-boq-table-cell,
#nx-data-studio .nst-scroller.nst-boq-layout.nst-excel-source .nst-cell.nst-boq-table-last{
  border-right:1px solid #d0d0d0;
}
#nx-data-studio .nst-scroller.nst-boq-layout.nst-excel-source .nst-cell.nst-boq-table-first{
  border-left:1px solid #d0d0d0;
}
#nx-data-studio .nst-scroller.nst-boq-layout.nst-excel-source .nst-cell.nst-boq-table-header{
  border-top:1px solid #d0d0d0;
  border-bottom:1px solid #d0d0d0;
}

/* Excel-density rows: crisp single-pixel cell rules at every true cell edge.
   Do not draw internal lines inside merged ranges; their visible perimeter
   belongs to the pinned merged anchor when scrolling. */
#nx-data-studio .nst-scroller.nst-excel-source .nst-cell:not(.nst-merge-covered){
  border-bottom-color:#d5d5d5;
  border-right-color:#d5d5d5;
}
#nx-data-studio .nst-scroller.nst-excel-source .nst-cell.nst-merged-tall{
  background:#fff;
}
#nx-data-studio .nst-scroller.nst-excel-source .nst-cell.nst-merge-covered{
  border-right-color:transparent;
  border-bottom-color:transparent;
}

/* Source XLSX visual fidelity. Original Excel style records win over BOQ
   template CSS; the separate density control remains available. */
#nx-data-studio .nst-scroller.nst-excel-visual .nst-cell{
  padding:0 3px;font-family:"Times New Roman",Calibri,serif;
  font-size:calc(16px * var(--nst-zoom,1));line-height:1.12;
  font-weight:400;color:#080808;background:#fff;
  border-right:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5;
}
#nx-data-studio .nst-scroller.nst-excel-visual .nst-cell.nst-boq-table-cell,
#nx-data-studio .nst-scroller.nst-excel-visual .nst-cell.nst-boq-table-first,
#nx-data-studio .nst-scroller.nst-excel-visual .nst-cell.nst-boq-table-last,
#nx-data-studio .nst-scroller.nst-excel-visual .nst-cell.nst-boq-table-header{
  border-right:1px solid #e5e5e5;border-left:0;border-top:0;
  border-bottom:1px solid #e5e5e5;justify-content:normal;
  text-align:initial;font-weight:400;
}
#nx-data-studio .nst-scroller.nst-excel-visual .nst-cell.nst-boq-section .nst-val,
#nx-data-studio .nst-scroller.nst-excel-visual .nst-cell.nst-section-heading .nst-val{text-decoration:none}
#nx-data-studio .nst-scroller.nst-excel-visual .nst-cell.nst-wrapped .nst-val{
  white-space:pre-wrap;overflow-wrap:normal;-webkit-line-clamp:unset;line-height:1.12
}
#nx-data-studio .nst-excel-visual-image{
  position:absolute;display:block;object-fit:contain;pointer-events:none;z-index:3
}

/* Source Excel Normal view versus Page Break Preview: no fake BOQ edges. */
#nx-data-studio .nst-scroller.nst-page-break-preview,
#nx-data-studio .nst-scroller.nst-page-break-preview .nst-canvas{
  background:#a5a5a5;
}
#nx-data-studio .nst-scroller.nst-page-break-preview .nst-cell{
  border-right-color:transparent;
  border-bottom-color:transparent;
}
#nx-data-studio .nst-scroller.nst-page-break-preview .nst-cell.nst-outside-print{
  background:#a5a5a5!important;
  color:transparent!important;
  border:0!important;
}
#nx-data-studio .nst-scroller.nst-page-break-preview .nst-cell:not(.nst-outside-print){
  background:#fff;
}
#nx-data-studio .nst-print-mark{position:absolute;pointer-events:none}
#nx-data-studio .nst-page-edge,
#nx-data-studio .nst-page-row-break{background:#173bff;z-index:7}
#nx-data-studio .nst-page-watermark{
  z-index:6;transform:translate(-50%,-50%);
  font-family:Arial,sans-serif;font-size:clamp(40px,8vw,106px);
  font-weight:700;color:#666;opacity:.46;white-space:nowrap;
}
#nx-data-studio .nst-scroller.nst-excel-visual .nst-cell.nst-excel-overflow{
  overflow:visible;position:relative;z-index:5;
}
#nx-data-studio .nst-scroller.nst-excel-visual .nst-cell.nst-excel-overflow .nst-val{
  width:max-content;max-width:none;flex:none;
  overflow:visible;white-space:nowrap;text-overflow:clip;
}
#nx-data-studio .nst-scroller.nst-excel-visual .nst-cell.nst-merge-covered{
  border-right-color:transparent;border-bottom-color:transparent;background:transparent;
}

/* Explicit Excel borders must remain visible in BOTH worksheet modes.
   Previous page-preview CSS made unstyled grid edges transparent and could
   visually disconnect native table borders. */
#nx-data-studio .nst-scroller.nst-excel-visual.nst-page-break-preview .nst-cell:not(.nst-outside-print){
  border-right-color:#e5e5e5;
  border-bottom-color:#e5e5e5;
}
#nx-data-studio .nst-scroller.nst-excel-visual.nst-page-break-preview .nst-cell.nst-merge-covered{
  border-right-color:transparent;border-bottom-color:transparent;
}
/* Independent overlay does not replace the original cell's fill or borders. */
#nx-data-studio .nst-selection-frame{
  position:absolute;pointer-events:none;z-index:12;box-sizing:border-box;
  border:2px solid #169a70;box-shadow:0 0 0 1px rgba(22,154,112,.16);
  background:transparent;
}
#nx-data-studio .nst-scroller.nst-excel-visual .nst-cell.nst-active,
#nx-data-studio .nst-scroller.nst-excel-visual .nst-cell.nst-active.nst-selected{
  box-shadow:none!important;
}
#nx-data-studio .nst-scroller.nst-excel-visual .nst-cell.nst-selected:not(.nst-active){
  background-color:#e7f4ec;
}
#nx-data-studio .nst-scroller.nst-page-break-preview .nst-print-mark.nst-page-edge,
#nx-data-studio .nst-scroller.nst-page-break-preview .nst-print-mark.nst-page-row-break{
  background:#1644fa;
}

#nx-data-studio .nst-source-merge-edge{
  position:absolute;box-sizing:border-box;z-index:7;pointer-events:none;
}
#nx-data-studio .nst-bottom .nst-view-switch{
  border:0;background:transparent;color:#657588;
  width:28px;height:26px;min-width:28px;border-radius:5px;
  font-size:16px;line-height:1;display:grid;place-items:center;
}
#nx-data-studio .nst-bottom .nst-view-switch.active{
  background:#e1f2e9;color:#127d5a;box-shadow:inset 0 0 0 1px #b4dcc8;
}
#nx-data-studio .nst-bottom .nst-view-switch:hover{background:#eaf1f6}

/* Source border geometry is one continuous stroke across cell boundaries,
   using real XLSX border specifications (no fabricated black BOQ columns). */
#nx-data-studio .nst-source-border-edge{
  position:absolute;width:0;height:0;box-sizing:border-box;
  pointer-events:none;z-index:6;
}

/* Keep Excel's fill handle visible and draggable above the range outline. */
#nx-data-studio .nst-fill-handle{z-index:15}

/* Excel outline levels belong in the fixed row gutter, not in worksheet cells.
   The controls don't alter source borders, font metrics or BOQ column widths. */
#nx-data-studio .nst-row-num:has(.nst-outline-rail){
  padding-left:18px;position:sticky;overflow:visible;
}
#nx-data-studio .nst-outline-rail{
  position:absolute;left:2px;top:50%;transform:translateY(-50%);
  display:flex;align-items:center;gap:2px;z-index:5;
}
#nx-data-studio .nst-outline-toggle{
  appearance:none;width:15px;height:15px;min-width:15px;
  padding:0;margin:0;border:1px solid #8997a6;border-radius:3px;
  background:#fff;color:#263c51;font:700 12px/12px Arial,sans-serif;
  text-align:center;display:grid;place-items:center;cursor:pointer;
}
#nx-data-studio .nst-outline-toggle:hover,
#nx-data-studio .nst-outline-toggle:focus-visible{
  border-color:#137b59;background:#e9f5ee;color:#12674d;
}
#nx-data-studio .nst-outline-toggle.is-closed{
  background:#eef6f0;border-color:#3f956a;color:#106c47;
}
#nx-data-studio .nst-filter-menu{
  z-index:214;min-width:0;overflow:hidden;display:flex;flex-direction:column;
}
#nx-data-studio .nst-filter-menu .nst-pop-list{
  min-height:0;flex:1;overflow:auto;
}


/* BIM takeoff linked schedules — quiet, readable Revit-style hierarchy.
   Scoped to linked QTO rows: original imported XLSX cells stay untouched. */
#nx-data-studio .nst-row.nst-qto-group .nst-row-num {
  font-weight:700;color:#38516c;background:#edf3f8;border-right:2px solid #adbdce;
}
#nx-data-studio .nst-row.nst-qto-group .nst-cell:not(.nst-selected):not(.nst-active) {
  font-weight:650;border-bottom:1px solid #c5d5df;
}
#nx-data-studio .nst-row.nst-qto-group[data-qto-depth="0"] .nst-cell:not(.nst-selected):not(.nst-active) {
  background:#e2edf7;color:#183c5c;border-bottom-color:#a9c0d4;
}
#nx-data-studio .nst-row.nst-qto-group[data-qto-depth="1"] .nst-cell:not(.nst-selected):not(.nst-active) {
  background:#ecf3fa;color:#285074;border-bottom-color:#c3d3e1;
}
#nx-data-studio .nst-row.nst-qto-group[data-qto-depth="2"] .nst-cell:not(.nst-selected):not(.nst-active) {
  background:#e8f4f1;color:#23645d;border-bottom-color:#bddcd5;
}
#nx-data-studio .nst-row.nst-qto-group[data-qto-depth="3"] .nst-cell:not(.nst-selected):not(.nst-active),
#nx-data-studio .nst-row.nst-qto-group[data-qto-depth="4"] .nst-cell:not(.nst-selected):not(.nst-active) {
  background:#f3f6fa;color:#3b5871;border-bottom-color:#d5dfe8;
}
#nx-data-studio .nst-row.nst-qto-detail .nst-cell[data-c="0"] { padding-left:var(--nst-qto-indent,20px); }
#nx-data-studio .nst-row.nst-qto-detail[data-qto-stripe="even"] .nst-cell:not(.nst-selected):not(.nst-active) {
  background:#f8fafc;color:#253447;
}
#nx-data-studio .nst-row.nst-qto-detail[data-qto-stripe="odd"] .nst-cell:not(.nst-selected):not(.nst-active) {
  background:#fff;color:#253447;
}
#nx-data-studio .nst-row.nst-qto-group .nst-cell,
#nx-data-studio .nst-row.nst-qto-detail .nst-cell {
  border-right-color:#dde5ec;
}
#nx-data-studio .nst-row.nst-qto-group .nst-outline-toggle {
  color:#1a466a;border-color:#a5bdd1;background:#fff;
}
#nx-data-studio .nst-row.nst-qto-group .nst-outline-toggle:hover {
  background:#e7f2fc;border-color:#6b9abf;
}


/* Touch tablets: keep native Excel tools reachable without sacrificing
   half the landscape viewport to a desktop-sized three-tier ribbon. */
@media (hover:none) and (pointer:coarse) and (min-width:600px) {
  #nx-data-studio {
    height:100dvh;
    max-height:100dvh;
    padding-bottom:env(safe-area-inset-bottom,0px);
  }
  #nx-data-studio .nst-head {height:52px;min-height:52px;padding:0 12px;gap:8px}
  #nx-data-studio .nst-brand {min-width:120px}
  #nx-data-studio .nst-brand strong {font-size:14px}
  #nx-data-studio .nst-document-meta {padding-left:9px}
  #nx-data-studio .nst-ribbon-tabs {min-height:33px;padding:0 8px}
  #nx-data-studio .nst-ribbon-tab {padding:7px 10px;font-size:12px}
  #nx-data-studio .nst-ribbon-actions {
    height:62px;min-height:62px;max-height:62px;
    padding:4px 8px;gap:0;align-items:center;
    overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;
  }
  #nx-data-studio .nst-rgroup {
    height:52px;justify-content:center;padding:0 6px;gap:0;
  }
  #nx-data-studio .nst-rgroup-label {display:none}
  #nx-data-studio .nst-rgroup-body {align-items:center;gap:2px}
  #nx-data-studio .nst-rsmall {display:flex;flex-direction:row;align-items:center;gap:1px}
  #nx-data-studio .nst-rbig {
    width:auto;min-width:49px;min-height:44px;
    padding:3px 7px;font-size:11px;gap:2px;
  }
  #nx-data-studio .nst-rbig .nst-ico {width:19px;height:19px}
  #nx-data-studio .nst-rsm {min-height:42px;padding:3px 7px}
  #nx-data-studio .nst-ribbon-actions .nst-ribbon-button {font-size:11px}
  #nx-data-studio .nst-formulabar {height:43px;min-height:43px;padding:4px 10px}
  #nx-data-studio .nst-bottom {padding-bottom:env(safe-area-inset-bottom,0px)}
}

/* ── Excel-grade grid behaviour (selection, Focus cell, menus, tabs, live Agent) ── */
/* drag-select must not start the browser's text selection or a touch pan on a mouse */
#nx-data-studio .nst-canvas{user-select:none;-webkit-user-select:none}
#nx-data-studio .nst-grid-head .nst-corner{cursor:cell;position:sticky;left:0;z-index:5}
#nx-data-studio .nst-grid-head .nst-corner::after{content:"";position:absolute;right:4px;bottom:4px;border:5px solid transparent;
  border-right-color:#b8c2cc;border-bottom-color:#b8c2cc;opacity:.9}
#nx-data-studio .nst-grid-head .nst-corner:hover::after{border-right-color:#18866c;border-bottom-color:#18866c}
#nx-data-studio .nst-colhead,#nx-data-studio .nst-row-num{cursor:pointer}
/* a whole column / row selected: its letter or number is filled, as in Excel */
#nx-data-studio .nst-colhead.nst-current,#nx-data-studio .nst-row-num.nst-current{box-shadow:inset 0 -2px 0 #18866c}
#nx-data-studio .nst-row-num.nst-current{box-shadow:inset -2px 0 0 #18866c}
#nx-data-studio .nst-grid-shell[data-whole="col"] .nst-colhead.nst-current,
#nx-data-studio .nst-grid-shell[data-whole="row"] .nst-row-num.nst-current,
#nx-data-studio .nst-grid-shell[data-whole="all"] .nst-colhead.nst-current,
#nx-data-studio .nst-grid-shell[data-whole="all"] .nst-row-num.nst-current{background:#d3ebe1!important;color:#0f5a48!important;font-weight:700}
/* Focus cell: the active row and column, tinted across the sheet */
#nx-data-studio .nst-focus-row,#nx-data-studio .nst-focus-col{position:absolute;pointer-events:none;z-index:11;background:rgba(24,134,108,.075)}
#nx-data-studio .nst-focus-row{box-shadow:inset 0 1px 0 rgba(24,134,108,.30),inset 0 -1px 0 rgba(24,134,108,.30)}
#nx-data-studio .nst-focus-col{box-shadow:inset 1px 0 0 rgba(24,134,108,.30),inset -1px 0 0 rgba(24,134,108,.30)}
#nx-data-studio.nst-dark .nst-focus-row,#nx-data-studio.nst-dark .nst-focus-col{background:rgba(63,191,150,.10)}
#nx-data-studio .nst-focus-switch.active{color:#18866c;background:#e9f4ef}
#nx-data-studio .nst-focus-switch .nst-ico{width:15px;height:15px}

/* the right-click menu: one compact line per command, side lists for each discipline */
#nx-data-studio .nst-context-pro.nst-context-x{width:auto;max-height:none;overflow:visible;padding:0;border:0;background:none;box-shadow:none;backdrop-filter:none;z-index:2147480006}
#nx-data-studio .nst-context-main,#nx-data-studio .nst-context-sub{width:268px;background:#fff;border:1px solid #d9e1e9;border-radius:10px;padding:4px;
  box-shadow:0 16px 44px rgba(13,34,57,.17),0 3px 10px rgba(13,34,57,.07)}
#nx-data-studio .nst-context-main{max-height:min(640px,calc(100dvh - 24px));overflow:auto}
#nx-data-studio .nst-context-sub{position:absolute;width:286px;max-height:min(520px,calc(100dvh - 24px));overflow:auto;z-index:2;animation:nst-proposal-in .1s ease-out both}
#nx-data-studio .nst-context-sub[hidden]{display:none}
#nx-data-studio .nst-context-x .nst-context-header{padding:7px 9px 7px;margin:0 0 3px;border-radius:7px 7px 3px 3px;gap:2px}
#nx-data-studio .nst-context-x .nst-context-header strong{font-size:11.5px}
#nx-data-studio .nst-context-x .nst-context-item{display:flex;align-items:center;gap:8px;min-height:28px;width:100%;padding:4px 8px;border:0;border-radius:6px;
  background:transparent;color:#24394d;font:500 12px/1.25 Inter,"Segoe UI",system-ui;text-align:left;cursor:pointer}
#nx-data-studio .nst-context-x .nst-context-item:first-child{color:#24394d;font-weight:500}
#nx-data-studio .nst-context-x .nst-context-item:hover,#nx-data-studio .nst-context-x .nst-context-item:focus-visible,
#nx-data-studio .nst-context-x .nst-context-item.nst-open{background:#edf3f8;color:#10304c;outline:0}
#nx-data-studio .nst-context-x .nst-context-item[disabled]{opacity:.42;cursor:default;background:transparent}
#nx-data-studio .nst-context-x .nst-context-icon{width:20px;height:20px;border:0;background:transparent;border-radius:5px;font-size:12.5px;color:#5c7489}
#nx-data-studio .nst-context-x .nst-context-copy{gap:1px}
#nx-data-studio .nst-context-x .nst-context-copy strong{font-size:12px;font-weight:560;color:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#nx-data-studio .nst-context-x .nst-context-copy small{display:none}
#nx-data-studio .nst-context-x .nst-context-sub .nst-context-copy small{display:block;font-size:10px;color:#8794a0;white-space:normal}
#nx-data-studio .nst-context-x .nst-context-sub .nst-context-item{min-height:30px;padding:5px 8px}
#nx-data-studio .nst-context-key{margin-left:auto;padding-left:10px;font:500 10.5px/1 Inter,system-ui,sans-serif;color:#8a97a4;background:none;border:0;white-space:nowrap}
#nx-data-studio .nst-context-arrow{margin-left:auto;color:#7f8e9c;font-size:15px;line-height:1;padding-left:8px}
#nx-data-studio .nst-context-x .nst-context-accent .nst-context-icon{background:#f7f0e4;color:#9a7536}
#nx-data-studio .nst-context-x .nst-context-accent strong{font-weight:620}
#nx-data-studio .nst-context-x .nst-context-ai .nst-context-icon{background:#f7f0e4;color:#a17c3c}
#nx-data-studio .nst-context-x .nst-context-ai:hover{background:#faf5ea}
#nx-data-studio .nst-context-x .nst-context-sep{height:1px;margin:4px 6px;background:#edf0f3}
#nx-data-studio.nst-dark .nst-context-main,#nx-data-studio.nst-dark .nst-context-sub{background:#18212b;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-context-x .nst-context-item{color:#dbe4ed}
#nx-data-studio.nst-dark .nst-context-x .nst-context-item:hover,#nx-data-studio.nst-dark .nst-context-x .nst-context-item.nst-open{background:#22303d;color:#fff}
#nx-data-studio.nst-dark .nst-context-x .nst-context-header{background:#141c24;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-context-x .nst-context-sep{background:#2b3744}

/* the tab bar: files as groups, tabs that scroll, close on every tab */
#nx-data-studio .nst-bottom{overflow:hidden}
#nx-data-studio .nst-tabstrip{display:flex;align-items:stretch;min-width:0;flex:0 1 auto;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;scroll-behavior:smooth}
#nx-data-studio .nst-tabstrip::-webkit-scrollbar{display:none}
#nx-data-studio .nst-tabs-all{flex:none;border:0;border-right:1px solid #e6eaef;background:transparent;color:#5d7081;font:600 11px/1 Inter,system-ui;padding:0 10px;cursor:pointer;white-space:nowrap}
#nx-data-studio .nst-tabs-all:hover{background:#eef2f6;color:#18866c}
#nx-data-studio .nst-tab-add{flex:none}
#nx-data-studio .nst-tab-wrap{position:relative}
#nx-data-studio .nst-tab-close{border:0;background:transparent;color:#9aa6b2;font-size:14px;line-height:1;padding:0 6px 0 2px;cursor:pointer;opacity:0;transition:opacity .12s}
#nx-data-studio .nst-tab-wrap:hover .nst-tab-close,#nx-data-studio .nst-tab-wrap:has(.nst-sheet-tab.active) .nst-tab-close,#nx-data-studio .nst-tab-picked .nst-tab-close{opacity:1}
#nx-data-studio .nst-tab-close:hover{color:#b42318}
#nx-data-studio .nst-tab-picked .nst-sheet-tab{background:#e3f1eb!important;color:#145f4d}
#nx-data-studio .nst-tab-picked{box-shadow:inset 0 2px 0 #18866c}
#nx-data-studio .nst-file-group{display:flex;align-items:stretch;margin:4px 4px 0 2px;border-radius:7px 7px 0 0;background:#f1f4f7;border:1px solid #e1e7ed;border-bottom:0}
#nx-data-studio .nst-file-group.nst-file-active{background:#eaf4ef;border-color:#cfe6dc}
#nx-data-studio .nst-file-group .nst-tab-wrap{border-right:1px solid #e4e9ee}
#nx-data-studio .nst-file-group .nst-sheet-tab{padding:6px 10px 6px}
#nx-data-studio .nst-file-chip{display:flex;align-items:center;gap:5px;flex:none;border:0;border-right:1px solid #dfe5eb;background:transparent;cursor:pointer;
  padding:0 8px 0 7px;font:650 11px/1 Inter,system-ui,sans-serif;color:#40576c;max-width:220px}
#nx-data-studio .nst-file-chip:hover{color:#18866c}
#nx-data-studio .nst-file-caret{font-size:9px;color:#8796a4;width:8px}
#nx-data-studio .nst-file-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#nx-data-studio .nst-file-name::before{content:"▦ ";color:#1d6f42}
#nx-data-studio .nst-file-count{flex:none;min-width:16px;padding:2px 5px;border-radius:9px;background:#fff;color:#5d7081;font-size:10px;text-align:center;border:1px solid #e1e7ed}
#nx-data-studio .nst-sheet-sep{height:1px;margin:4px 6px;background:#edf0f3}
#nx-data-studio .nst-sheet-option[disabled]{opacity:.42;cursor:default}
#nx-data-studio .nst-sheet-menu{max-height:calc(100dvh - 16px);overflow:auto}
#nx-data-studio .nst-tab-list{position:absolute;z-index:2147480012;width:300px;max-height:min(460px,70dvh);display:flex;flex-direction:column;padding:8px;gap:6px;
  background:#fff;border:1px solid #d9e1e9;border-radius:10px;box-shadow:0 16px 44px rgba(13,34,57,.17)}
#nx-data-studio .nst-tab-list-head{display:flex;align-items:center;justify-content:space-between;font:650 12px/1 Inter,system-ui;color:#24394d;padding:2px 2px 0}
#nx-data-studio .nst-tab-list-close{border:1px solid #f1d1cd;background:#fff6f5;color:#b42318;border-radius:6px;padding:5px 8px;font:600 11px/1 Inter,system-ui;cursor:pointer}
#nx-data-studio .nst-tab-list-close:hover{background:#fdeceb}
#nx-data-studio .nst-tab-list-body{overflow:auto;display:flex;flex-direction:column;gap:1px}
#nx-data-studio .nst-tab-list-file{font:700 9.5px/1 Inter,system-ui;letter-spacing:.08em;text-transform:uppercase;color:#8795a4;padding:9px 6px 4px}
#nx-data-studio .nst-tab-list-item{display:flex;align-items:center;justify-content:space-between;gap:8px;border:0;background:transparent;border-radius:6px;padding:6px 8px;
  font:500 12px/1.2 Inter,system-ui;color:#24394d;text-align:left;cursor:pointer}
#nx-data-studio .nst-tab-list-item small{color:#8a97a4;font-size:10px}
#nx-data-studio .nst-tab-list-item:hover{background:#edf3f8}
#nx-data-studio .nst-tab-list-item.active{background:#e9f4ef;color:#145f4d;font-weight:650}
#nx-data-studio.nst-dark .nst-file-group{background:#141c24;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-file-group.nst-file-active{background:#163a31;border-color:#2b6b58}
#nx-data-studio.nst-dark .nst-file-chip{color:#cdd7e1;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-file-count{background:#10171e;border-color:#2b3744;color:#9aa8b6}
#nx-data-studio.nst-dark .nst-tab-list{background:#18212b;border-color:#2b3744}
#nx-data-studio.nst-dark .nst-tab-list-item{color:#dbe4ed}
#nx-data-studio.nst-dark .nst-tab-list-item:hover{background:#22303d}
#nx-data-studio.nst-dark .nst-tabs-all{color:#9aa8b6;border-color:#2b3744}

/* the Agent at work: a live bar over the grid, the range it works on outlined */
#nx-data-studio .nst-working-frame{position:absolute;pointer-events:none;z-index:13;box-sizing:border-box;border:2px dashed #c9a24a;border-radius:2px;
  background:rgba(214,178,95,.07);animation:nst-working 1.2s linear infinite}
@keyframes nst-working{50%{border-color:rgba(201,162,74,.35);background:rgba(214,178,95,.13)}}
#nx-data-studio .nst-live{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);z-index:40;display:flex;align-items:center;gap:11px;
  min-width:min(420px,calc(100% - 28px));max-width:calc(100% - 28px);padding:9px 10px 9px 12px;border-radius:12px;background:#10243c;color:#eaf1f8;
  box-shadow:0 16px 40px rgba(6,18,34,.30),0 0 0 1px rgba(214,178,95,.30);animation:nst-ask-in .18s ease-out both;font-family:Inter,system-ui,sans-serif}
#nx-data-studio .nst-live.nst-live-out{animation:nst-ask-out .24s ease-in both}
#nx-data-studio .nst-live-orb{flex:none;width:22px;height:22px;border-radius:50%;border:2.5px solid rgba(230,196,111,.25);border-top-color:#e6c46f;animation:nst-live-spin .8s linear infinite}
@keyframes nst-live-spin{to{transform:rotate(360deg)}}
#nx-data-studio .nst-live-staged .nst-live-orb,#nx-data-studio .nst-live-done .nst-live-orb{animation:none;border-color:#3fbf96;background:#3fbf96;
  box-shadow:inset 0 0 0 4px #10243c}
#nx-data-studio .nst-live-error .nst-live-orb,#nx-data-studio .nst-live-stopped .nst-live-orb{animation:none;border-color:#e0786e;background:#e0786e;box-shadow:inset 0 0 0 4px #10243c}
#nx-data-studio .nst-live-copy{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
#nx-data-studio .nst-live-copy strong{font-size:12.5px;font-weight:650;color:#fff}
#nx-data-studio .nst-live-step{font-size:12px;color:#f1d79a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#nx-data-studio .nst-live-step:empty{display:none}
#nx-data-studio .nst-live-ask{font-size:10.5px;color:#8fa6bf;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#nx-data-studio .nst-live-trail{display:flex;gap:4px;flex:none}
#nx-data-studio .nst-live-dot{width:6px;height:6px;border-radius:50%;background:#3fbf96;opacity:.85}
#nx-data-studio .nst-live-time{flex:none;font:600 11px/1 Inter,system-ui;color:#8fa6bf;font-variant-numeric:tabular-nums}
#nx-data-studio .nst-live-btn{flex:none;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.06);color:#dbe6f1;border-radius:7px;padding:6px 9px;font:600 11px/1 Inter,system-ui;cursor:pointer}
#nx-data-studio .nst-live-btn:hover{background:rgba(255,255,255,.14)}
#nx-data-studio .nst-live-stop{border-color:rgba(224,120,110,.5);color:#ffb4ab}
@media (prefers-reduced-motion:reduce){#nx-data-studio .nst-working-frame,#nx-data-studio .nst-live-orb,#nx-data-studio .nst-live{animation:none!important}}

/* a model proposal on a BOQ row: its actions in the cell */
.nst-cell.nst-has-qa { gap: 4px; align-items: center; }
.nst-cell.nst-has-qa .nst-val { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nst-qa { flex: 0 0 auto; display: inline-flex; gap: 3px; margin-left: auto; }
.nst-qa-btn { border: 1px solid #D9B26A; background: #FFF7E6; color: #7A4A00; border-radius: 6px; font: 600 10.5px/1 Inter, system-ui, sans-serif; padding: 3px 6px; cursor: pointer; white-space: nowrap; }
.nst-qa-btn:hover { background: #FFE9BF; }
.nst-qa-btn.nst-qa-ok { border-color: #2FA36B; background: #E8F7EF; color: #17663F; }
.nst-qa-btn.nst-qa-ok:hover { background: #CDEFDC; }
.nst-qa-btn.nst-qa-no { border-color: #E08A8A; background: #FDECEC; color: #9B2C2C; padding: 3px 5px; }
/* the Space composer: one cell read in full; the scope line follows the words */
#nx-data-studio .nst-ask-peek-one{display:flex;flex-direction:column;gap:3px;padding:8px 10px;font:500 12px/1.4 Inter,system-ui,sans-serif;color:#24394d}
#nx-data-studio .nst-ask-peek-one::after{display:none}
#nx-data-studio .nst-ask-peek:has(.nst-ask-peek-one)::after{display:none}
#nx-data-studio .nst-ask-peek-k{font-size:10.5px;font-weight:650;color:#6b7a89}
#nx-data-studio .nst-ask-peek-v{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
#nx-data-studio .nst-ask-peek-f{font:500 11px/1.3 ui-monospace,Menlo,monospace;color:#245580;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#nx-data-studio .nst-ask-peek-t{table-layout:auto}
#nx-data-studio .nst-ask-peek-t td{max-width:300px}
#nx-data-studio .nst-ask-sel-wide{background:#fbf5e6;border-color:#efe1bf;color:#7a5a1e}
#nx-data-studio .nst-ask-sel-wide .nst-ask-sel-ic{border-color:#c9a24a}
#nx-data-studio .nst-ask-sel-wide span{color:#9a7f4f}
#nx-data-studio.nst-dark .nst-ask-peek-one{color:#dbe4ed}
#nx-data-studio.nst-dark .nst-ask-sel-wide{background:#2c2513;border-color:#6b5420;color:#f1d79a}
/* dark grid: a BOQ heading row keeps readable ink on the dark heading fill */
#nx-data-studio.nst-dark .nst-scroller.nst-boq-layout .nst-cell.nst-boq-table-header,
#nx-data-studio.nst-dark .nst-boq-layout .nst-cell.nst-boq-table-header{background-color:#1d2834!important;color:#e9eef4!important}
#nx-data-studio.nst-dark .nst-boq-layout .nst-cell.nst-boq-table-header .nst-val{color:#e9eef4!important}

/* ── the header: the Nexora mark shown as it is, one height for every control ── */
/* the mark is navy on transparent: on a navy tile only its gold arc showed */
#nx-data-studio .nst-head .nst-mark{width:34px;height:34px;min-width:34px;border-radius:9px;background:#fff;border:1px solid #e1e7ee;box-shadow:none;display:grid;place-items:center;padding:0}
#nx-data-studio .nst-head .nst-mark img{width:26px;height:auto;max-height:22px;object-fit:contain;display:block}
#nx-data-studio.nst-dark .nst-head .nst-mark{background:#f4f6f9;border-color:#2b3744}
/* every control 32px tall: search, undo/redo, Export, Agent, close */
#nx-data-studio .nst-head .nst-search{height:32px;min-height:32px;box-sizing:border-box;padding:0 8px 0 10px;border-radius:8px;min-width:0}
#nx-data-studio .nst-head .nst-search-key{white-space:nowrap;flex:none;line-height:14px;padding:1px 5px}
#nx-data-studio .nst-head .nst-head-history{height:32px;box-sizing:border-box;padding:1px;border-radius:8px;align-items:center}
#nx-data-studio .nst-head .nst-head-icon{width:32px;height:28px;border-radius:6px}
#nx-data-studio .nst-head .nst-head-icon .nst-ico{width:17px;height:17px}
#nx-data-studio .nst-head .nst-head-secondary,#nx-data-studio .nst-head .nst-agent-main{height:32px;min-height:32px;box-sizing:border-box;padding:0 12px;border-radius:8px;display:inline-flex;align-items:center;white-space:nowrap}
/* a narrower window: the search keeps its shape; the key hint goes before the box gets cramped */
@media (max-width:1180px){#nx-data-studio .nst-head .nst-search-key{display:none}}
/* small screens: the search is one icon that opens over the header when tapped */
@media (max-width:900px){
  #nx-data-studio .nst-head .nst-search{flex:0 0 32px;width:32px;max-width:32px;padding:0;justify-content:center;margin:0 4px;cursor:text}
  #nx-data-studio .nst-head .nst-search .nst-search-input{width:0;flex:0 0 0;padding:0}
  #nx-data-studio .nst-head .nst-search:focus-within{position:absolute;left:8px;right:8px;top:50%;transform:translateY(-50%);width:auto;max-width:none;z-index:30;padding:0 10px;justify-content:flex-start;box-shadow:0 8px 24px rgba(13,34,57,.18)}
  #nx-data-studio .nst-head .nst-search:focus-within .nst-search-input{width:auto;flex:1}
  #nx-data-studio .nst-head{position:relative}
}
@media (max-width:560px){
  #nx-data-studio .nst-head .nst-brand{min-width:0}
  #nx-data-studio .nst-head .nst-brand strong{font-size:14px;white-space:nowrap}
  #nx-data-studio .nst-head .nst-document-meta{display:none}
  #nx-data-studio .nst-head .nst-agent-main{padding:0 9px;font-size:0}
  #nx-data-studio .nst-head .nst-agent-main::before{content:'✦ Agent';font-size:12px}
}
@media (max-width:560px){
  #nx-data-studio .nst-head .nst-brand{flex:0 1 auto;overflow:hidden}
  #nx-data-studio .nst-head .nst-brand strong{overflow:hidden;text-overflow:ellipsis;display:block}
}
@media (max-width:440px){#nx-data-studio .nst-head .nst-brand{display:none}}

/* core/studio/intelligence.css */
/* Nexora Studio Intelligence – native sheet surfaces, not an overlay application. */
#nx-data-studio .nsti-tools{display:inline-flex;align-items:center;gap:5px;margin:0 0 0 12px;
 padding-left:12px;border-left:1px solid #dbe1e9;white-space:nowrap}
#nx-data-studio .nsti-btn{min-height:30px;border:1px solid #d8e0e9;border-radius:8px;
 padding:6px 10px;background:#fff;color:#20374c;font-size:11.5px;font-weight:600;
 cursor:pointer;transition:background .16s ease,border-color .16s ease,transform .16s ease}
#nx-data-studio .nsti-btn:hover{border-color:#c1a673;background:#faf6eb}
#nx-data-studio .nsti-btn:active{transform:translateY(1px)}
#nx-data-studio .nsti-feature{background:#f8f9fb;border-color:transparent;color:#18334b}
#nx-data-studio .nsti-feature:first-child{color:#9b752e}
#nx-data-studio .nsti-primary{background:#132b42;color:#f6e9c7;border-color:#132b42}
#nx-data-studio .nsti-primary:hover{background:#1e405e;border-color:#1e405e}
#nx-data-studio .nsti-subtle{background:#f3f6f9}
#nx-data-studio .nsti-lens{position:absolute;right:18px;bottom:16px;z-index:8;width:min(448px,calc(100% - 36px));
 display:flex;flex-direction:column;max-height:min(560px,72%);border:1px solid #cdd7e0;border-radius:16px;
 background:#fff;box-shadow:0 16px 50px rgba(11,34,55,.19),0 2px 7px rgba(11,34,55,.05);
 overflow:hidden;animation:nsti-rise .22s cubic-bezier(.15,.75,.3,1)}
#nx-data-studio .nsti-lens[hidden]{display:none}
#nx-data-studio .nsti-lens.nsti-minimized .nsti-lens-body,
#nx-data-studio .nsti-lens.nsti-minimized .nsti-status{display:none}
#nx-data-studio .nsti-lens-header{min-height:58px;display:flex;align-items:center;gap:10px;
 padding:10px 13px;background:linear-gradient(125deg,#112940,#1e3b55);color:#fff;border-bottom:1px solid #364e63}
#nx-data-studio .nsti-lens-mark{flex:none;width:29px;height:29px;display:grid;place-items:center;
 color:#ebd39c;border:1px solid #b49b6f65;border-radius:8px;font-size:17px}
#nx-data-studio .nsti-lens-heading{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}
#nx-data-studio .nsti-lens-heading strong{font-weight:650;font-size:13px;letter-spacing:-.015em}
#nx-data-studio .nsti-lens-heading small{color:#c6d0d9;font-size:10px;white-space:nowrap;
 overflow:hidden;text-overflow:ellipsis}
#nx-data-studio .nsti-lens-header .nsti-btn{color:#dbe6ef;border:0;background:transparent;font-size:18px;
 min-height:24px;padding:2px 7px}
#nx-data-studio .nsti-lens-header .nsti-btn:hover{background:#ffffff18}
#nx-data-studio .nsti-lens-body{overflow-y:auto;overscroll-behavior:contain;padding:15px;min-height:0}
#nx-data-studio .nsti-status{font-size:10.5px;color:#678099;background:#f6f8fb;
 border-top:1px solid #e5eaf0;padding:9px 15px;line-height:1.5}
#nx-data-studio .nsti-status[data-tone="error"]{color:#a02e31;background:#fff6f5}
#nx-data-studio .nsti-status[data-tone="warning"]{color:#92651d;background:#fff9eb}
#nx-data-studio .nsti-status[data-tone="success"]{color:#16704c;background:#f2faf6}
#nx-data-studio .nsti-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
 gap:8px;margin-bottom:14px}
#nx-data-studio .nsti-metric{background:#f5f7fa;border:1px solid #e6ebef;border-radius:10px;
 display:flex;flex-direction:column;gap:5px;padding:10px;min-width:0}
#nx-data-studio .nsti-metric small{font-size:10px;color:#64788c;white-space:nowrap;
 overflow:hidden;text-overflow:ellipsis}
#nx-data-studio .nsti-metric strong{color:#17324a;font-size:17px;font-variant-numeric:tabular-nums;
 white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#nx-data-studio .nsti-issues{display:flex;flex-direction:column;gap:7px;max-height:290px;
 overflow-y:auto;margin:8px 0 13px;padding-right:3px}
#nx-data-studio .nsti-issue{display:flex;text-align:left;align-items:start;gap:10px;width:100%;
 border:1px solid #e8edf2;background:#fff;border-radius:9px;padding:9px 10px;
 color:#233c53;cursor:pointer}
#nx-data-studio button.nsti-issue:hover{background:#f8fafc;border-color:#c7d2df}
#nx-data-studio .nsti-severity{flex:none;border-radius:7px;background:#edf2f6;color:#55728d;
 width:23px;height:23px;display:grid;place-items:center;font-weight:700;font-size:12px}
#nx-data-studio .nsti-confirmed{background:#fff0ed;color:#bb493a}
#nx-data-studio .nsti-review{background:#fff7e7;color:#a77a2c}
#nx-data-studio .nsti-issue-copy{flex:1;min-width:0}
#nx-data-studio .nsti-issue-copy strong{font-size:11.5px;display:block;font-weight:600;color:#23384c}
#nx-data-studio .nsti-issue-copy small{display:block;margin:3px 0 0;color:#718297;font-size:10px}
#nx-data-studio .nsti-issue-copy p{margin:5px 0 0;color:#566c81;line-height:1.45;font-size:10.5px}
#nx-data-studio .nsti-navigate{font-size:15px;color:#8b744b}
#nx-data-studio .nsti-help,#nx-data-studio .nsti-empty{margin:7px 0 12px;line-height:1.55;
 font-size:11.5px;color:#667b8e}
#nx-data-studio .nsti-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 2px}
#nx-data-studio .nsti-field{display:flex;flex-direction:column;gap:6px;color:#526b82;font-weight:600;font-size:11px}
#nx-data-studio .nsti-field input{min-height:36px;border:1px solid #cdd8e2;border-radius:8px;
 font-size:12px;padding:7px 10px;color:#162e46;background:#fff;outline:0}
#nx-data-studio .nsti-field input:focus{border-color:#ba9b64;box-shadow:0 0 0 3px #ba9b6420}
#nx-data-studio .nsti-chips{display:flex;gap:6px;flex-wrap:wrap;margin:11px 0}
#nx-data-studio .nsti-chip{min-height:26px;font-size:10px;background:#f5f7fa;color:#455d73}
#nx-data-studio .nsti-file{display:flex;flex-direction:column;gap:8px;border:1px dashed #d3dce6;
 border-radius:9px;margin-bottom:10px;padding:12px}
#nx-data-studio .nsti-file strong{font-size:11px;color:#344d65}
#nx-data-studio .nsti-file input{max-width:100%;font-size:11px;color:#6a7f92}
#nx-data-studio .nsti-bars{display:flex;flex-direction:column;gap:9px;margin:10px 0 15px}
#nx-data-studio .nsti-bar-labels{display:flex;justify-content:space-between;gap:10px;
 margin-bottom:4px;color:#496075;font-size:10.5px}
#nx-data-studio .nsti-bar-track{height:6px;border-radius:99px;background:#e9edf1;overflow:hidden}
#nx-data-studio .nsti-bar-fill{height:100%;background:linear-gradient(90deg,#243e57,#b89a61);
 border-radius:99px;transition:width .25s ease}
#nx-data-studio .nsti-delta{margin-bottom:12px;padding:10px 12px;border-radius:9px;
 background:#f3f6fa;border:1px solid #e7ecf1;font-variant-numeric:tabular-nums;color:#213d56;font-weight:650}
#nx-data-studio .nst-cell.nsti-source-cell{box-shadow:inset 0 0 0 2px #bc9551,0 0 0 3px #bc955139!important;
 background:#fff7e6!important;z-index:3;position:relative}
@keyframes nsti-rise{from{opacity:.65;transform:translateY(9px) scale(.99)}to{opacity:1;transform:none}}
@media(max-width:780px){
 #nx-data-studio .nsti-tools{gap:3px;margin-left:4px;padding-left:4px}
 #nx-data-studio .nsti-feature{font-size:10px;padding:6px 7px}
 #nx-data-studio .nsti-lens{right:8px;bottom:8px;width:calc(100% - 16px);max-height:67%}
 #nx-data-studio .nsti-lens-body{padding:11px}
}
@media(prefers-reduced-motion:reduce){
 #nx-data-studio .nsti-lens{animation:none}
 #nx-data-studio .nsti-btn,#nx-data-studio .nsti-bar-fill{transition:none}
}

/* Small evidence pips sit in the real workbook cells; source data remains untouched. */
#nx-data-studio .nst-cell.nsti-mark-error,
#nx-data-studio .nst-cell.nsti-mark-review{position:relative}
#nx-data-studio .nst-cell.nsti-mark-error::after,
#nx-data-studio .nst-cell.nsti-mark-review::after{
 content:"";position:absolute;right:3px;top:3px;width:5px;height:5px;pointer-events:none;
 border-radius:50%;background:#b8483c;box-shadow:0 0 0 2px #ffffffbb}
#nx-data-studio .nst-cell.nsti-mark-review::after{background:#bb9551}

/* Contextual tools appear only after the engineer selects a real cell range. */
#nx-data-studio .nsti-context{position:absolute;z-index:7;left:15px;bottom:16px;
 display:flex;align-items:center;gap:7px;max-width:calc(100% - 35px);padding:6px 8px;
 border-radius:11px;border:1px solid #d8dfdf;background:#fffdfa;
 box-shadow:0 6px 23px rgba(16,42,63,.13);white-space:nowrap;overflow-x:auto}
#nx-data-studio .nsti-context[hidden]{display:none}
#nx-data-studio .nsti-context-count{font-size:10px;color:#687b8d;padding:0 6px;white-space:nowrap}
#nx-data-studio .nsti-context .nsti-btn{font-size:10.5px;min-height:28px;background:#f7f8fa}
#nx-data-studio .nsti-context .nsti-btn:hover{background:#f4eada}
@media(max-width:780px){
 #nx-data-studio .nsti-context{left:8px;bottom:8px;max-width:calc(100% - 16px)}
 #nx-data-studio .nsti-context-count{display:none}
}

