/* Sheets (v4): formula bar, grid, tabs. Tokens only. */
.sheets{min-width:0}
.sh-bar{display:flex;align-items:center;gap:var(--space-2);margin:var(--space-3) 0}
.sh-ref{min-width:56px;text-align:center;padding:10px;border:1px solid var(--line2);border-radius:var(--radius-md);background:var(--surface);font-weight:600}
.sh-fxl{color:var(--muted);font-style:italic}
.sh-fx{flex:1;min-height:44px;min-width:0;font-family:var(--mono,ui-monospace,monospace)}
.sh-wrap{overflow:auto;max-height:calc(100vh - 330px);min-height:260px;border:1px solid var(--line2);border-radius:var(--radius-md);background:var(--surface);outline-offset:2px}
.sh-grid{border-collapse:separate;border-spacing:0;font-size:14px}
.sh-grid th{position:sticky;top:0;z-index:2;background:var(--bg);color:var(--text2);font-weight:500;padding:6px 10px;border-bottom:1px solid var(--line2);border-right:1px solid var(--line2);min-width:96px}
.sh-grid tbody th{position:sticky;left:0;z-index:1;min-width:44px;text-align:center;border-right:1px solid var(--line2)}
.sh-grid th.corner{left:0;z-index:3;min-width:44px}
.sh-grid th.hot{background:var(--action-tint);color:var(--action-ink)}
.sh-grid td{height:30px;min-width:96px;max-width:240px;padding:0 8px;border-bottom:1px solid var(--line2);border-right:1px solid var(--line2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:cell}
.sh-grid td.num{text-align:right;font-variant-numeric:tabular-nums}
.sh-grid td.err{color:var(--danger);font-weight:600}
.sh-grid td.sel{outline:2px solid var(--action);outline-offset:-2px;background:var(--action-tint)}
.sh-in{width:100%;height:100%;min-height:28px;border:0;outline:0;background:var(--bg);color:var(--text);font:inherit;padding:0}
.sh-tabs{display:flex;gap:var(--space-1);align-items:center;flex-wrap:wrap;margin-top:var(--space-2)}
.sh-tabs [role=tab]{min-height:44px;padding:0 var(--space-4);border:1px solid var(--line2);border-radius:var(--radius-md);background:var(--surface);color:var(--text);font:inherit;cursor:pointer}
.sh-tabs [role=tab].on{background:var(--action-tint);border-color:var(--action);color:var(--action-ink);font-weight:600}
