.kp-document-home,.kp-document-scroll,.kp-document-options{margin-bottom:0}
.kp-document-home:hover,.kp-document-scroll:hover,.kp-document-options:hover,.kp-document-home[aria-pressed=true],.kp-document-tab:hover{background:transparent}
.kp-document-tab.is-active{border-color:transparent;box-shadow:none}
.kp-document-close:hover{scale:1}
.kp-document-tabs { display:flex; flex:none; align-items:center; gap:6px; min-width:0; height:46px; padding:0 10px; background:var(--bg-1); border-bottom:1px solid var(--line); color:var(--text); user-select:none; }
.kp-document-tabs button { font:inherit; color:inherit; border:0; cursor:pointer; }
.kp-document-tabs button:focus-visible { outline:2px solid var(--accent); outline-offset:-3px; }
.kp-document-home,.kp-document-scroll,.kp-document-options { display:grid; place-items:center; width:32px; height:32px; flex:none; padding:0; border-radius:6px; background:transparent; color:var(--dim)!important; transition:color .14s; }
.kp-document-home:hover,.kp-document-scroll:hover,.kp-document-options:hover { color:var(--text)!important; }
.kp-document-home[aria-pressed=true] { color:var(--accent)!important; }
.kp-document-tabstrip { display:flex; align-self:stretch; gap:0; flex:1; min-width:0; overflow-x:auto; scrollbar-width:none; position:relative; }
.kp-document-tabstrip::-webkit-scrollbar { display:none; }
.kp-document-tab { position:relative; display:flex; align-items:center; flex:0 0 196px; min-width:0; overflow:hidden; border:0; border-radius:0; background:transparent; color:var(--dim); animation:kp-tab-enter .18s cubic-bezier(.2,.8,.2,1); transition:color .14s,flex-basis .14s,opacity .14s; }
/* Fine separators and a restrained tint keep selection clear on one shared surface. */
.kp-document-tab:not(:last-child)::before { content:''; position:absolute; right:0; top:calc(50% - 8px); width:1px; height:16px; background:var(--line); opacity:.65; pointer-events:none; }
.kp-document-tab::after { content:''; position:absolute; left:14px; right:14px; bottom:0; height:2px; border-radius:2px 2px 0 0; background:var(--accent); opacity:0; transform:scaleX(.75); transition:opacity .14s,transform .18s; pointer-events:none; }
.kp-document-tab:hover,.kp-document-tab:focus-within,.kp-document-tab.is-active { color:var(--text); }
.kp-document-tab.is-active { background:color-mix(in srgb,var(--accent) 6%,transparent); }
.kp-document-tab.is-active::after { opacity:1; transform:scaleX(1); }
.kp-document-tab.is-closing { flex-basis:0; opacity:0; pointer-events:none; }
.kp-document-tab-label { display:flex; align-items:center; gap:10px; flex:1; min-width:0; height:100%; padding:0 8px 0 16px; background:transparent; text-align:left; font-size:13px!important; font-weight:400!important; line-height:1.3; }
.kp-document-tab.is-active .kp-document-tab-label { font-weight:600!important; }
.kp-document-tab-label>i { flex:none; width:14px; text-align:center; font-size:12px; opacity:.7; }
.kp-document-tab.is-active .kp-document-tab-label>i { color:var(--accent); opacity:1; }
.kp-document-tab-label>span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.kp-document-close { flex:none; width:24px; height:24px; margin-right:10px; padding:0; display:grid; place-items:center; border-radius:5px; background:transparent; opacity:.4; font-size:11px!important; transition:background .12s,opacity .12s; }
.kp-document-tab.is-active .kp-document-close { opacity:.7; }
.kp-document-tab:hover .kp-document-close,.kp-document-tab:focus-within .kp-document-close { opacity:1; }
.kp-document-close:hover { background:color-mix(in srgb,var(--text) 9%,transparent); }
.kp-document-close:disabled { opacity:.3; cursor:wait; }
.kp-document-tab.drop-before { box-shadow:inset 3px 0 var(--accent); }
.kp-document-tab.drop-after { box-shadow:inset -3px 0 var(--accent); }
.kp-document-no-tabs { align-self:center; color:var(--dim); font-size:12px; padding:0 8px; }
.kp-document-panel { display:flex; flex-direction:column; flex:1; min-width:0; min-height:0; }
.kp-document-panel[hidden] { display:none!important; }
.kp-document-workspace { display:flex; flex-direction:column; flex:1; min-width:0; min-height:0; }
.kp-document-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.kp-document-tab-menu { min-width:245px; }
.kp-document-tab-menu .ctx-item { transition:background .12s,color .12s; animation:kp-tab-option .15s ease-out both; }
.kp-document-tab-menu .ctx-item:nth-child(2) { animation-delay:15ms; }.kp-document-tab-menu .ctx-item:nth-child(3) { animation-delay:25ms; }.kp-document-tab-menu .ctx-item:nth-child(n+4) { animation-delay:35ms; }
.kp-document-tab-menu.exiting .ctx-item { animation:none; }
@keyframes kp-tab-enter { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
@keyframes kp-tab-option { from { opacity:0; translate:0 3px; } to { opacity:1; translate:0 0; } }
@media(max-width:600px) { .kp-document-tabs { padding-inline:5px; gap:2px; } .kp-document-tab { flex-basis:166px; } .kp-document-tab-label { padding-left:12px; gap:8px; } .kp-document-tab::after { left:10px; right:10px; } .kp-document-close { opacity:1; width:28px; height:28px; margin-right:5px; } }
@media(pointer:coarse) { .kp-document-tabs { height:48px; } .kp-document-home,.kp-document-scroll,.kp-document-options { width:36px; height:44px; } .kp-document-close { width:32px; height:44px; opacity:1; } }
@media(forced-colors:active) { .kp-document-tab.is-active::after { background:Highlight; forced-color-adjust:none; } .kp-document-tabs button:focus-visible { outline-color:Highlight; } }
@media(prefers-reduced-motion:reduce) { .kp-document-tabs *,.kp-document-tabs *::after,.kp-document-tabs *::before,.kp-document-tab-menu .ctx-item { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
